Skip to content

Commit 4680eb6

Browse files
authored
Merge pull request #178 from paynl/feature/fixrefundfrompay
fix refund from pay
2 parents 3857346 + a0e285e commit 4680eb6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

includes/classes/PPMFWC/Gateways.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class PPMFWC_Gateways
2727
const ACTION_CANCEL = 'cancel';
2828
const ACTION_VERIFY = 'verify';
2929
const ACTION_REFUND = 'refund:received';
30+
const ACTION_REFUND_ADD = 'refund:add';
3031
const ACTION_CAPTURE = 'capture';
3132
const ACTION_CHARGEBACK = 'chargeback:chargeback';
3233
const ACTION_PINREFUND = 'pinrefund';
@@ -947,6 +948,7 @@ public static function ppmfwc_getPayActions()
947948
$arrPayActions[self::ACTION_CANCEL] = self::STATUS_CANCELED;
948949
$arrPayActions[self::ACTION_VERIFY] = self::STATUS_VERIFY;
949950
$arrPayActions[self::ACTION_REFUND] = self::STATUS_REFUND;
951+
$arrPayActions[self::ACTION_REFUND_ADD] = self::STATUS_REFUND;
950952
$arrPayActions[self::ACTION_CAPTURE] = self::STATUS_CAPTURE;
951953
$arrPayActions[self::ACTION_CAPTURE] = self::STATUS_CAPTURE;
952954
$arrPayActions[self::ACTION_CHARGEBACK] = self::STATUS_CHARGEBACK;
@@ -1067,13 +1069,15 @@ public static function ppmfwc_onExchange()
10671069
die('FALSE| Already processing payment');
10681070
}
10691071
}
1070-
if (in_array($action, array_keys($arrActions))) {
1072+
if (in_array($action, array_keys($arrActions)))
1073+
{
10711074
$status = $arrActions[$action];
10721075
} else {
10731076
throw new PPMFWC_Exception_Notice('Ignoring: ' . $action);
10741077
}
10751078

1076-
if (!in_array($action, array(self::ACTION_PENDING))) {
1079+
if (!in_array($action, array(self::ACTION_PENDING)))
1080+
{
10771081
PPMFWC_Helper_Data::ppmfwc_payLogger('Exchange incoming', $order_id, array('action' => $action, 'wc_order_id' => $wc_order_id, 'methodid' => $methodId));
10781082

10791083
# Try to update the orderstatus.

0 commit comments

Comments
 (0)