PaymentTokenFormatterInterface.php 903 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\InstantPurchase\PaymentMethodIntegration;
  7. use Magento\Vault\Api\Data\PaymentTokenInterface;
  8. /**
  9. * Provides mechanism to create string presentation of token for payment method.
  10. * Each payment method have own format of token details so rendering should be implemented by payment method.
  11. *
  12. * May implement any logic specific for a payment method and configured with
  13. * instant_purchase/tokenFormat configuration option in vault payment config.
  14. *
  15. * @api
  16. * @since 100.2.0
  17. */
  18. interface PaymentTokenFormatterInterface
  19. {
  20. /**
  21. * Creates string presentation of payment token.
  22. *
  23. * @param PaymentTokenInterface $paymentToken
  24. * @return string
  25. * @since 100.2.0
  26. */
  27. public function formatPaymentToken(PaymentTokenInterface $paymentToken): string;
  28. }