VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: J3DI13 on October 28, 2013, 08:38:44 AM

Title: [SOLVED] Payment gateway only accepts one currency
Post by: J3DI13 on October 28, 2013, 08:38:44 AM
Good Day

Joomla 2.5 & VM2.0.24 

The payment gateway my client is with (MyGate) only accepts the South African ZAR as the payment currency.

Now my client would like to display all the product prices in dollars by default but the final checkout must display in the ZAR currency. I am using the Onepage checkout plugin.
i am now using the native virtuemart onepage checkout, seems to work a little better with MyGate.

My currency configuration is:
Vendor currency - US Dollar
Product Price - South African ZAR

I have been told by MyGate that the price must be sent through in this format 2190.10 instead of 2,190.10 as which is happening now. (Please see attached error.jpg) 

Completely stuck with this so any help would be greatly appreciated.

Thanks

[attachment cleanup by admin]
Title: Re: Payment gateway only accepts one currency
Post by: J3DI13 on October 29, 2013, 09:27:14 AM
Friendly little bump
Title: Re: Payment gateway only accepts one currency
Post by: jjk on November 06, 2013, 08:55:04 AM
Check the 'Thousands Seperator' in Configuration > Currrencies > South African Rand /United States Dollar. The field should be left blank in your case.
If that doesn't work, I would assume that the problem is in the payment plugin.
Title: Re: Payment gateway only accepts one currency
Post by: J3DI13 on November 06, 2013, 10:29:30 AM
Hi jjk

Thank you for the response, i have removed the thousand separator all together on both the Dollar and Rand but am still getting the same error. I have now decided  to look into the code
of the payment plugin but i am no expert when it comes to this. I did find a reference to the currency and added the USD to it but have no idea if i have done it correctly. please see below

/ *
$this->logInfo('Order #'.$details->order_number.' confirmed','message');

$mode = $method->test;
$merchant = $method->merchant;
$application = $method->application;
$reference = 'ORDER'.$details->order_number;
$amount = number_format($details->order_total,2);
$currency = 'ZAR';
$currency = 'USD';
$url = JROUTE::_(JURI::root ().'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on='.$details->order_number.'&pm='.$details->virtuemart_paymentmethod_id.'&Itemid='.JRequest::getInt('Itemid'));


Many thanks again
Title: Re: Payment gateway only accepts one currency
Post by: jjk on November 06, 2013, 20:46:43 PM
I would ask the provider of the payment plugin if that is a correct solution. I'm no code expert either.
Title: Re: Payment gateway only accepts one currency
Post by: J3DI13 on November 07, 2013, 07:07:15 AM
So i got hold of the developers and they said this and are looking into it now.

QuoteAfter adding it to the cart though and checking out, we did notice its amount was greater than 999, and for some reason a comma is being added to such amounts, much like 13,066.09.