PredefinedVerificationCode.php 767 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Signifyd\Model;
  7. use Magento\Payment\Api\PaymentVerificationInterface;
  8. use Magento\Sales\Api\Data\OrderPaymentInterface;
  9. /**
  10. * Default implementation of payment verification interface.
  11. * The default code value can be configured via DI.
  12. */
  13. class PredefinedVerificationCode implements PaymentVerificationInterface
  14. {
  15. /**
  16. * @var string
  17. */
  18. private $code;
  19. /**
  20. * @param string $code
  21. */
  22. public function __construct($code = '')
  23. {
  24. $this->code = $code;
  25. }
  26. /**
  27. * @inheritdoc
  28. */
  29. public function getCode(OrderPaymentInterface $orderPayment)
  30. {
  31. return $this->code;
  32. }
  33. }