Skip to content

Commit d086bb7

Browse files
PT-3033: Fix error with different delivery address (#3)
1 parent fd60d60 commit d086bb7

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

Core/Mappers/MonduOrderMapper.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ public function getMappedOrderData($paymentMethod)
6060
$shipping = $basket->getDeliveryCost()->getPrice();
6161
$shopUrl = Registry::getConfig()->getCurrentShopUrl();
6262

63+
$oDelAdressMD5 = $this->getBasketUser()->getEncodedDeliveryAddress();
64+
if (Registry::getSession()->getVariable('deladrid')) {
65+
$oDelAdress = oxNew(\OxidEsales\Eshop\Application\Model\Address::class);
66+
$oDelAdress->load(Registry::getSession()->getVariable('deladrid'));
67+
$oDelAdressMD5 .= $oDelAdress->getEncodedDeliveryAddress();
68+
}
69+
6370
$externalReferenceId = uniqid('M_OX_');
6471
$data = [
6572
"currency" => $basket->getBasketCurrency()->name,
@@ -69,7 +76,7 @@ public function getMappedOrderData($paymentMethod)
6976
"buyer" => MonduHelper::removeEmptyElementsFromArray($this->getBuyerData()),
7077
"billing_address" => MonduHelper::removeEmptyElementsFromArray($this->getUserBillingAddress()),
7178
"shipping_address" => MonduHelper::removeEmptyElementsFromArray($this->getUserDeliveryAddress()),
72-
"success_url" => $shopUrl . '?cl=order&fnc=execute&order_uuid=' . $monduOrderUuid . '&sDeliveryAddressMD5=' . $this->getBasketUser()->getEncodedDeliveryAddress(),
79+
"success_url" => $shopUrl . '?cl=order&fnc=execute&order_uuid=' . $monduOrderUuid . '&sDeliveryAddressMD5=' . $oDelAdressMD5,
7380
"cancel_url" => $shopUrl . '?cl=oemonducancel',
7481
"declined_url" => $shopUrl . '?cl=oemondudeclined',
7582
"state_flow" => 'authorization_flow',

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "https://github.com/mondu-ai/bnpl-checkout-oxid7",
33
"description": "Mondu payment method for the OXID eShop.",
44
"type": "oxideshop-module",
5-
"version": "1.0.0",
5+
"version": "1.0.1",
66
"license": [
77
"OSL-3.0",
88
"AFL-3.0"

metadata.php

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

0 commit comments

Comments
 (0)