コード例 #1
0
 /**
  * Import payment info to payment
  *
  * @param Api\Nvp $api
  * @param \Magento\Sales\Model\Order\Payment $payment
  * @return void
  */
 protected function _importToPayment($api, $payment)
 {
     $payment->setTransactionId($api->getPaypalTransactionId())->setIsTransactionClosed(0)->setAdditionalInformation(Express\Checkout::PAYMENT_INFO_TRANSPORT_REDIRECT, $api->getRedirectRequired() || $api->getRedirectRequested())->setIsTransactionPending($api->getIsPaymentPending())->setTransactionAdditionalInfo(Payflow\Pro::TRANSPORT_PAYFLOW_TXN_ID, $api->getTransactionId());
     $payment->setPreparedMessage(__('Payflow PNREF: #%1.', $api->getTransactionId()));
     $this->_paypalInfoFactory->create()->importToPayment($api, $payment);
 }
コード例 #2
0
ファイル: Express.php プロジェクト: pradeep-wagento/magento2
 /**
  * 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);
 }