Jump to content
Sign in to follow this  
yogidegr8

changing currency in variable to payment gateway

Recommended Posts

I am using this contribution for intigrating Credit card payment from www.ccavenue.com

 

http://www.oscommerce.com/community/contributions,838/page,2

 

All is fine other than that now the amount has to be entered in INDIAN RUPEES to the secure server. But problem is like if someone shops for US$ 300 or EURO 300 then it only send 300 to server and its read as Indian Rupees 300.

 

What code shall we add so that at the time when our cart sends information to the server the amount is always calculated and sent in Indian rupees, may the buyer shop in any other currency???

 

I have indian currency installed in currency options in my osc cart at:

http://silvershop.shauryainternational.com

 

Also, what code shall I use and where so that the system adds 8% to the total amount if a buyer selects to pay by Credit card.

Share this post


Link to post
Share on other sites

In the most current version, I would try changing (around line 50 of includes/modules/payment/ccavenue.php):

  $Amount = $order->info['total'];

to

  $Amount = $currencies->format($order->info['total'], true, 'RUP');

Note: you may have to replace 'RUP' with the appropriate three letter code for Indian Rupees. I am not familiar with that currency, so I am not sure of the code. You also might have to add logic to strip out the currency symbol from this.

 

If that doesn't work for you, you could try looking at the currencies class directly and figuring the value using a variant of the code there.

 

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites

Thanks very much Matt,

 

;) by instinct I copied this from another module and pasted it in right place so it worked fine for me.:

 

tep_draw_hidden_field('Amount', number_format($order->info['total'] * $currencies->currencies['INR']['value'], $currencies->currencies['INR']['decimal_places'], '.', '')) .

 

This problem have solved, and thanks a lot for taking time out. But now I am getting one more problem, that when someone confirms the order and pays then I am not getting the order mail which was generated autometically.

 

what to do??

Share this post


Link to post
Share on other sites

I am now getting the payment but the database is not updating so not being able to know what the customers are ordering???? Please suggest what changes to do. You can see the cavenue.php file at this thread:

 

http://forums.oscommerce.com/index.php?sho...=0entry304135

 

I have tried my best to solve it but am not being able to reach that leval... Help is appriciated.

Share this post


Link to post
Share on other sites
Thanks very much Matt,

 

;) by instinct I copied this from another module and pasted it in right place so it worked fine for me.:

 

 

 

This problem have solved, and thanks a lot for taking time out. But now I am getting one more problem, that when someone confirms the order and pays then I am not getting the order mail which was generated autometically.

 

what to do??

 

 

I am also getting the same problem If you can tell where to change the code ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×