PaymentDataObject.php 974 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Payment\Gateway\Data;
  7. use Magento\Payment\Model\InfoInterface;
  8. class PaymentDataObject implements PaymentDataObjectInterface
  9. {
  10. /**
  11. * @var OrderAdapterInterface
  12. */
  13. private $order;
  14. /**
  15. * @var InfoInterface
  16. */
  17. private $payment;
  18. /**
  19. * @param OrderAdapterInterface $order
  20. * @param InfoInterface $payment
  21. */
  22. public function __construct(
  23. OrderAdapterInterface $order,
  24. InfoInterface $payment
  25. ) {
  26. $this->order = $order;
  27. $this->payment = $payment;
  28. }
  29. /**
  30. * Returns order
  31. *
  32. * @return OrderAdapterInterface
  33. */
  34. public function getOrder()
  35. {
  36. return $this->order;
  37. }
  38. /**
  39. * Returns payment
  40. *
  41. * @return InfoInterface
  42. */
  43. public function getPayment()
  44. {
  45. return $this->payment;
  46. }
  47. }