VaultDataBuilder.php 832 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Braintree\Gateway\Request;
  7. use Magento\Payment\Gateway\Request\BuilderInterface;
  8. /**
  9. * Vault Data Builder
  10. */
  11. class VaultDataBuilder implements BuilderInterface
  12. {
  13. /**
  14. * Additional options in request to gateway
  15. */
  16. const OPTIONS = 'options';
  17. /**
  18. * The option that determines whether the payment method associated with
  19. * the successful transaction should be stored in the Vault.
  20. */
  21. const STORE_IN_VAULT_ON_SUCCESS = 'storeInVaultOnSuccess';
  22. /**
  23. * @inheritdoc
  24. */
  25. public function build(array $buildSubject)
  26. {
  27. return [
  28. self::OPTIONS => [
  29. self::STORE_IN_VAULT_ON_SUCCESS => true
  30. ]
  31. ];
  32. }
  33. }