config = $config; $this->subjectReader = $subjectReader; } /** * @inheritdoc */ public function build(array $buildSubject) { $paymentDO = $this->subjectReader->readPayment($buildSubject); $payment = $paymentDO->getPayment(); $order = $paymentDO->getOrder(); $result = [ self::AMOUNT => $this->formatPrice($this->subjectReader->readAmount($buildSubject)), self::PAYMENT_METHOD_NONCE => $payment->getAdditionalInformation( DataAssignObserver::PAYMENT_METHOD_NONCE ), self::ORDER_ID => $order->getOrderIncrementId() ]; $merchantAccountId = $this->config->getValue(Config::KEY_MERCHANT_ACCOUNT_ID); if (!empty($merchantAccountId)) { $result[self::MERCHANT_ACCOUNT_ID] = $merchantAccountId; } return $result; } }