Jump to content

Archived

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

darrenultra

Force payment in default currency

Recommended Posts

Hey,

 

I have recently set up some extra currencies on our website, however I want all orders to be processed in GBP. Unfortunately Oscommerce tries to process the order in the currency the customer has selected.

 

I read that it should be possible to force the payment through in the default currency by adding this line to checkout_process.php:

 

//mod to set payment to default currency

$currency = DEFAULT_CURRENCY;

 

 

Therefore I added it so that the beginning of my checkout_process.php file looks like this:

 

<?php

/*

$Id: checkout_process.php,v 1.128 2003/05/28 18:00:29 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

require('includes/classes/http_client.php');

 

//mod to set payment to default currency

$currency = DEFAULT_CURRENCY;

 

Unfortunately Oscommerce still tries to use the selected currency rather than the default currency. As a result the payment fails (I only have GBP set up with my payment service provider, Sagepay). Does anyone have any ideas as to why this fix does not work for me?

 

Cheers

Daz

Share this post


Link to post
Share on other sites

@@darrenultra

 

in the admin area under configuration>> my store set this to TRUE

 

Switch To Default Language Currency

 

 

No need to edit ANY code.

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

Hi Chris,

 

Thanks for the reply.

 

I just tried setting it to true. Unfortunately that causes the currency to be displayed (and order processed) in USD. I would like the customer to be able to select the currency displayed (using the drop down box), and for all orders to be processed in the default currency (GBP). At present the customer can select the currency, however oscommerce tries to process the order in that currency too. I need to receive all payments in GBP.

 

Cheers,

Daz

Share this post


Link to post
Share on other sites

In chekout_payment.php file find code in form function:

tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL')

and change it to:

tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, 'currency='.DEFAULT_CURRENCY, 'SSL')


Need help? Please contact me:

Share this post


Link to post
Share on other sites

×