Allow off_session payment intents for recurring payments

Created on 16 September 2020, almost 4 years ago
Updated 20 March 2023, over 1 year ago

Problem/Motivation

Currently the stripe gateway cannot handle off session payments, payments when the customer is not present in the checkout. This is because design was tightly coupled to the stripe_review checkout pane when the module was refactored for SCA.

This involves 3 inter-related current problems:
1. No way is provided to mark a payment intent as being off session (FIXED: #3259211: Provide more parameters to createPaymentIntent()
2. No way is provided to 'setup future usage' when a payment method is first registered.
3. When createPayment() is invoked on the Stripe gateway plugin (which is the only method Commerce Recurring calls) no payment intent is created or available (leading to 💬 Stripe\PaymentIntent instance has invalid ID Active ). (FIXED: Allow for payments without stripe review pane Fixed

There are a lot of different issues filed for this module around this area, and a lot of different possible ways to address them and rearchitect the whole payment intent process. The purpose of this issue is to provide a simple solution that:
- requires no serious alteration to the existing architecture
- is not disruptive to existing checkouts
- solves the needs of developers using Commerce Recurring
- facilitates more radical customisation or refactoring rather than blocking it

Steps to reproduce

1. Install commerce recurring and configure a recurring subscription product
2. Checkout the product, the initial order will be successful
3. Pass time and run cron, the subsequent orders will fail.

Proposed resolution

2. Provide a 'Setup future usage' setting on the stripe_review pane and pass the appropriate value when creating the intent on that pane
3.

Remaining tasks


2. Obtain maintainer agreement in principle

4. Commit

User interface changes

A new 'Setup future usage' setting on the Stripe Review pane

API changes

The interface for createPaymentIntent() is altered. It is preferable to provide a new array parameter that allows for the customising of any parameter of the intent, rather than gradually adding single parameters to the method that correspond to single parameters of the intent.

Data model changes

None.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom jonathanshaw Stroud, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024