Skip to content

Commit 93318e7

Browse files
PT-1611: Order ID's sometimes aren't updated (#21)
1 parent e1db15d commit 93318e7

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

Controller/OrderController.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,16 @@ public function execute()
5555
throw new \Exception('Mondu: Not found');
5656
}
5757

58-
$response = $this->_client->confirmOrder($orderUuid);
58+
$oBasket = $this->getBasket();
59+
$data = [];
60+
if ($oBasket->getOrderId()) {
61+
$data['external_reference_id'] = $oBasket->getOrderId();
62+
}
63+
$response = $this->_client->confirmOrder($orderUuid, $data);
5964
$this->_logger->debug('MonduOrderController [execute $response]: ' . print_r($response, true));
6065
if (isset($response['state']) && $response['state'] == 'confirmed') {
6166
try {
62-
$iSuccess = $this->monduExecute($this->getBasket());
67+
$iSuccess = $this->monduExecute($oBasket);
6368

6469
return $this->_getNextStep($iSuccess);
6570
} catch (Exception $e) {

Model/Order.php

+4
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ public function finalizeOrder(\OxidEsales\Eshop\Application\Model\Basket $oBaske
121121
);
122122
}
123123

124+
if ($this->isMonduPayment() && !$this->getMonduOrders()) {
125+
$this->_logger->debug('MonduOrder [empty Mondu orders]: ' . print_r($result, true));
126+
}
127+
124128
return $result;
125129
}
126130
}

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mondu/bnpl-checkout-oxid",
33
"description": "Mondu payment method for the OXID eShop.",
44
"type": "oxideshop-module",
5-
"version": "1.1.4",
5+
"version": "1.1.5",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"

metadata.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'en' => 'Module for Mondu payment.',
1111
),
1212
'thumbnail' => 'out/src/images/logo.png',
13-
'version' => '1.1.4',
13+
'version' => '1.1.5',
1414
'author' => 'Mondu GmbH',
1515
'url' => 'https://www.mondu.ai',
1616
'email' => '[email protected]',

0 commit comments

Comments
 (0)