Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

currency problem.


Guest

Recommended Posts

Posted

Hi.

As far as I am aware, I have my store set up to defualt currency GBP british pounds.

When i did a test purchase it was returning an error. Having looked at the data sent over to my gateway company. It is sending the payment in USp.

I get an error from them saying check currency and transaction type.

 

Can anyone give me some pointers as to where I should be looking for the mistake.

 

Thanks

Posted

Hi Vger.

I've search the two configure.php files and it is not in there. Any other ideas?

 

Thanks for help help.

Posted
Hi Vger.

I've search the two configure.php files and it is not in there. Any other ideas?

 

Thanks for help help.

 

i also checked the english.php and it is not in either??

Posted

includes/languages/english.php

 

define('LANGUAGE_CURRENCY', 'USD');

 

It is a part of that file so you do need to look again.

 

Vger

Posted
includes/languages/english.php

 

define('LANGUAGE_CURRENCY', 'USD');

 

It is a part of that file so you do need to look again.

 

Vger

 

hi vger

 

this is the code from my english.php

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'GBP');

 

as you see, it is set correctly. i'm getting a bit baffled with it now.

Posted
hi vger

 

this is the code from my english.php

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'GBP');

 

as you see, it is set correctly.  i'm getting a bit baffled with it now.

 

 

I have changed the setting from "use default currency - to use any currency but i am getting the same error.

Posted
I have changed the setting from "use default currency - to use any currency but i am getting the same error.

 

Here is the line with the error in the data that is being sent to ProtX.

 

Crypt=VendorTxCode=??????????????????&Amount=0&Currency=USp&Description

 

Does anyone have any idea where it might be pulling the Currency=USp

Our account is only setup to accept payment in GBP and I cannot for the life of me, find where this string is coming from.

 

Thanks for your time guys.

Posted

I did have the same problem and I resolved it by changing this:

 

switch (MODULE_PAYMENT_PROTX_FORM_CURRENCY) {

case 'Default Currency':

$protx_currency = DEFAULT_CURRENCY;

break;

case 'Any Currency':

default:

$protx_currency = $currency;

break;

}

in the includes/modules/payment/protx_form.php to this:

 

switch (MODULE_PAYMENT_PROTX_FORM_CURRENCY) {

// case 'Default Currency':

// $protx_currency = DEFAULT_CURRENCY;

// break;

// case 'Any Currency':

// default:

// $protx_currency = $currency;

// break;

default:

$protx_currency = 'GBP';

break;

 

}

 

 

BUT!!!! Now I have a problem whereby protx is saying:

 

The minimum amount accepted for a transaction is 1.00.

 

ARGHHHH!!!!! We'll get there ;)

Posted
The minimum amount accepted for a transaction is 1.00.

 

 

And that to was a problem with the currency. Im all up and running now so it can be done. In the end I had to decrypt the $crypt variable and my form was sending the Amount as 0. You can fix this by looking at the number_format function in that file when the script is compiling the $plain string, basically take out the class lookup by replacing:

 

$plain .= "Amount=" . number_format($order->info['total'] * $currencies->get_value($protx_currency), $currencies->get_decimal_places($protx_currency)) . "&";

 

with this:

 

$plain .= "Amount=" . number_format($order->info['total'],2) . "&";

 

Your next problem will be getting Protx to give you test credit card numbers - you'll see what I mean ;)

 

Good luck people...

 

ME

Posted
And that to was a problem with the currency.  Im all up and running now so it can be done.  In the end I had to decrypt the $crypt variable and my form was sending the Amount as 0.  You can fix this by looking at the number_format function in that file when the script is compiling the $plain string, basically take out the class lookup by replacing:

 

$plain .= "Amount=" . number_format($order->info['total'] * $currencies->get_value($protx_currency), $currencies->get_decimal_places($protx_currency)) . "&";

 

with this:

 

$plain .= "Amount=" . number_format($order->info['total'],2) . "&";

 

Your next problem will be getting Protx to give you test credit card numbers - you'll see what I mean ;)

 

Good luck people...

 

ME

 

Damn!!!!!!

I really thought that was going to sort it for me then. I searched the file for the strings and it wasn't there????

Posted
Damn!!!!!!

I really thought that was going to sort it for me then. I searched the file for the strings and it wasn't there????

 

 

Does anybody else have any ideas where it is pulling currency=USp from?

I am struggling here

 

Thanks Guys.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...