Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / PayPal Express Checkout support / Express checkout in v1.3.8 do not contains new currency(MYR) supported by Paypal

Express checkout in v1.3.8 do not contains new currency(MYR) supported by Paypal

Locked
This thread is locked. New replies are disabled.
8 Nov 2009, 5:48 AM
#1
limcheewooi avatar

limcheewooi

New Zenner

Join Date:
Jun 2009
Location:
Malaysia
Posts:
4
Plugin Contributions:
0

Post #1 by limcheewooi

My zencart sells in MYR currency, however when checkout using paypal express checkout, the currency is converted to USD when charging customer. The fact that PAYPAL has now supporting MYR currency, there should be new option in "Payment > Paypal express checkout > Transaction Currency ( Selected Currency) so that the amount will not be converted to USD. Please let me know how to modify or is there any newer zencart add-ons to support this?:

8 Nov 2009, 6:42 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

2 edits to make to /includes/modules/payment/paypalwpp.php ... add the highlighted code as shown:

  1. Line 1334:

    function selectCurrency($val = '', $subset = 'EC') {
    $ec_currencies = array('CAD', 'EUR', 'GBP', 'JPY', 'USD', 'AUD', 'CHF', 'CZK', 'DKK', 'HKD', 'HUF', 'NOK', 'NZD', 'PLN', 'SEK', 'SGD', 'THB', 'MXN', 'ILS', 'PHP', 'TWD', 'BRL', 'MYR');
    $dp_currencies = array('CAD', 'EUR', 'GBP', 'JPY', 'USD', 'AUD');

  2. Line 934:

    $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_PAYPALWPP_CURRENCY', 'Selected Currency', 'Which currency should the order be sent to PayPal as? <br />NOTE: if an unsupported currency is sent to PayPal, it will be auto-converted to USD (or GBP if using UK account)<br /><strong>Default: Selected Currency</strong>', '6', '25', 'zen_cfg_select_option(array('Selected Currency', 'Only USD', 'Only AUD', 'Only CAD', 'Only EUR', 'Only GBP', 'Only CHF', 'Only CZK', 'Only DKK', 'Only HKD', 'Only HUF', 'Only JPY', 'Only NOK', 'Only NZD', 'Only PLN', 'Only SEK', 'Only SGD', 'Only THB', 'Only MXN', 'Only ILS', 'Only PHP', 'Only TWD', 'Only BRL', 'Only MYR'), ', now())");

After you've saved the changes to the file and uploaded it back to your server, then you'll need to go to Admin->Modules->Payment->PayPal Express Checkout ... and write down ALL your settings.
Then click the REMOVE (this will WIPE all those settings out). Then click "Install", and re-enter all your settings and password etc.
The new currency options will now appear.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.