ErrorMessageMapperInterface.php 614 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Payment\Gateway\ErrorMapper;
  8. use Magento\Framework\Phrase;
  9. /**
  10. * Interface to provide customization for payment validation errors.
  11. *
  12. * @api
  13. * @since 100.2.2
  14. */
  15. interface ErrorMessageMapperInterface
  16. {
  17. /**
  18. * Returns customized error message by provided code.
  19. * If message not found `null` will be returned.
  20. *
  21. * @param string $code
  22. * @return Phrase|null
  23. * @since 100.2.2
  24. */
  25. public function getMessage(string $code);
  26. }