subjectReader = $subjectReader; } /** * @inheritdoc */ public function build(array $buildSubject): array { $paymentDO = $this->subjectReader->readPayment($buildSubject); $order = $paymentDO->getOrder(); $billingAddress = $order->getBillingAddress(); $result = [ 'transactionRequest' => [ 'customer' => [ 'id' => $order->getCustomerId(), 'email' => $billingAddress->getEmail() ] ] ]; return $result; } }