Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
VoidDataBuilder.php
Go to the documentation of this file.
1 <?php
7 
11 
13 {
17  private $subjectReader;
18 
24  public function __construct(SubjectReader $subjectReader)
25  {
26  $this->subjectReader = $subjectReader;
27  }
28 
35  public function build(array $buildSubject)
36  {
37  $paymentDO = $this->subjectReader->readPayment($buildSubject);
38 
40  $payment = $paymentDO->getPayment();
41 
42  return [
43  'transaction_id' => $payment->getParentTransactionId()
44  ?: $payment->getLastTransId()
45  ];
46  }
47 }
$payment
Definition: order.php:17