/**
  * @inheritdoc
  */
 public function run()
 {
     if (isset($this->prices['grandTotal'])) {
         $this->assertGrandTotalOrderReview->processAssert($this->checkoutOnepage, $this->prices['grandTotal']);
     }
     $this->checkoutOnepage->getPaymentBlock()->getSelectedPaymentMethodBlock()->clickPlaceOrder();
     $this->checkoutOnepage->getBraintreePaypalBlock()->process();
     return ['orderId' => $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId()];
 }
 /**
  * @inheritdoc
  */
 public function run()
 {
     if (isset($this->prices['grandTotal'])) {
         $this->assertGrandTotalOrderReview->processAssert($this->checkoutOnepage, $this->prices['grandTotal']);
     }
     $parentWindow = $this->checkoutOnepage->getPaymentBlock()->getSelectedPaymentMethodBlock()->clickContinueToPaypal();
     $this->checkoutOnepage->getBraintreePaypalBlock()->process($parentWindow);
     $order = $this->fixtureFactory->createByCode('orderInjectable', ['data' => ['entity_id' => ['products' => $this->products]]]);
     return ['orderId' => $this->checkoutOnepageSuccess->getSuccessBlock()->getGuestOrderId(), 'order' => $order];
 }