Skip to content

[19.0][ADD] payment_payplug - #1376

Open
sbinfo67 wants to merge 2 commits into
OCA:19.0from
sbinfo67:19.0-add-payment_payplug
Open

sbinfo67 wants to merge 2 commits into
OCA:19.0from
sbinfo67:19.0-add-payment_payplug

Conversation

@sbinfo67

Copy link
Copy Markdown

Adds payment_payplug, an online payment provider for Payplug (France), built on the standard payment framework of Odoo 19.

Features

  • Card payment through the Payplug hosted payment page (redirect), from the website checkout and the customer portal (invoice payment, payment links).
  • Full and partial refunds from Odoo, plus refunds made in the Payplug portal (created in Odoo on notification, without duplicates).
  • Webhook (IPN) that never trusts the POST body: the payment is always re-read from the API before changing the transaction state. Idempotent, with amount/currency/reference/mode checks.
  • Two authentication methods: API key (JWT or legacy sk_) or OAuth2 client credentials (token cached in memory, renewed before expiry, replayed once on a 401).
  • EUR only. No extra Python dependency (requests).
  • French translation.

Not in this PR (roadmap in the module): saved cards (one click), instalments, deferred capture, Apple Pay, integrated payment form, authorization-code OAuth2 flow.

Testing

  • 69 automated tests (tag payment_payplug) against a fake Payplug server; they pass on Odoo 19 Community. No test calls the real API.
  • Tried against the real Payplug API in test mode and then in production: payment of an invoice with 3-D Secure, notification received, partial and full refunds, token refresh.

Author's repository where the module was developed: https://github.com/sbinfo67/odoo-payplug

I could not find a more fitting OCA repository for online payment providers (account-payment is about payment orders/returns); e-commerce already hosts modules extending payment.provider. Happy to move it elsewhere if reviewers prefer.

Online payment provider for Payplug (France): hosted payment page, invoice
payment from the portal, full and partial refunds, webhook (IPN) with
server-side re-reading of the payment, API key or OAuth2 client credentials
authentication, EUR only. No external Python dependency (requests only).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cover the remaining branches: uninstall hook, controller error paths,
webhook bodies without object or id, refund notifications (unknown
payment, inconsistent refund, lost response, refund in progress,
unconfirmed payment), payment and refund consistency checks, missing
payment page URL, OAuth2 token errors, non-JSON API errors, the status
refresh action, and the other providers left untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants