Skip to content

Commit

Permalink
OX6-164 - Fixed problems with capture and double-redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
FatchipRobert committed Nov 26, 2024
1 parent c4471d6 commit 1dd39d0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/fcporequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -956,8 +956,6 @@ protected function addParametersOnlineTransaction($oOrder, $aDynvalue)

}

# protected function addInvoicePosition($sId, $dPrice, $sItemType, $iAmount, $sDesc, $dVat, $sCategoryUrl = false)

protected function addInvoicePosition($iIndex, $sId, $dPrice, $sItemType, $dItemAmount, $sDesc, $dVat)
{
$this->addParameter('id[' . $iIndex . ']', $sId);
Expand Down Expand Up @@ -1412,13 +1410,9 @@ protected function _fcpoAddRatePayParameters($oOrder, $aDynvalue)
}

/**
* Adding products from basket session into call
* Adding products from basket session into call
*
*
* @param void
* @param string $sDeliverySetId
* @return void
* @return object
*/
protected function _fcpoAddBasketItemsFromSession($sDeliverySetId = false)
Expand Down Expand Up @@ -1541,7 +1535,7 @@ protected function _fcpoGetCentPrice($mValue)
$dBruttoPricePosSum = $oPrice->getBruttoPrice();
$dAmount = $mValue->getAmount();
$dBruttoPrice = round($dBruttoPricePosSum/$dAmount, 2);
} else if (is_float($mValue)) {
} else if (is_numeric($mValue)) {
$dBruttoPrice = round($mValue, 2);
}

Expand Down Expand Up @@ -2397,7 +2391,11 @@ public function sendRequestGenericPayment($sPaymentType, $sWorkorderId = false)
$this->_fcpoAddBasketItemsFromSession();
}

$this->_addRedirectUrls('basket', false, 'fcpoHandlePayPalExpress');
$sRedirectFuntion = 'fcpoHandlePayPalExpress';
if ($sPaymentType == fcpopaypalhelper::PPE_V2_EXPRESS) {
$sRedirectFuntion = 'fcpoHandlePayPalExpressV2';
}
$this->_addRedirectUrls('basket', false, $sRedirectFuntion);

return $this->send();
}
Expand Down

0 comments on commit 1dd39d0

Please sign in to comment.