News:

Looking for documentation? Take a look on our wiki

Main Menu

Multiple currencies (USD and EUR) with PayPal

Started by cristian607, March 28, 2011, 18:40:14 PM

Previous topic - Next topic

cristian607

Hello,

Are multiple currencies supported when using PayPal as payment provider? I am asking because I have tried to setup such a configuration; it is not working so I don't know if it's a bug, new feature, existing feature with bad configuration.

Details: the primary currency is USD; I have also enabled EUR (both in VirtueMart and in the PayPal sandbox account). I change the current currency to EUR in the shop frontend. When I checkout the cart (i.e. redirected to the PayPal server), I see that the amount is correctly sent from VirtueMart to PayPal, but the currency is not. It is showing USD, instead of EUR.

If I click on buy, I get an error:
Error: Error - Paypal did not complete the transaction - FAILURE - SHORTMESSAGE =Transaction refused because of an invalid argument. See additional error messages for details. -
ERRORCODE =10444 -
LONGMESSAGE =The transaction currency specified must be the same as previously specified. -
&TOKEN=EC-2XK49869957047638&PAYERID=CDG8EZNGDUQ86&PAYMENTACTION=Sale&IPADDRESS=::1&NOTIFYURL=http%3A%2F%2Flocalhost%2Fshop%2Fadministrator%2Fcomponents%2Fcom_virtuemart%2Fnotify.php&CURRENCYCODE=EUR&DESC=&INVNUM=2483_723efb9ff069976&BUTTONSOURCE=Virtuemart_Cart_ECM&L_AMT0=71.27&L_QTY0=1&L_NAME0=Productx&ITEMAMT=71.27&AMT=71.27&TAXAMT=0&SHIPPINGAMT=0


As a first guess I'd say that at the first step the currency is not correctly set (and that's why I see USD instead of EUR). Then, at the second step (when clicking on Pay), the currency is indeed EUR and doesn't match with the initial one; => the above error.

Have you got any hints?

Best regards,
CS.

zanardi

Just a note: if you're using Sandbox, it only accepts USD.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

cristian607

Even if I have configured more currencies in the PayPal test account?

Best regards,
CS.

zanardi

That is what i believe. I had same issue and ended up finding something similar. IIRC you can find this in the support forum on PayPal site.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

cristian607

Hello Francesco,

I confirm that multiple currencies are possible with PayPal sandbox.

I am now using the "old" PayPal implementation, which is always sending currency_code=USD (in the query string sent to PayPal). This is due to the following line within the "Payment Extra Info" of the module:
"currency_code" => $_SESSION['vendor_currency'],

I am thinking in changing this line to:
"currency_code" => $GLOBALS['product_currency'],
which seems to work.

I have the following question: is this the correct way of getting the current currency? I have seen a different method: $GLOBALS['CURRENCY']. This is used for example in ps_product.php / show_price(). However this is undefined for the execution context of the "Payment Extra Info" code.

Best regards,
CS.

jameel

You can get paypal module for virtuemart multicurrency store, simply grape copy, upload and configure it and it does all you ned

http://www.itechshop.org/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&product_id=11
Virtuemart + Joomla extensions www.itechshop.org
get Paypal extended, payza extended, moneybookers extended module that let you use 98  currencies nonsupported paypal/alertpay/mb currencies on VM 1.1.x and convert them to supported one at www.itechshop.org

220+ domain extensions www.industechnologies.co

Georgios Kolomvos

Quote from: cristian607 on March 29, 2011, 16:58:37 PM
I am thinking in changing this line to:
"currency_code" => $GLOBALS['product_currency'],
which seems to work.

To make the Paypal payment method (the OLD one, not that using the API) work properly with multiple currencies do the following:

1) Add the following statement:

if (isset($_SESSION['product_currency'])) {
  $order_currency = $_SESSION['product_currency'];
}
else {
  $order_currency = $_SESSION['vendor_currency'];
};


Before the line:
$post_variables = Array(


2) Modify line:
"currency_code" => $_SESSION['vendor_currency'],
to:
"currency_code" => $order_currency,
Georgios Kolomvos
Patras, Greece

jameel

If you want to display 98 currencies on your website and accept paypal supported currencies you can visit, this module will convert any paypal unsupported currency into paypal supported one using google finance

http://www.itechshop.org/index.php?option=com_virtuemart&page=shop.product_details&flypage=flypage.tpl&product_id=19
Virtuemart + Joomla extensions www.itechshop.org
get Paypal extended, payza extended, moneybookers extended module that let you use 98  currencies nonsupported paypal/alertpay/mb currencies on VM 1.1.x and convert them to supported one at www.itechshop.org

220+ domain extensions www.industechnologies.co