/** * Refund a capture transaction * * @param \Magento\Framework\Object $payment * @param float $amount * @return void */ public function refund(\Magento\Framework\Object $payment, $amount) { $captureTxnId = $this->_getParentTransactionId($payment); if ($captureTxnId) { $api = $this->getApi(); $api->setAuthorizationId($captureTxnId); } parent::refund($payment, $amount); }
/** * Refund capture * * @param \Magento\Framework\Object|Payment $payment * @param float $amount * @return $this */ public function refund(\Magento\Framework\Object $payment, $amount) { $this->_pro->refund($payment, $amount); return $this; }
/** * Refund capture * * @param \Magento\Framework\DataObject|InfoInterface|Payment $payment * @param float $amount * @return $this * @throws \Magento\Framework\Exception\LocalizedException */ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) { $this->_pro->refund($payment, $amount); return $this; }