/** * Import payment info to payment * * @param Nvp $api * @param Payment $payment * @return void */ protected function _importToPayment($api, $payment) { $payment->setTransactionId($api->getTransactionId())->setIsTransactionClosed(0)->setAdditionalInformation(ExpressCheckout::PAYMENT_INFO_TRANSPORT_REDIRECT, $api->getRedirectRequired()); if ($api->getBillingAgreementId()) { $payment->setBillingAgreementData(['billing_agreement_id' => $api->getBillingAgreementId(), 'method_code' => \Magento\Paypal\Model\Config::METHOD_BILLING_AGREEMENT]); } $this->_pro->importPaymentInfo($api, $payment); }