Skip to content

Commit 5cc3751

Browse files
authored
PT-1105 fix SettingsChangedSubscriber for older version (#15)
1 parent f6e17f3 commit 5cc3751

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
@@ -23,6 +23,8 @@ public function __construct(MonduClient $client)
2323

2424
public function afterSettingChange(SettingChangedEvent $event)
2525
{
26+
if($event->getModuleId() !== 'oemondu') return;
27+
2628
if ($event->getSettingName() === 'oemonduWebhookSecret') {
2729
return;
2830
}
@@ -40,6 +42,8 @@ protected function registerWebhooks()
4042
$webhookParams = oxNew(Webhook::class, $webhookTopic)->getData();
4143
$response = $this->_client->registerWebhook($webhookParams);
4244

45+
if ($response['status'] === 409) return;
46+
4347
if (!$response['webhook']) {
4448
$errorMessage = $response['status'] === 403 ? 'INVALID_API_KEY' : 'MONDU_REGISTER_WEBHOOK_ERROR';
4549

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.0.0",
5+
"version": "1.0.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.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)