Checkout.php 921 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Paypal\Model\PayflowExpress;
  7. /**
  8. * Wrapper that performs Paypal Express and Checkout communication
  9. * Use current Paypal Express method instance
  10. */
  11. class Checkout extends \Magento\Paypal\Model\Express\Checkout
  12. {
  13. /**
  14. * Api Model Type
  15. *
  16. * @var string
  17. */
  18. protected $_apiType = \Magento\Paypal\Model\Api\PayflowNvp::class;
  19. /**
  20. * Payment method type
  21. *
  22. * @var string
  23. */
  24. protected $_methodType = \Magento\Paypal\Model\Config::METHOD_WPP_PE_EXPRESS;
  25. /**
  26. * Set shipping method to quote, if needed
  27. *
  28. * @param string $methodCode
  29. * @return void
  30. */
  31. public function updateShippingMethod($methodCode)
  32. {
  33. parent::updateShippingMethod($methodCode);
  34. $this->quoteRepository->save($this->_quote);
  35. }
  36. }