Skip to content

Commit

Permalink
OX6-164 - Fixed saveAfterRedirect function
Browse files Browse the repository at this point in the history
  • Loading branch information
FatchipRobert committed Dec 5, 2024
1 parent fe372d2 commit e3ae806
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extend/application/models/fcPayOneOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,6 @@ protected function _fcpoFinalizeOrder($oBasket, $oUser, $blRecalculatingOrder) {
$this->_blFinishingSave = true;
$this->save();

$this->_fcpoSaveAfterRedirect($blSaveAfterRedirect);

// deleting remark info only when order is finished
$this->_oFcpoHelper->fcpoDeleteSessionVariable('ordrem');
$this->_oFcpoHelper->fcpoDeleteSessionVariable('stsprotection');
Expand Down Expand Up @@ -526,6 +524,8 @@ protected function _fcpoFinalizeOrder($oBasket, $oUser, $blRecalculatingOrder) {
oxNew(\OxidEsales\Eshop\Core\Counter::class)->update($this->_getCounterIdent(), $this->oxorder__oxordernr->value);
}

$this->_fcpoSaveAfterRedirect($blSaveAfterRedirect);

$this->_oFcpoHelper->fcpoDeleteSessionVariable('fcpoordernotchecked');
$this->_oFcpoHelper->fcpoDeleteSessionVariable('fcpoWorkorderId');

Expand Down Expand Up @@ -960,10 +960,10 @@ protected function _fcpoFinishOrder($blRecalculatingOrder, $oUser, $oBasket, $oU
* @param bool $blSaveAfterRedirect
* @return void
*/
protected function _fcpoSaveAfterRedirect($blSaveAfterRedirect)
protected function _fcpoSaveAfterRedirect($blSaveAfterRedirect)
{
if ($blSaveAfterRedirect === true) {
$sQuery = "UPDATE fcpotransactionstatus SET fcpo_ordernr = '{$this->oxorder__oxordernr->value}' WHERE fcpo_txid = '" . $this->_oFcpoHelper->fcpoGetSessionVariable('fcpoTxid') . "'";
if ($blSaveAfterRedirect === true && !empty($this->oxorder__fcpotxid->value)) {
$sQuery = "UPDATE fcpotransactionstatus SET fcpo_ordernr = '{$this->oxorder__oxordernr->value}' WHERE fcpo_txid = '".$this->oxorder__fcpotxid->value."'";
$this->_oFcpoDb->Execute($sQuery);
}
}
Expand Down

0 comments on commit e3ae806

Please sign in to comment.