Exemplo n.º 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);
 }