diff --git a/CHANGELOG.md b/CHANGELOG.md index 996a432..0e535b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - [0007718](https://bugs.oxid-esales.com/view.php?id=7718): Fix compatibility-Issue with Core (Method-Return-Values must be compatible with CORE) - [0007728](https://bugs.oxid-esales.com/view.php?id=7728): Fix that Items are not added when paying with AmazonPay Express from Minibasket (Flyout) - [0007752](https://bugs.oxid-esales.com/view.php?id=7728): Fis that Orders are NOT always refunded when cancelled, even if the option for this is deactivated. +- Prevent the shop from breaking on misconfiguration or if the amazon service is down. Thanks to https://github.com/GM-Alex ## [2.1.6] - 2024-08-15 diff --git a/metadata.php b/metadata.php index 18d104f..27579c8 100644 --- a/metadata.php +++ b/metadata.php @@ -60,7 +60,7 @@ 'en' => 'Use of the online payment service from amazon.com' ], 'thumbnail' => 'out/img/amazon-pay-logo.png', - 'version' => '2.1.7-rc.2', + 'version' => '2.1.7-rc.3', 'author' => 'OXID eSales AG', 'url' => 'https://www.oxid-esales.com', 'email' => 'info@oxid-esales.com', diff --git a/src/Core/ViewConfig.php b/src/Core/ViewConfig.php index 1a2d85c..6ee85b2 100644 --- a/src/Core/ViewConfig.php +++ b/src/Core/ViewConfig.php @@ -368,7 +368,12 @@ public function getPayloadSignIn(): string */ public function getSignature(string $payload): string { - $amazonClient = OxidServiceProvider::getAmazonClient(); - return $amazonClient->generateButtonSignature($payload); + try { + return OxidServiceProvider::getAmazonClient()->generateButtonSignature($payload); + } catch (Exception $exception) { + $logger = new Logger(); + $logger->log('ERROR', $exception->getMessage(), [$exception]); + return ''; + } } }