PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Incorrect formatted amount

  1. Sophie
    Member

    Hello,

    I have gone to implement the paypal system a second time into another website and have followed original instructions about upgrading and putting the php code into the functions.php file to get the paypal surcharge included into the amount.

    Before I put this code in the system was working fine but now when I click 'confirm' to go through to paypal it comes up with a paypal error which says "The link you have used to enter the PayPal system contains an incorrectly formatted item amount".

    The totalling amount is correct however (2.4% + 0.30 AUD).

    Any ideas? thanks for the help!

    Posted 12 years ago on Tuesday July 5, 2011 | Permalink
  2. When you remove your custom code, is the PayPal integration working correctly on that site? If so there is probably something going on with the custom code. That PayPal error occurs when the pricing values aren't formatted correctly.

    Posted 12 years ago on Tuesday July 5, 2011 | Permalink
  3. Sophie
    Member

    Hi again,

    I removed the code and the paypal worked as usual but then obviously the surcharge custom code was not included as required. I pasted in the original code I was shown to use http://pastie.org/2102201 put once saved the same error came up.

    I'm currently working on version 1.5.2.8 and paypal addon 1.2.3

    The other form I used this code with the other week on a different website is still functioning fine.

    Posted 12 years ago on Wednesday July 6, 2011 | Permalink
  4. Send us a WordPress admin login for the site having the issue and we can take a look at the code you have implemented and test the form itself. You can send this to us via our Contact Us form here: http://www.gravityforms.com/contact-us/ and reference this forum post when doing so.

    Posted 12 years ago on Wednesday July 6, 2011 | Permalink
  5. Sophie
    Member

    Hi again,

    Sorry to be a nuisance, just following this up as I am a couple days out from a deadline and am needing to get this sorted ASAP.

    Has there been any light shed on what may be causing the error?

    Posted 12 years ago on Wednesday July 13, 2011 | Permalink
  6. The issue is a rounding error with rounding the price of the surcharge. It's passing a value to PayPal that isn't rounded up to 2 decimal places and is instead passing 3 decimal places which PayPal doesn't like.

    We have updated the code being used on that site so that it rounds the number to 2 decimal places correctly and the problem is resolved.

    Posted 12 years ago on Wednesday July 20, 2011 | Permalink

This topic has been resolved and has been closed to new replies.