odoo/odoo#198407

Created by Bugfix, Robin Engels (roen)
Merged at aebb9e39677d68b3edb4e19e10db81ea04d7007d

Statuses:

label
odoo-dev:18.0-opw-4446219-paypal_pos-roen
head
89d6585c779b026e3d249d83a4b94f14be4f1ac2
merged
7 months ago by Bugfix, Robin Engels (roen)
odoo/odoo
18.0 #198407
saas-18.1 #199103
saas-18.2 #199121
saas-18.3
saas-18.4
19.0
master #199131

[FIX] payment_paypal: fix payment from PoS

When making a payment from the PoS, the user would always be the Public
User. This would cause the payload sent to paypal to be incorrect and
the payment to fail.
This happens because we are trying to make a payment without any user,
so this can be reproduced in other workflows. Like making a donation

Steps to reproduce:

  • Setup paypal payment provider
  • Create a PoS payment method with the paypal provider
  • Create a PoS order and pay with the paypal payment method
    > Observation: You get an error saying that something is malformed

Alternative steps to reproduce:

  • Make sure you are not connected on Odoo
  • Go to the donation/pay url
  • Fill out the form and make the payment via paypal
    > Observation: You get an error saying that something is malformed

Why the fix:

When using the public user, we cannot provide an email address or a
country code. To fix this we make sure to not send the email address at
all when there is none available. And we send the country code of the
company instead of none.

opw-4446219