diff --git a/extend/application/controllers/fcPayOneOrderView.php b/extend/application/controllers/fcPayOneOrderView.php index c539ea1..2ce5bc0 100755 --- a/extend/application/controllers/fcPayOneOrderView.php +++ b/extend/application/controllers/fcPayOneOrderView.php @@ -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'); diff --git a/extend/application/models/fcPayOneOrder.php b/extend/application/models/fcPayOneOrder.php index 8d8e28a..56b5e58 100755 --- a/extend/application/models/fcPayOneOrder.php +++ b/extend/application/models/fcPayOneOrder.php @@ -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();