@@ -493,8 +493,6 @@ protected function _fcpoFinalizeOrder($oBasket, $oUser, $blRecalculatingOrder) {
493
493
$ this ->_blFinishingSave = true ;
494
494
$ this ->save ();
495
495
496
- $ this ->_fcpoSaveAfterRedirect ($ blSaveAfterRedirect );
497
-
498
496
// deleting remark info only when order is finished
499
497
$ this ->_oFcpoHelper ->fcpoDeleteSessionVariable ('ordrem ' );
500
498
$ this ->_oFcpoHelper ->fcpoDeleteSessionVariable ('stsprotection ' );
@@ -526,6 +524,8 @@ protected function _fcpoFinalizeOrder($oBasket, $oUser, $blRecalculatingOrder) {
526
524
oxNew (\OxidEsales \Eshop \Core \Counter::class)->update ($ this ->_getCounterIdent (), $ this ->oxorder__oxordernr ->value );
527
525
}
528
526
527
+ $ this ->_fcpoSaveAfterRedirect ($ blSaveAfterRedirect );
528
+
529
529
$ this ->_oFcpoHelper ->fcpoDeleteSessionVariable ('fcpoordernotchecked ' );
530
530
$ this ->_oFcpoHelper ->fcpoDeleteSessionVariable ('fcpoWorkorderId ' );
531
531
@@ -960,10 +960,10 @@ protected function _fcpoFinishOrder($blRecalculatingOrder, $oUser, $oBasket, $oU
960
960
* @param bool $blSaveAfterRedirect
961
961
* @return void
962
962
*/
963
- protected function _fcpoSaveAfterRedirect ($ blSaveAfterRedirect )
963
+ protected function _fcpoSaveAfterRedirect ($ blSaveAfterRedirect )
964
964
{
965
- if ($ blSaveAfterRedirect === true ) {
966
- $ sQuery = "UPDATE fcpotransactionstatus SET fcpo_ordernr = ' {$ this ->oxorder__oxordernr ->value }' WHERE fcpo_txid = ' " . $ this ->_oFcpoHelper -> fcpoGetSessionVariable ( ' fcpoTxid ' ) . "' " ;
965
+ if ($ blSaveAfterRedirect === true && ! empty ( $ this -> oxorder__fcpotxid -> value ) ) {
966
+ $ sQuery = "UPDATE fcpotransactionstatus SET fcpo_ordernr = ' {$ this ->oxorder__oxordernr ->value }' WHERE fcpo_txid = ' " . $ this ->oxorder__fcpotxid -> value . "' " ;
967
967
$ this ->_oFcpoDb ->Execute ($ sQuery );
968
968
}
969
969
}
@@ -1665,8 +1665,24 @@ public function fcIsPayPalOrder()
1665
1665
$ blReturn = false ;
1666
1666
if (in_array ($ this ->oxorder__oxpaymenttype ->value , [
1667
1667
'fcpopaypal ' ,
1668
- 'fcpopaypalv2 ' ,
1669
1668
fcpopaypalhelper::PPE_EXPRESS ,
1669
+ ])) {
1670
+ $ blReturn = true ;
1671
+ }
1672
+ return $ blReturn ;
1673
+ }
1674
+
1675
+ /**
1676
+ * Method checks via current paymenttype is of payone paypal V2 type
1677
+ *
1678
+ * @param void
1679
+ * @return boolean
1680
+ */
1681
+ public function fcIsPayPalV2Order ()
1682
+ {
1683
+ $ blReturn = false ;
1684
+ if (in_array ($ this ->oxorder__oxpaymenttype ->value , [
1685
+ 'fcpopaypalv2 ' ,
1670
1686
fcpopaypalhelper::PPE_V2_EXPRESS ,
1671
1687
])) {
1672
1688
$ blReturn = true ;
@@ -1860,6 +1876,10 @@ protected function _fcpoFlagOrderPaymentAsRedirect($blFlaggedAsRedirect = true)
1860
1876
*/
1861
1877
protected function _fcpoHandleAuthorizationRedirect ($ aResponse , $ sRefNr , $ sAuthorizationType , $ sMode , $ blReturnRedirectUrl )
1862
1878
{
1879
+ if ($ aResponse ['status ' ] == 'REDIRECT ' && in_array ($ this ->oxorder__oxpaymenttype ->value , [fcpopaypalhelper::PPE_EXPRESS , fcpopaypalhelper::PPE_V2_EXPRESS ])) {
1880
+ $ this ->_oFcpoHelper ->fcpoSetSessionVariable ('blFcpoPayonePayPalExpressRetry ' , true );
1881
+ }
1882
+
1863
1883
$ this ->_fcpoFlagOrderPaymentAsRedirect ();
1864
1884
$ oConfig = $ this ->_oFcpoHelper ->fcpoGetConfig ();
1865
1885
$ oUtils = $ this ->_oFcpoHelper ->fcpoGetUtils ();
0 commit comments