Commit Graph

13 Commits

Author SHA1 Message Date
Damien Bouvy de45880eb3
[FIX] payment_paypal: html-decode PDT responses
Courtesy of DynApps
2016-12-19 18:15:49 +01:00
Damien Bouvy 205b5542ca
[FIX] payment_paypal: accept PDT requests on /dpn route
It seems Paypal does not always send the same responses on auto-return
even when PDT is off. Although not reproducible on a Paypal sandbox,
sometimes the system auto-return to /payment/paypal/dpn without any
meaningful POST data. This seems to only happen with new accounts
that use the 'Hermes' web application of Paypal.

The correct thing to do would be to add a new field on the paypal
payment provider for PDT token and make the PDT flow available
to users; but this is a stable branch and this fix is already
sufficiently delicate. This shall be done in master though.

From this revision on, users can then activate PDT on their paypal
account, set the PDT token as an ir.config_parameter value (WITH
GROUP RESTRICTION SET TO ADMIN/SETTINGS GROUP!!!) and the system
will process these requests correctly.
2016-11-18 09:46:37 +01:00
Damien Bouvy 3e4206b4d4
[FIX] payment_paypal: accept GET requests for Paypal DPN
Although we have been reluctant to perform this change, a specific
use case can cause customers to be redirect to the Odoo DPN url
with a GET request.

This happens when a Paypal Merchant account has the feature Guest
Checkout active; in that case, a customer can pay without having
a Paypal account (using only his credit card) and will *not* be
subjected to auto-return; as detailed here:
https://www.sandbox.paypal.com/be/cgi-bin/webscr?cmd=p/pop/help-account-optional
Request coming from that payment flow will always trigger a GET
request, causing the customer to be welcomed by a
405 - Method Not allowed
error on the Odoo server. The payment is normally correctly processed
through IPN, so this does not normally causes loss of data; however
this is not a nice way to welcome back your customer right after
they pay you.
2016-09-12 09:24:38 +02:00
Denis Ledoux 786077d675 [FIX] payment_paypal: env field has been renamed with environment in 8.0
as env is a built-in orm variable.
2014-11-03 14:07:38 +01:00
Denis Ledoux 00ea919699 [FIX] payment_paypal: avoid json decode error
with post.pop('custom', '{}'), if the key 'custom' is not there, it will return '{}', but if the key is there, but the value is equivalent to False, the json decode will fail.
2014-09-03 15:19:26 +02:00
Denis Ledoux b0b9153cf7 [FIX] payment_paypal: SUPERUSER_ID removed by inadvertence in 1826f6d4ec 2014-08-07 11:54:30 +02:00
Denis Ledoux 1826f6d4ec [FIX] payment_paypal: use the validate url according to the acquirer env 2014-08-07 11:41:18 +02:00
Fabien Meghazi e974e1fbea [REM] remove disable_db and ensure_db() from addons
bzr revid: fme@openerp.com-20140130092308-s24a7h2mhzuaasf1
2014-01-30 10:23:08 +01:00
Fabien Meghazi c4e48e2388 [REM] Removed auth='admin' from modules
bzr revid: fme@openerp.com-20140129171520-wkz8ot4pa63utoi3
2014-01-29 18:15:20 +01:00
Denis Ledoux 0306adbfe3 [FIX] *: using werkzeug.url_encode instead of urllib.urlencode because urliblib.encode does not accept unicode
bzr revid: dle@openerp.com-20140129121316-b5f5e4r6fz9l80kq
2014-01-29 13:13:16 +01:00
Thibault Delavallée a7908b63bd [FIX] payment_*: fixed return controlers, now using werkzeug redirection
bzr revid: tde@openerp.com-20140124145923-fsyv2tm5z92m1je1
2014-01-24 15:59:23 +01:00
Thibault Delavallée b692aa1c78 [IMP] payment_paypal: route as admin (still got a db), remove website=True because
not usefull for acquirer communication route.

bzr revid: tde@openerp.com-20140123154833-0bd95v7w303tzyuq
2014-01-23 16:48:33 +01:00
Thibault Delavallée 0b69bad996 [RENAME] payment_acquirer_* -> payment_ *
bzr revid: tde@openerp.com-20140122175702-1h1e51z4njt4s70w
2014-01-22 18:57:02 +01:00