Commit Graph
10 Commits
Author SHA1 Message Date
7e012dd544 [IMP] payment, *: replace providers with payment methods in payment forms
Before this commit, the payment providers (e.g., Stripe, Adyen...)
available for payment were displayed on the payment forms. The customer
had to select one to process their payment. After that, the customer had
to select their preferred payment method (e.g., Credit Card,
Bancontact...) from a list of payment methods supported by the selected
provider over which the website administrator had close to no control.
This was making the payment forms confusing because the payment methods
were displayed sometimes more than once, if at all, in a non-controlled
order, and behind the selection of a payment provider that customers
should not have to deal with.

As the payment method was selected in an iframe or directly on the
provider's website, the information on the selection payment method was
not available in Odoo. This posed many problems, among which were the
impossibility of assessing whether a specific feature (e.g.,
tokenization, refunds, manual capture...) was available, not being able
to easily identify payment tokens through the payment method logo,
listing available payment methods on the website, sorting and
fine-grained configuration of the available payment method, subpar
payment method-specific display on the payment form (e.g., PayPal that
requires displaying a "Pay with PayPal" button), etc.

In this commit, the payment providers are thus replaced by the payment
methods on the payment forms. All contextually available (depending on
the country, currency, requested feature...) payment methods are
displayed one after the other on a single-level list and in the order
configured by the website administrator. Each payment method is
"powered by" (i.e., linked) to a single payment provider: the first one,
by model order, to support it. This allows, for example, offering the
PayPal payment method through Mollie, which charges low processing fees,
while also offering Klarna through Stripe, which supports more payment
methods but charges higher processing fees.

While doing so, the two different payment forms, "Checkout" and
"Manage", are also merged together in a new, configurable case-by-case,
payment form that is entirely redesigned to offer a better user
experience.

After payment, the information on the selected payment method is saved
on the transaction and eventual payment record and updated with the
information received from the provider.

task-2882677

closes odoo/odoo#120446

Related: odoo/upgrade#5103
Related: odoo/documentation#5717
Related: odoo/enterprise#40666
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Anita (anko) <anko@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
Co-authored-by: Valeriya (vchu) <vchu@odoo.com>
2023-09-22 13:32:53 +00:00
Valeriya(vchu) cd887a8289 [FIX] payment_stripe: disable tokenisation that will not be supported
disable tokenisation of payment methods that use sepa debit because
it will not be supported in the future versions

closes odoo/odoo#132424

X-original-commit: df2a358fb22ed50d86bd655858785a31adf934a9
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-08-19 12:03:00 +02:00
Valentin Chevalier ac90aa077d [IMP] payment stripe: migrate to a direct payment flow
The Reserve Bank of India (RBI) issued a directive (amended subsequently
in December 2020 and March 2021) that introduces additional security
measures for recurring payments on India-issued cards. These measures
include:
    - Banks must register cardholders and create an e-mandate through a
      one-time process, using additional factor authentication (AFA)
      like 3D Secure (3DS).
    - Banks must alert cardholders at least 24 hours before charges take
      place and give them the ability to opt out of transactions.
    - Recurring transactions over 15,000 INR (or equivalent in other
      currencies) must go through AFA each time.

Stripe has worked with a partner platform to support that, but we must
manipulate the PaymentIntent and SetupIntent objects directly through
their dedicated API, which the Checkout API does not allow. Therefore,
we must now integrate with the Elements API and implement a direct
payment flow instead of the current payment with a redirection flow
powered by the Checkout API.

After this commit, Stripe will create an e-Mandate for every
Indian-based card newly saved in Odoo.

task-3322020

closes odoo/odoo#123573

Related: odoo/documentation#4719
Related: odoo/upgrade#4748
Related: odoo/enterprise#42196
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-19 13:13:13 +02:00
Valentin Chevalier 754570b1d8 [REF] payment(_stripe): cleanup express checkout implementation
Fine-tuning of c624ed5603.

task-3004118

closes odoo/odoo#103125

X-original-commit: 158bc7ef9e20c46a5e9870e70d76e866147662b0
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-12 04:35:48 +02:00
Thibault Libioulle 9eb8ea52e0 [IMP] website_payment: handle stripe supported countries
This commit warns company from countries not supported by Stripe to
activate Stripe from the settings page.

This commit also enable the Stripe Connect Onboarding from the website
settings page.

task-2789227

closes odoo/odoo#87562

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-06-28 18:25:00 +02:00
Valentin Chevalier 930b6860d7 [IMP] payment_stripe: support refund
Allows users of Stripe to refund their customers directly from Odoo.

task-2678763

closes odoo/odoo#92235

Related: odoo/documentation#2086
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-25 12:46:08 +02:00
Demesmaeker a6a8a669b9 [IMP] payment_stripe: manage async notifications
Some payments may be confirmed asynchronously, and we need to be aware
of their status, even if they are not in a "checkout session complete"
event. Relying on successful payment or setup intents instead manage
more use cases.

task-2733725

closes odoo/odoo#84150

Related: odoo/upgrade#3350
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-16 17:04:25 +01:00
Valentin Chevalier 18cb7e44db [IMP] payment_stripe: allow separate authorization and capture
Users who select Stripe as their payment acquirer will now have the
possibility to capture manually the amount later (e.g. when delivering
the product).

task-2278434

closes odoo/odoo#69598

Related: odoo/upgrade#3290
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-09 09:23:46 +00:00
Thibault Libioulle c5198b0bab [IMP] payment{,_stripe},{,website_}sale: improve stripe onboarding
This commit lighten payment onboarding form in order to take advantage
of the Stripe Connect Onboarding Flow. It integrates the Stripe
Onboarding using the IAP proxy.

Purpose
=======
Help users easily onboard with Stripe by using the Stripe Connect API.

Specifications
==============
During the payment onboarding, if the user selects Stripe, they will
start the Stripe Onboarding. (NB: The process uses a proxy that handles
the Stripe Onboarding calls and signs them with the Stripe Connect key)
1) A call is made through the proxy to get the Stripe account token;
2) A call is made through the proxy to get the Stripe account link which
   contains the URL of the Onboarding;
3) The user is redirected to the Stripe Onboarding;
4) The user completes the Stripe Onboarding;
5) The user comes back to the acquirer form of Stripe and is able to get
   their keys.
6) The user can directly create their webhook after having copied/pasted
   their API keys.

During the website sale onboarding, the user doesn't go through the
onboarding wizard but is directly prompted to activate their account.

Note that the Onboarding status isn't stored in the database so there is
no call to Stripe API to validate the account status.

API Documentation :
- Connect Onboarding: https://stripe.com/docs/connect/standard-accounts
- Webhook creation: https://stripe.com/docs/api/webhook_endpoints/create

task-2685160
task-2691213

closes odoo/odoo#84639

X-original-commit: 085f4af4e57c43127413585a8df5b3aa47843339
Related: odoo/enterprise#24376
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Thibault Libioulle (tle) <tle@odoo.com>
2022-02-15 16:51:24 +00:00
Prakash PrajapatiandAntoine Vandevenne 4bb840403b [REF] payment_stripe: migrate Stripe to the new payment API
This commits drops the direct payment flow supported by the SetupIntent
API in favor of the payment with redirection flow, supported by the
Checkout API only.

See the merge commit for more details.

task-2333040

Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2021-03-30 09:25:51 +02:00