Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
VaultDataBuilder.php
Go to the documentation of this file.
1 <?php
7 
11 
16 {
20  private static $optionsKey = 'options';
21 
26  private static $storeInVaultOnSuccess = 'storeInVaultOnSuccess';
27 
31  private $subjectReader;
32 
37  public function __construct(SubjectReader $subjectReader)
38  {
39  $this->subjectReader = $subjectReader;
40  }
41 
45  public function build(array $buildSubject)
46  {
47  $result = [];
48  $paymentDO = $this->subjectReader->readPayment($buildSubject);
49 
50  $payment = $paymentDO->getPayment();
51  $data = $payment->getAdditionalInformation();
53  $result[self::$optionsKey] = [
54  self::$storeInVaultOnSuccess => true
55  ];
56  }
57 
58  return $result;
59  }
60 }
$payment
Definition: order.php:17