Skip to content

Commit

Permalink
OX6-164 - Fixed PayPal payments with REDIRECT status from auth
Browse files Browse the repository at this point in the history
  • Loading branch information
FatchipRobert committed Dec 2, 2024
1 parent 463d2df commit f8a3bef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion extend/application/controllers/fcPayOneOrderView.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,13 @@ protected function _fcpoThrowException($sMessage)
* @param void
* @return void
*/
protected function _handlePayPalExpressCall($sPaymentId) {
protected function _handlePayPalExpressCall($sPaymentId)
{
if ($this->_oFcpoHelper->fcpoGetSessionVariable('blFcpoPayonePayPalExpressRetry') === true) {
$this->_oFcpoHelper->fcpoDeleteSessionVariable('blFcpoPayonePayPalExpressRetry');
$this->_oFcpoHelper->fcpoGetUtils()->redirect($this->_oFcpoHelper->fcpoGetConfig()->getCurrentShopUrl().'index.php?cl=thankyou', false);
}

$sWorkorderId = $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoWorkorderId');
if ($sWorkorderId) {
$oRequest = $this->_oFcpoHelper->getFactoryObject('fcporequest');
Expand Down
4 changes: 4 additions & 0 deletions extend/application/models/fcPayOneOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1876,6 +1876,10 @@ protected function _fcpoFlagOrderPaymentAsRedirect($blFlaggedAsRedirect = true)
*/
protected function _fcpoHandleAuthorizationRedirect($aResponse, $sRefNr, $sAuthorizationType, $sMode, $blReturnRedirectUrl)
{
if ($aResponse['status'] == 'REDIRECT' && in_array($this->oxorder__oxpaymenttype->value, [fcpopaypalhelper::PPE_EXPRESS, fcpopaypalhelper::PPE_V2_EXPRESS])) {
$this->_oFcpoHelper->fcpoSetSessionVariable('blFcpoPayonePayPalExpressRetry', true);
}

$this->_fcpoFlagOrderPaymentAsRedirect();
$oConfig = $this->_oFcpoHelper->fcpoGetConfig();
$oUtils = $this->_oFcpoHelper->fcpoGetUtils();
Expand Down

0 comments on commit f8a3bef

Please sign in to comment.