We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 60dafe8f authored by rikterbeek's avatar rikterbeek

#20 add transaction id to invoice so that online refund is possible

parent 50300519
...@@ -339,6 +339,11 @@ class Cc extends \Magento\Payment\Model\Method\Cc ...@@ -339,6 +339,11 @@ class Cc extends \Magento\Payment\Model\Method\Cc
public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount) public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
{ {
parent::capture($payment, $amount); parent::capture($payment, $amount);
// set TransactionId so you can do an online refund
$payment->setTransactionId(1)
->setIsTransactionClosed(false);
$this->_paymentRequest->capture($payment, $amount); $this->_paymentRequest->capture($payment, $amount);
return $this; return $this;
} }
......
...@@ -380,6 +380,11 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa ...@@ -380,6 +380,11 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa
public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount) public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
{ {
parent::capture($payment, $amount); parent::capture($payment, $amount);
// set TransactionId so you can do an online refund
$payment->setTransactionId(1)
->setIsTransactionClosed(false);
$this->_paymentRequest->capture($payment, $amount); $this->_paymentRequest->capture($payment, $amount);
return $this; return $this;
} }
......
...@@ -380,6 +380,11 @@ class Pos extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa ...@@ -380,6 +380,11 @@ class Pos extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa
public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount) public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
{ {
parent::capture($payment, $amount); parent::capture($payment, $amount);
// set TransactionId so you can do an online refund
$payment->setTransactionId(1)
->setIsTransactionClosed(false);
$this->_paymentRequest->capture($payment, $amount); $this->_paymentRequest->capture($payment, $amount);
return $this; return $this;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment