Skip to content

Commit

Permalink
PT-1105 fix SettingsChangedSubscriber for older version (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
tikohov20 authored Mar 5, 2024
1 parent f6e17f3 commit 5cc3751
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Event/SettingChangedSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public function __construct(MonduClient $client)

public function afterSettingChange(SettingChangedEvent $event)
{
if($event->getModuleId() !== 'oemondu') return;

if ($event->getSettingName() === 'oemonduWebhookSecret') {
return;
}
Expand All @@ -40,6 +42,8 @@ protected function registerWebhooks()
$webhookParams = oxNew(Webhook::class, $webhookTopic)->getData();
$response = $this->_client->registerWebhook($webhookParams);

if ($response['status'] === 409) return;

if (!$response['webhook']) {
$errorMessage = $response['status'] === 403 ? 'INVALID_API_KEY' : 'MONDU_REGISTER_WEBHOOK_ERROR';

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mondu/bnpl-checkout-oxid",
"description": "Mondu payment method for the OXID eShop.",
"type": "oxideshop-module",
"version": "1.0.0",
"version": "1.0.1",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down
2 changes: 1 addition & 1 deletion metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'en' => 'Module for Mondu payment.',
),
'thumbnail' => 'out/src/images/logo.png',
'version' => '1.0.0',
'version' => '1.0.1',
'author' => 'Mondu GmbH',
'url' => 'https://www.mondu.ai',
'email' => '[email protected]',
Expand Down

0 comments on commit 5cc3751

Please sign in to comment.