Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Passing Payment Problem (Removal of Comma from Total Money Value)


mockba

Recommended Posts

I'm facing a real problem when passing total money amounts that are greater than $999 because the values passed are in the following format $x,xxx.x (with the comma in between) while it is supposed to be $xxxx.xx which is acceptable by 2checkout. How can I fix this value what file should I modify, Is there any existing contribution that takes care of this problem??

 

Appreciate any help,

this is the link of my previous post

http://www.oscommerce.com/forums/index.php?showtopic=301855

Link to comment
Share on other sites

Thanks, but unfortunately this didn't work I still get a "Parameter Error."

 

What happens was the following it actually removed the comma from the price but that was done only on the display level, but when I checked the actual values that will be transmitted the comma was still there

 

From the checkout_confirmation.php file source

<input type="hidden" name="sid" value="xx"><input type="hidden" name="total" value="1,778.75"><input type="hidden" name="cart_order_id" value="20080518230538"><input type="hidden" name="fixed" value="Y"><input type="hidden" name="card_holder_name" value="xx"> etc ...

 

Any suggestion how to remove this comma from the code?

Edited by mockba
Link to comment
Share on other sites

  • 1 year later...
  • 6 months later...

Go to includes/moudules/payment/pm2checkout.php

 

and go to line 82 and find this

 

tep_draw_hidden_field('total',number_format($order->info['total'],2)).

and replace by :

 

tep_draw_hidden_field('total',($order->info['total'])).

 

 

any luck solving this

 

i came across these solutions - which is better?

 

 

http://www.oscommerce.com/community/contributions,3540/category,all/search,2checkout

 

osCommerce: pm2checkout

Raj basnet

Kathmandu, Nepal

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