Skip to content

Commit 191fc73

Browse files
PT-2198: Order Confirmation endpoint called for cancelled/declined orders by JTL plugin
1 parent f8d633b commit 191fc73

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<PluginID>MonduPayment</PluginID>
88
<XMLVersion>100</XMLVersion>
99
<ShopVersion>5.0.0</ShopVersion>
10-
<Version>3.0.6</Version>
10+
<Version>3.0.7</Version>
1111
<CreateDate>2022-06-07</CreateDate>
1212
<Install>
1313
<Hooks>

paymentmethod/MonduPayment.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,23 @@ public function isValidIntern($args_arr = []): bool
3434

3535
public function preparePaymentProcess($order): void
3636
{
37+
if (
38+
isset($order['status']) &&
39+
$order['status'] == MonduPayment::STATE_DECLINED ||
40+
$order['status'] == MonduPayment::STATE_CANCELED
41+
) {
42+
$this->handleFail($order->kBestellung);
43+
$upd = new \stdClass();
44+
$upd->cStatus = \BESTELLUNG_STATUS_IN_BEARBEITUNG;
45+
$upd->cAbgeholt = 'M';
46+
Shop::Container()->getDB()->update('tbestellung', 'kBestellung', (int) $order->kBestellung, $upd);
47+
48+
unset($_SESSION['monduOrderUuid']);
49+
unset($_SESSION['monduCartHash']);
50+
51+
return;
52+
}
53+
3754
parent::preparePaymentProcess($order);
3855

3956
$this->confirmOrder($order);

0 commit comments

Comments
 (0)