Exemple #1
0
 /**
  * Import refund results to payment
  *
  * @param Mage_Paypal_Model_Api_Nvp $api
  * @param Mage_Sales_Model_Order_Payment $payment
  * @param bool $canRefundMore
  */
 protected function _importRefundResultToPayment($api, $payment, $canRefundMore)
 {
     $payment->setTransactionId($api->getTransactionId())->setIsTransactionClosed(1)->setShouldCloseParentTransaction(!$canRefundMore)->setTransactionAdditionalInfo(self::TRANSPORT_PAYFLOW_TXN_ID, $api->getPayflowTrxid());
     $payment->setPreparedMessage(Mage::helper('enterprise_pbridge')->__('Payflow PNREF: #%s.', $api->getData(self::TRANSPORT_PAYFLOW_TXN_ID)));
     Mage::getModel('paypal/info')->importToPayment($api, $payment);
 }