Skip to content

Commit

Permalink
PSPAYPAL-798 - Take Over 793
Browse files Browse the repository at this point in the history
  • Loading branch information
nils.baczynski@fatchip.de authored and nils.baczynski@fatchip.de committed Oct 18, 2024
1 parent 394ec3d commit d5c52e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Controller/ProxyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ public function cancelPayPalPayment()
{
PayPalSession::unsetPayPalOrderId();
Registry::getSession()->getBasket()->setPayment(null);
Registry::getUtils()->redirect(Registry::getConfig()->getShopSecureHomeURL() . 'cl=payment', false, 301);
$redirect = Registry::getRequest()->getRequestParameter('redirect');
if ($redirect === "1" ) {
Registry::getUtils()->redirect(Registry::getConfig()->getShopSecureHomeURL() . 'cl=payment', false, 301);
}
exit;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Core/ViewConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function getPayPalPuiFlowId(): string
*/
public function getCancelPayPalPaymentUrl(): string
{
return $this->getSslSelfLink() . 'cl=oscpaypalproxy&fnc=cancelPayPalPayment';
return $this->getSslSelfLink() . 'cl=oscpaypalproxy&fnc=cancelPayPalPayment&redirect=1';
}

/**
Expand Down

0 comments on commit d5c52e5

Please sign in to comment.