solidusio / solidus_stripe

💳 Integrate Solidus with Stripe
https://stripe.com
BSD 3-Clause "New" or "Revised" License
36 stars 62 forks source link

Allow admin to create payments using Stripe elements #279

Open rainerdema opened 1 year ago

rainerdema commented 1 year ago

Introduction

The goal of this issue is to allow the creation of new admin-side payments using the Solidus Stripe payment method by using the Stripe Elements partial interface (like what we're doing in the frontend-side.

Current Behavior

Currently, admins can only create new payment sources via the frontend and not the backend.

Desired Behavior

To allow the admin to create new payment source, a source form needs to be implemented for the Solidus Stripe Payment Method. This would allow adding a dedicated Stripe elements form with all the needed adjustments to allow the final Payment Intent authorization.

Possible Problems

We must consider that the specific source_form for a payment method is rendered in the payment step in the admin interface. This can change the usable scenario for the authorization and confirmation of the payment, implying a different approach from the one used for the frontend-side.

In this specific case, the best solution will probably be to manage the authorization (including next actions like 3DS authorizations) directly in the payment step since there isn't a straightforward way to currently hook into the admin confirm step.