Skip to content

Commit

Permalink
PLGCSCS-141: Switch method to format the price by currency, over the …
Browse files Browse the repository at this point in the history
…order total, within the order request
  • Loading branch information
Miguel-MultiSafepay authored and danielcivit committed Mar 9, 2023
1 parent eb73685 commit 748086c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/payments/multisafepay.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
$msp->transaction['id'] = $order_id;
$msp->transaction['currency'] = ($order_info['secondary_currency'] ? $order_info['secondary_currency'] : $processor_data['processor_params']['currency']);
$msp->cart->currency = $msp->transaction['currency'];
$msp->transaction['amount'] = fn_format_price_by_currency($order_info['total'], CART_PRIMARY_CURRENCY, CART_SECONDARY_CURRENCY) * 100;
$msp->transaction['amount'] = fn_format_price_by_currency_multisafepay($order_info['total'], CART_PRIMARY_CURRENCY, CART_SECONDARY_CURRENCY) * 100;
$msp->transaction['description'] = 'Order #' . $msp->transaction['id'];
$msp->transaction['items'] = $cart_items;
$msp->transaction['gateway'] = getGateway($processor_data['processor_params']['gateway']);
Expand Down Expand Up @@ -452,6 +452,9 @@
if (in_array($processor_data['processor_params']['gateway'], array('CBC', 'KBC', 'INGHOME', 'ALIPAY', 'PAYPAL'))) {
$url = $msp->startDirectXMLTransaction();
} elseif ($processor_data['processor_params']['gateway'] == 'IDEAL' && isset($order_info['payment_info']['issuer']) && $order_info['payment_info']['issuer'] != null) {
if (empty($msp->gatewayinfo['issuer'])) {
$msp->gatewayinfo['issuer'] = $order_info['payment_info']['issuer'];
}
$url = $msp->startDirectXMLTransaction();
} else {
$url = $msp->startCheckout();
Expand Down

0 comments on commit 748086c

Please sign in to comment.