setBilling example

$shippingAddress = new Shipping();
        $shippingAddress->fromArray($shipping);
        $shippingAddress->setCustomer($order->getCustomer());
        $shippingAddress->setCountry($country);
        $shippingAddress->setState($state);

        $violations = $this->getManager()->validate($shippingAddress);
        if ($violations->count() > 0) {
            throw new ValidationException($violations);
        }

        $order->setBilling($billingAddress);
        $order->setShipping($shippingAddress);
    }
}
Home | Imprint | This part of the site doesn't use cookies.