Skip to content

Commit

Permalink
Merge pull request #202 from OXID-eSales/PSAPC_PreventBreakingDown
Browse files Browse the repository at this point in the history
Prevent the shop from breaking on misconfiguration or if the amazon s…
  • Loading branch information
mariolorenz authored Jan 17, 2025
2 parents abf8eee + 1f2df29 commit 26ac6e1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '[email protected]',
Expand Down
9 changes: 7 additions & 2 deletions src/Core/ViewConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
}
}
}

0 comments on commit 26ac6e1

Please sign in to comment.