예제 #1
0
 /**
  * @param OrderInterface $order
  * @param string $countryCode
  */
 private function address(OrderInterface $order, $countryCode)
 {
     /** @var AddressInterface $address */
     $address = $this->addressFactory->createNew();
     $address->setFirstname($this->faker->firstName);
     $address->setLastname($this->faker->lastName);
     $address->setStreet($this->faker->streetName);
     $address->setCountryCode($countryCode);
     $address->setCity($this->faker->city);
     $address->setPostcode($this->faker->postcode);
     $order->setShippingAddress($address);
     $order->setBillingAddress($address);
     $this->applyCheckoutStateTransition($order, OrderCheckoutTransitions::TRANSITION_ADDRESS);
 }
예제 #2
0
 /**
  * @param OrderInterface $order
  * @param ShippingMethodInterface $shippingMethod
  * @param AddressInterface $address
  * @param PaymentMethodInterface $paymentMethod
  */
 private function checkoutUsing(OrderInterface $order, ShippingMethodInterface $shippingMethod, AddressInterface $address, PaymentMethodInterface $paymentMethod)
 {
     $order->setShippingAddress($address);
     $order->setBillingAddress(clone $address);
     $this->applyTransitionOnOrderCheckout($order, OrderCheckoutTransitions::TRANSITION_ADDRESS);
     $this->proceedSelectingShippingAndPaymentMethod($order, $shippingMethod, $paymentMethod);
 }