GuestPaymentInformationManagementInterface.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Checkout\Api;
  7. /**
  8. * Interface for managing guest payment information
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface GuestPaymentInformationManagementInterface
  13. {
  14. /**
  15. * Set payment information and place order for a specified cart.
  16. *
  17. * @param string $cartId
  18. * @param string $email
  19. * @param \Magento\Quote\Api\Data\PaymentInterface $paymentMethod
  20. * @param \Magento\Quote\Api\Data\AddressInterface|null $billingAddress
  21. * @throws \Magento\Framework\Exception\CouldNotSaveException
  22. * @return int Order ID.
  23. */
  24. public function savePaymentInformationAndPlaceOrder(
  25. $cartId,
  26. $email,
  27. \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
  28. \Magento\Quote\Api\Data\AddressInterface $billingAddress = null
  29. );
  30. /**
  31. * Set payment information for a specified cart.
  32. *
  33. * @param string $cartId
  34. * @param string $email
  35. * @param \Magento\Quote\Api\Data\PaymentInterface $paymentMethod
  36. * @param \Magento\Quote\Api\Data\AddressInterface|null $billingAddress
  37. * @throws \Magento\Framework\Exception\CouldNotSaveException
  38. * @return int Order ID.
  39. */
  40. public function savePaymentInformation(
  41. $cartId,
  42. $email,
  43. \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
  44. \Magento\Quote\Api\Data\AddressInterface $billingAddress = null
  45. );
  46. /**
  47. * Get payment information
  48. *
  49. * @param string $cartId
  50. * @return \Magento\Checkout\Api\Data\PaymentDetailsInterface
  51. */
  52. public function getPaymentInformation($cartId);
  53. }