[FIX] payment_stripe: incorrect flow mentionned in readme

closes odoo/odoo#159788

X-original-commit: 5948e821ce87b78f74150184aa806a43429ae821
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
This commit is contained in:
Valentin Chevalier
2024-03-29 10:44:24 +00:00
parent 6f3c365018
commit 2f51b84313
+15 -5
View File
@@ -6,16 +6,26 @@ SDK: [Stripe.js](https://stripe.com/docs/js) version `3`
API: [Stripe API](https://stripe.com/docs/api) version `2019-05-16`
This module integrates Stripe using a custom implementation of the payment with redirection flow: no
redirect form is rendered and, instead, a Checkout Session object is created from the server before
the customer is redirected to the session's payment page from the front-end. This is achieved by
following the [Stripe-hosted page](https://stripe.com/docs/checkout/quickstart) guide.
This module relies on the Web Elements SDK to render the list of available payment methods and their
payment detail inputs on the payment form. The JS and CSS assets of the SDK are loaded on the pages
where the form is visible using a script tag.
When the Web Elements need to fetch/push information from/to Stripe or when a payment operation
(e.g., refund, offline payment) is executed from the backend, a server-to-server API call is made to
the appropriate API endpoint.
This is achieved by following the [Collect payment details before creating an Intent]
(https://docs.stripe.com/payments/accept-a-payment-deferred) guide. It is preferred over the
recommended "Payment Element" where payment intent is created beforehand because the
`payment.transaction` object doesn't exist yet when the form is rendered, so we don't have any
reference to communicate to Stripe. Also, all the methods to create Stripe objects
(e.g., intents or customers) are defined on the `payment.transaction`​ object.
The module also offers a quick onboarding thanks to the Stripe Connect platform solution.
## Supported features
- Payment with redirection flow
- Direct payment flow
- Webhook notifications
- Tokenization with or without payment
- Full manual capture