Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

paypal changes from GBP to USD


dicko_md

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

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!)

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

  • 4 months later...

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 4 months later...

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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 4 weeks later...

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...