RE: Selling in US and Canadian dollars

Ceres <[email protected]>
Newsgroups gmane.comp.web.oscommerce.general
Message-ID <59233a000e4c68c39b20815b725a544f@osCommerce-Forums>
This message was sent from: General Support
http://forums.oscommerce.com/viewtopic.php?p=227229#227229
----------------------------------------------------------------

I'm not sure if this would be overly useful to any of you, but I was having the same problem (dealing with US and CAD with Paysystems) and here is how I delt with it in code (with modifications to the Paysystems module):

Have a place to store some extra information
----------------------------------------------------

1. Make it so that you can have two account numbers inserted into the configuration table (for me this was a USD and CAD account number)

2. Added USD and CAD to the keys array


Submit the correct information
------------------------------------

1. Found out which currency the customer has selected

2. Find out what the total is in the customer selected currecy by multiplying the total in the default currency by the exchange rate

3. Pass the appropriate Paysystems ID to Paysystems (if the user has selected USD and the USD Paysystems merchant ID will be passed)

4. Pass the appropriate total to Paysystems (the total calculated in step 2)

I haven't tested my code extensively but it does end up submitting the correct total to the correct Paysystems merchant account. The only thing is that the exchange rate should be set to automatically update every hour or so to make sure that the exchange is as accurate as possible (using a currency update contribuation). As a result however, there will be slight errors in the price in currencies not set as default (ie. my default currency is CAD so USD will be slightly higher or lower as the exchange rate fluctuates every second).

If there are people interested in this I could post more detailed code elsewhere, or attempt to create a contribution.

[quote]That's what we will do for our client, since his product is $35CDN and he wants Amercans to pay $35US. [/quote]

If I am understanding your problem correctly, you should be able to set the exchage rate for CAD and USD to "0.00" and then make the changes I just posted and you should be able to do exactly that.

Ceres
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.