Jump to content
Sign in to follow this  
bobert

PayPal error, "The link you have used to enter the PayPal system contains an incorrectly formatted item amount."

Recommended Posts

I am working on getting my osCommerece site up and running and I have hit a snag. I am using 2.3.1, and the only contribution or edit I have made to a payment module is One Page Checkout for 2.3.1 (http://addons.oscommerce.com/info/7993) I have checked and double checked and I have installed it correctly. However, when I try to complete a purchase (sandbox or live) I get an error after I get redirected to paypal. "The link you have used to enter the PayPal system contains an incorrectly formatted item amount." However, when I disable one page checkout (in the admin panel, all the edits still intact) it works fine and redirects to paypal with the correct item info.

 

So my question is how do I go about debugging this? I would consider myself a proficient programmer, not so much in PHP, but enough I can get most of what I want done, but I have spent a solid 10 hours trying to solve this problem, and I am ready to through in the towel. I feel what I need to do is compare the data sent to paypal when OPC is enabled and disabled and see where the differences lie, but I am struggling to do so. Any help is greatly appreciated.

 

Nathan

Share this post


Link to post
Share on other sites

What is the actual PayPal payment module you are using? As you may know OsCommerce comes with 4 or 5 like PayPal Express, IPN, Payment Standard, then UK and US versions...

Anyway, what I would do is find out which module is being called.

Try and find the array that gets sent to PayPal and EMAIL it to yourself. Here's a command that will work on most pages:

 

tep_mail('Your Name', 'you@youraddress.com', 'PayPal submission', print_r($params, true), 'Your website name', 'sales@yourwebsite.com');

Just replace $params with whatever variable it is using -- in my case it was $params but it might be $parameters or something else.

 

If you get this right, it will email you the stuff it's sending PayPal.

You might see an obvious error, but if not you'll need to check the API requirements for that particular API call - it may require a particular format.

For example, in PayPal Express Checkout, it calls SetExpressCheckout and that API is documented here:

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_SetExpressCheckout

 

Good luck

Share this post


Link to post
Share on other sites

Anyone looking who has a similar problem, what fixed it for me was switching from using PayPal standard payments to paypal IPN

Share this post


Link to post
Share on other sites

I recommend you to collect the form that being posted to paypal.

Analyze that form or post that form here for further comments.

 

Satish


Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Share this post


Link to post
Share on other sites

Basic error no 1 is a full stop after the price or shipping. check that the price and shipping are correctly formatted and that the currency is correct.

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  

×