Example #1
0
 /**
  * Place order after checking order totals on review step.
  *
  * @return array
  */
 public function run()
 {
     $orderReviewBlock = $this->paypalExpressReview->getReviewBlock();
     if ('-' !== $this->shippingMethod) {
         $orderReviewBlock->selectShippingMethod($this->shippingMethod);
     }
     $orderReviewBlock->placeOrder();
     return ['orderId' => $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId()];
 }
 /**
  * Continue Pay Pal checkout.
  *
  * @return array|null
  */
 public function run()
 {
     $this->reviewBlock = $this->paypalPage->getReviewBlock()->isVisible() ? $this->paypalPage->getReviewBlock() : $this->paypalPage->getOldReviewBlock();
     $this->selectCustomerAddress($this->customer);
     $this->reviewBlock->continueCheckout();
     $this->paypalExpressReview->getReviewBlock()->isPlaceOrderVisible();
     $orderId = $this->paypalExpressReview->getReviewBlock()->isPlaceOrderVisible() ? null : $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId();
     return ['orderId' => $orderId];
 }