Worldpay Payment - Experts Coding Help

Hi,



Our shop offers two types of currencies (USD and GBP).

Example: If user buys a same product, it costs $10 in USD and £8 in GBP



If a customer orders in GBP, there is no problem coz, our default currency at Worldpay is GBP. But customer orders in USD, and then he is getting charged $14 (£8 x Exchange rate). This is happening because, in the check out irrespective of what ever currency has been chosen, it is converting in to GBP and sending it to Worldpay gateway as GBP.



If USD is chosen check out should send USD and vice versa.



We have recently upgraded from v3.0.6 to 4.1.2 We had the same problem in January 2010 and CS Cart help desk offered amended code. Now they claim they are not offering any more such code changes and must go for a paid 3[sup]rd[/sup] party company.



The amended working code in ‘worldpay.php’ before version 4 was as below.



if ( !defined('AREA') ) { die('Access denied'); }
$_order_id = ($order_info['repaid']) ? ($order_id . '_' . $order_info['repaid']) : $order_id;
$s_id = Session::get_id();
$sess_name = SESS_NAME;
$currencies = Registry::get('currencies');
$currency = $currencies[CART_SECONDARY_CURRENCY];
$coefficient = db_get_field("SELECT coefficient FROM ?:currencies WHERE currency_code = 'USD'");
if ($currency['currency_code'] == "USD") {
$order_info['total'] = fn_format_price($order_info['total']/$coefficient);
//$processor_data['params']['currency'] = $currency['currency_code'];
$processor_data['params']['currency'] = "USD";
}




Does any one can help me in amending this code?



Thank you.

Any one got advice on this?