PaymentVerificationInterface.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Payment\Api;
  7. use Magento\Sales\Api\Data\OrderPaymentInterface;
  8. /**
  9. * Payment provider codes verification interface.
  10. *
  11. * Custom payment methods might implement this interface to provide
  12. * specific mapping for payment methods, like AVS or CVV verification.
  13. * The payment methods can map payment method info from internal sources,
  14. * like additional information, to specific international codes.
  15. *
  16. * There are no default implementation of this interface, because code verification
  17. * depends on payment method integration specifics.
  18. *
  19. * @api
  20. * @since 100.2.0
  21. */
  22. interface PaymentVerificationInterface
  23. {
  24. /**
  25. * Gets payment provider verification code.
  26. * Throws an exception if provided payment method is different to verification implementation.
  27. *
  28. * @param OrderPaymentInterface $orderPayment
  29. * @return string
  30. * @throws \InvalidArgumentException
  31. * @since 100.2.0
  32. */
  33. public function getCode(OrderPaymentInterface $orderPayment);
  34. }