Skip to content

Commit

Permalink
pushed from bitbucket
Browse files Browse the repository at this point in the history
  • Loading branch information
1jenkins committed May 30, 2021
1 parent aeaa20e commit 39a5e99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Model/Api/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public function getRefund($rapyd_data)
$refund_token = $body['refund_token'];
$message = $body['reason'];
$this->addRefundTransactionToOrder($order, $refund_token, 1, $message, $amount);
$order->setTotalRefunded($amount);
$amount_refunded = $order->getTotalRefunded();
$order->setTotalRefunded($amount_refunded+$amount);
$order->save();
return "refund success";
} catch (\Exception $e) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "rapyd/rapydmagento2",
"description": "Rapyd Payments Plugin for Magento",
"type": "magento2-module",
"version": "1.0.5",
"version": "1.0.6",
"license": [
"Apache-2.0"
],
Expand Down
2 changes: 1 addition & 1 deletion etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<system>
<section id="payment">
<group id="rapyd" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Rapyd Payments Settings (v1.0.5)</label>
<label>Rapyd Payments Settings (v1.0.6)</label>
<field id="active" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="0">
<label>Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
Expand Down

0 comments on commit 39a5e99

Please sign in to comment.