Skip to content

Commit

Permalink
improved error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mkreusch authored Nov 7, 2023
1 parent 29f9163 commit f0d56ab
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
$checkoutSessionId = $_GET['amazonCheckoutSessionId'];
$_SESSION['amazon_checkout_session'] = $checkoutSessionId;
$checkoutSession = $checkoutHelper->getCheckoutSession($checkoutSessionId);

if (!$checkoutSession || !$checkoutSession->getCheckoutSessionId()) {
\AlkimAmazonPay\GeneralHelper::log('warning', 'invalid amazon checkout session id on checkout_shipping', [$_SESSION['amazon_checkout_session'], $checkoutSession]);
xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));
}

$needsMainAddress = false;
if (!$accountHelper->isLoggedIn()) {
if(!$checkoutSession->getBuyer()){
Expand Down

0 comments on commit f0d56ab

Please sign in to comment.