Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

changing currency in variable to payment gateway


yogidegr8

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.

Link to comment
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.

Link to comment
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??

Link to comment
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://www.oscommerce.com/forums/index.php?sho...=0entry304135

 

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

Link to comment
Share on other sites

  • 4 years later...
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 ?

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...