News:

Looking for documentation? Take a look on our wiki

Main Menu

Currency FIX for Australia with PayPal Pro Express Checkout

Started by cgerraty, June 18, 2009, 02:55:17 AM

Previous topic - Next topic

cgerraty

I have recently had the problem of my checkout working perfectly with PayPal Express Checkout yet when the PayPal transaction occues Paypal seems to default the payment into USD.

Great for me... people buy a $10AUD item and Paypal gives me $10USD.. Not good for the customer.   

After an evening of scrounging through the posts here and then this morning fumbling through lines of PHP(a language till now I haven't tinkered with) I have found the problem!!!!!!

I edited the file:

/administrator/components/com_virtuemart/classes/payment/nvp_include/nvp_functions.php


In the "//Set Express Checkout" section I modified the CURRENCYCODE in the following line from USD to AUD:

$nvpreq = "&AMT=$orderT&PAYMENTACTION=$paymentAction&CURRENCYCODE=AUD&RETURNURL=$return......


I scrolled down to "//NVP DoExpressCheckout" and changed:

      $currency_type = "USD";    to     $currency_type = "AUD";

and I also did this change under the "//NVP DoDirectPayment Request" section aswell, even though I am not using the direct payments.


I have checked this live and it instantly fixed my problem.

I am sure this would also work for other currencies... Let me know if you find it a success !

I DON'T know why they would have HARD-CODED the Currency Type into this file.

-=-=-=-=
Chris Gerraty