Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psapc take over6.3 #203

Merged
merged 4 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
/tests/Codeception/_output/*
!tests/Codeception/_output/.gitkeep
/tests/reports/*
!tests/reports/.gitkeep
!tests/reports/.gitkeep
/tests/privatekey.pem
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [3.1.6] - 2024-??-??
## [3.1.6] - 2025-??-??

- [0007654](https://bugs.oxid-esales.com/view.php?id=7654): Fix Capture type is incorrectly evaluated
- [0007636](https://bugs.oxid-esales.com/view.php?id=7636): Fix Refund value can only be entered with a point, semicolon is not possible
- [0007685](https://bugs.oxid-esales.com/view.php?id=7685): Smarty-Template Improvements
- Prevent the shop from breaking on misconfiguration or if the amazon service is down. Thanks to https://github.com/GM-Alex

## [3.1.5] - 2024-03-22

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' => 'img/amazon-pay-logo.png',
'version' => '3.1.6-rc.1',
'version' => '3.1.6-rc.2',
'author' => 'OXID eSales AG',
'url' => 'https://www.oxid-esales.com',
'email' => '[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion src/Core/AmazonService.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ protected function checkAmazonResult(array $result, Basket $basket, LoggerInterf
$response = PhpHelper::jsonToArray($result['response']);

// in case of error, the resulting structure is different...
if (!isset($result['response'], $result['status']) || $result['status'] !== 200) {
if (!isset($result['response'], $result['status']) || ($result['status'] !== 200 && $result['status'] !== 202)) {
$this->showErrorOnRedirect($logger, $result, (string)$basket->getOrderId());
}

Expand Down
9 changes: 7 additions & 2 deletions src/Core/ViewConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,13 @@ 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 '';
}
}

/**
Expand Down
Loading