Skip to content

Commit 9e9ff8e

Browse files
PT-1842: Failed Webhook Attempts (#74)
1 parent 213fbb5 commit 9e9ff8e

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mondu/shopware6-payment",
33
"description": "Mondu payment for Shopware 6",
4-
"version": "1.4.0",
4+
"version": "1.4.1",
55
"type": "shopware-platform-plugin",
66
"license": "proprietary",
77
"authors": [

src/Components/MonduApi/Service/MonduClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ public function cancelOrder($orderUid): ?string
7575
return $response['order']['state'] ?? null;
7676
}
7777

78-
public function confirmOrder($orderUuid): ?string
78+
public function confirmOrder($orderUuid, $data): ?string
7979
{
80-
$response = $this->sendRequest('orders/'. $orderUuid .'/confirm', 'POST');
80+
$response = $this->sendRequest('orders/'. $orderUuid .'/confirm', 'POST', $data);
8181

8282
return $response['order']['state'] ?? null;
8383
}

src/Components/PaymentMethod/PaymentHandler/MonduHandler.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ public function finalize(AsyncPaymentTransactionStruct $transaction, Request $re
6464
if ($paymentState === self::PAYMENT_STATE_SUCCESS) {
6565
$paymentOrderUuid = $request->query->get('order_uuid');
6666

67-
$confirmResponseState = $this->monduClient->setSalesChannelId($salesChannelContext->getSalesChannelId())->confirmOrder($paymentOrderUuid);
67+
$confirmResponseState = $this->monduClient->setSalesChannelId(
68+
$salesChannelContext->getSalesChannelId()
69+
)->confirmOrder(
70+
$paymentOrderUuid,
71+
['external_reference_id' => $transaction->getOrder()->getOrderNumber()]
72+
);
6873

6974
if (!$this->isOrderConfirmed($confirmResponseState)) {
7075
throw new CustomerCanceledAsyncPaymentException(

0 commit comments

Comments
 (0)