Skip to content

Commit 2732491

Browse files
authored
[PT-1105] fix SettingChangedSubscriber triggering on other module settings change (#14)
1 parent f38bcbf commit 2732491

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Event/SettingChangedSubscriber.php

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public function __construct(MonduClient $client)
2626

2727
public function afterSettingChange(SettingChangedEvent $event)
2828
{
29+
if($event->getModuleId() !== 'oemondu') return;
30+
2931
if (
3032
$event->getSettingName() === 'oemonduWebhookSecret' ||
3133
$event->getSettingName() === 'oemonduIsMerchantIdentified'
@@ -53,6 +55,8 @@ protected function registerWebhooks()
5355
$webhookParams = oxNew(Webhook::class, $webhookTopic)->getData();
5456
$response = $this->_client->registerWebhook($webhookParams);
5557

58+
if ($response['status'] === 409) return;
59+
5660
if (!$response['webhook']) {
5761
$errorMessage = $response['status'] === 403 ? 'INVALID_API_KEY' : 'MONDU_REGISTER_WEBHOOK_ERROR';
5862

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.0",
5+
"version": "1.1.1",
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.0',
13+
'version' => '1.1.1',
1414
'author' => 'Mondu GmbH',
1515
'url' => 'https://www.mondu.ai',
1616
'email' => '[email protected]',

0 commit comments

Comments
 (0)