dicko_md Posted November 8, 2011 Share Posted November 8, 2011 Hi Since I updated to the add on Discount Code 3.1 for osCommerce 2.3.1 when I go from the site where everything is in GBP it changes to USD on paypal. I have looked through all the files and cannot see anything that says USD or US$. Has this happened to anyone else ? I read that there is a script you can run to echo what is actually been sent to paypal.....is this true to see if its a paypal issue ? Any ideas/fixes would be greatly appreciated Martyn Quote Link to comment Share on other sites More sharing options...
Guest Posted November 8, 2011 Share Posted November 8, 2011 Martyn, In the /includes/languages/english.php file around line 40 you will see this: // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language) define('LANGUAGE_CURRENCY', 'USD'); Change it to GBP Also, ensure your PayPal account is setup to accept all currencies as USD is the default. Chris Quote Link to comment Share on other sites More sharing options...
Spirantho Posted December 14, 2011 Share Posted December 14, 2011 Hi, (First post here - so I hope it's right!) I had the same problem. I fixed it by going to catalog/ext/modules/payment/paypal/express.php. Find the new line added by the module: $params = array(); and change it to $params = array('CURRENCYCODE' => $order->info['currency']); It seems to override the old amount by creating a new array, and in doing so doesn't take into account the currency used. So the line after it: $response_array = $paypal_express->setExpressCheckout($params); uses the array which only has the amount in it. Hence PayPal defaults to USD as it's American. That's my understanding of it anyway! I have no idea how to notify the author of this bug (or indeed if I've actually found the correct fix but it seems ok so far!) Quote Link to comment Share on other sites More sharing options...
Guest Posted December 29, 2011 Share Posted December 29, 2011 I had the same problem and emailed the conributor. He gave me the fix: Thank you for your interest in our product. Please modify the catalog/ext/modules/payment/paypal/express.php file. Find: $params = array(); $params['AMT'] = $paypal_express->format_raw($order->info['total'], '', 1); Replace with: $params = array('CURRENCYCODE' => $order->info['currency']); $params['AMT'] = $paypal_express->format_raw($order->info['total']); Sincerely, The High Quality PHP Coding Team. Quote Link to comment Share on other sites More sharing options...
raj303 Posted April 30, 2012 Share Posted April 30, 2012 Hi Since I updated to the add on Discount Code 3.1 for osCommerce 2.3.1 when I go from the site where everything is in GBP it changes to USD on paypal. I have looked through all the files and cannot see anything that says USD or US$. Has this happened to anyone else ? I read that there is a script you can run to echo what is actually been sent to paypal.....is this true to see if its a paypal issue ? Any ideas/fixes would be greatly appreciated Martyn I wanted this bug as features. I set my currency as INR in english.php but when doing paypal express checkout it says currency not supported. ok, fine. I want currency should get converted automatically to USD when user use paypal express check out. how to do that? Quote Link to comment Share on other sites More sharing options...
Paul Baglin Posted May 2, 2012 Share Posted May 2, 2012 I had the same problem and emailed the conributor. He gave me the fix: Thank you for your interest in our product. Please modify the catalog/ext/modules/payment/paypal/express.php file. Find: $params = array(); $params['AMT'] = $paypal_express->format_raw($order->info['total'], '', 1); Replace with: $params = array('CURRENCYCODE' => $order->info['currency']); $params['AMT'] = $paypal_express->format_raw($order->info['total']); Sincerely, The High Quality PHP Coding Team. Was just looking for a solution to the problem as I've just installed 3.1 and this works perfectly, thanks! Quote Link to comment Share on other sites More sharing options...
frankcat Posted September 25, 2012 Share Posted September 25, 2012 Cannot find the above code on my page My file is paypal_express.php <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2009 osCommerce Released under the GNU General Public License */ chdir('../../../../'); require('includes/application_top.php'); require('../includes/modules/payment/paypal_express.php'); if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'test')) { if (defined(MODULE_PAYMENT_PAYPAL_EXPRESS_STATUS)) { $paypal_express = new paypal_express(); $params = array('CURRENCYCODE' => DEFAULT_CURRENCY, 'AMT' => '1.00'); $response_array = $paypal_express->setExpressCheckout($params); if (($response_array['ACK'] == 'Success') || ($response_array['ACK'] == 'SuccessWithWarning')) { echo '<h1>Success!</h1>'; if (MODULE_PAYMENT_PAYPAL_EXPRESS_TRANSACTION_SERVER == 'Live') { echo '<p>The PayPal Express Checkout credentials have been set up correctly for live production use.</p>'; } else { echo '<p>The PayPal Express Checkout credentials have been set up correctly for the sandbox environment.</p>'; } } else { echo '<h1>Failure!</h1>'; if (MODULE_PAYMENT_PAYPAL_EXPRESS_TRANSACTION_SERVER == 'Live') { echo '<p>The PayPal Express Checkout credentials are not set up correctly for live production use.</p>'; } else { echo '<p>The PayPal Express Checkout credentials are not set up correctly for the sandbox environment.</p>'; } echo '<pre>'; var_dump($response_array); echo '</pre>'; } } else { echo '<p>The PayPal Express Checkout payment module is not yet installed. Please install it to verify your API credentials.</p>'; } } ?> Anyone help?? Cheers Martin Quote Link to comment Share on other sites More sharing options...
frankcat Posted September 26, 2012 Share Posted September 26, 2012 Any ideas????????? Quote Link to comment Share on other sites More sharing options...
elsmore1 Posted October 7, 2012 Share Posted October 7, 2012 Hi, I also have a problem when users click to buy a product from my site it appears as USD in paypal, although my site is in GBP. My site was set up by someone else and they have not replied yet to me, but I only have the \admin site to use, is this were I can amend the code? I have used the osCommerce site mainly to add products, so I did not set up from scratch. Thanks for any advice Quote Link to comment Share on other sites More sharing options...
AdamArscott Posted November 3, 2012 Share Posted November 3, 2012 I had the same problem and emailed the conributor. He gave me the fix: Thank you for your interest in our product. Please modify the catalog/ext/modules/payment/paypal/express.php file. Find: $params = array(); $params['AMT'] = $paypal_express->format_raw($order->info['total'], '', 1); Replace with: $params = array('CURRENCYCODE' => $order->info['currency']); $params['AMT'] = $paypal_express->format_raw($order->info['total']); Sincerely, The High Quality PHP Coding Team. Thanks for this, I have applied this fix and it solved my problem. However I am having a problem that on the PayPal page it just shows the total, not the break down of shipping, tax etc. I am new to PHP but my guess would be in the $order->info['total'} part, do I need to add shipping, tax and discount to this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.