Paypal and odoo stumbling blocks

and how to get them out of the way

Benjamin Bachmann

What is the problem

When using odoo and its ecommerce online shop you can use different payment acquirers such as Paypal. But sometimes you will get errors and the order will get not through or get validated all the way, and this is not because you did something wrong in your code on your website. We had this problem a lot of other odoo developers too, as you can see on github.

We looked at the code and tried al lot of solutions for our customers, until we found the solution.

Here is an example what our logs showed then we tried to get the verification from Paypal then trying to to get an order through the Paypal acquirer :

As you can see all the necessary information are supplied but in the end we got an invalid verification on the data.

This means that the order is not automatically confirmed and you have to manually check if the customer has payed the order.

The solution

UTF-8 encoding

Many developers struggled with this problem and we tried a lot of solutions to fix this issue. We then found a comment on github that may have to do something with the encoding of the verification from Paypal.

The standard encoding that Paypal uses by default is windows-1252 and this does not fit odoo.

I provided some screenshots where to find this setting in your Paypal account.

First you have to go to your Profile Summary and then you have to choose Language Encoding

Here you have to choose More Options.

UTF-8 encoding

Encoding otions

Here you have to set the encoding to UTF-8 in order to get odoo working and to not get an invalid response back.

a successful order

After stetting the encoding to UTF-8 we did a test purchase using the Paypal acquirer and crossed our fingers. As you can see the log now showed no warnings and a validated data information in the end.

The odoo Sales backend also now gives you all the information such as transactions ids, sales confirmation, partner reference, and confirmed sales order.

If you stumbled also over this problem I hope you could use this solution and it helped you to solve your odoo/paypal problems.

Thanks to the odoo community and the community on githup to solve this issue.

About
Benjamin Bachmann

The Mac expert and code maniac/ Recently started his path into the python and Odoo world/ Likes his coffee cold, but we love him anyway.

Working one year abroad

Mercedes Scenna

Read Next

about us

We are an internet agency and Odoo partners based in Magdeburg, Germany with over 10 years of experience in e‑commerce, responsive design and development. We consider ourselves an A-team: small and efficient. With remote developers all across de world, we pride ourselves of our wide perspective and approach in every challenge, leading to the best customer-oriented solutions.