Jump to content

Paypal error 11812 - Invalid data


didkich

Recommended Posts

Error occurred:

Please try to contact the merchant:

  1. <b>PayPal response:</b>
  2. TIMESTAMP -> 2014-01-08T18:49:06Z
  3. L_ERRORCODE0 -> 11812
  4. L_SHORTMESSAGE0 -> Invalid Data
  5. L_LONGMESSAGE0 -> The value of Description parameter has been truncated.
  6. L_SEVERITYCODE0 -> Warning

« Back

I had set the module standart, i have default currencie and etc.... but there is this error in express checkout .... wtf ? help me please :(

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...

Hello everyone after two days of searching and finally contacting paypal Merchant Technical Support i found the answer.

My client's eshop was running in greek language. 

 

The problem:

Paypal says "Character length and limitations: 127 single-byte alphanumeric characters."

That means that the shortdescription must be truncated by the paypal module so it will not contain more than 127 characters. And that's what is already doing. The paypal module truncates the short description on 100 characters.

By default greek characters are double-byte characters and NOT single-byte on the utf-8 encoding.

 

So the result is that the paypal module sends a 200 character description on paypal.

 

The solution:

First, we check obvious settings like latest version of module .etc.

Then we go to our paypal module files on "our_root_folder/modules/paypal/express_checkout/"

We open the file process.php and find the lines

"$fields['L_PAYMENTREQUEST_0_DESC'.$index] = Tools::substr(strip_tags($product['description_short']), 0, 100).'...';"

 

and 

 

"$fields['L_PAYMENTREQUEST_0_DESC'.$index] = Tools::substr(strip_tags($discount['description']), 0, 100).'...';"

 

And we change those lines to

"$fields['L_PAYMENTREQUEST_0_DESC'.$index] = Tools::substr(strip_tags($product['description_short']), 0, 50).'...';"

 

and 

 

"$fields['L_PAYMENTREQUEST_0_DESC'.$index] = Tools::substr(strip_tags($discount['description']), 0, 50).'...';"

 

-------------------------------------------------------

As you can see i changed the truncated length from 100 characters to 50.

So it worked for me that way.

 

Good luck to everyone

Giorgos

  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...

Giorgos,

 

Thank you very much for your patch! B)

I had the same problem in 1.6.0.6 with the Paypal module 3.6.8

My site had the same problem as descriptions are in Hebrew.

 

I made the changes to the express_checkout/process.php and it worked.

 

BTW, did you submit a ticket for this bug?

 

Thanks!

Javier

  • Like 1
Link to comment
Share on other sites

Giorgos ..... chose a place and i will build your statue!!!!

Had the same problem since 1.5 , i did the fix of the above post

 

 

and it was working till i updated to 1.6

after that chaos spread all around presta...... error code 11812 returned unconditionally

 

anyways, all fixed now.

Thanx a million!!

Link to comment
Share on other sites

  • 2 months later...

Hello,

My site is running prestashop 2.5; Some clients are unable to pay and we receive an email with no details about the client name:

Error report from your module PayPalAPI

A customer has a problem with PayPalAPI module

PayPal response:
TIMESTAMP -> 2014-06-27T15: 27:21 Z
L_ERRORCODE0 -> 11812
L_SHORTMESSAGE0 -> Invalid Data
L_LONGMESSAGE0 -> The value of Description parameter has-been truncated.
L_SEVERITYCODE0 -> Warning

Do you have a track to suggest?

Link to comment
Share on other sites

  • 8 months later...

This can happen if you are using non-english characters in your product description.
 
PayPal accepts up to 127 characters for this field and UTF-8 may use up to 6 bytes per character.
 
So the solution is to change the length from 50 to 20 in /modules/paypal/express_checkout/process.php around lines 291 and 310:

//$fields['L_PAYMENTREQUEST_0_DESC'.$index] = Tools::substr(strip_tags($product['description_short']), 0, 50).'...';
$fields['L_PAYMENTREQUEST_0_DESC'.$index] = Tools::substr(strip_tags($product['description_short']), 0, 20).'...';
Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...

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
×
×
  • Create New...