solidusio / solidus_stripe

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

Being able to customize the Stripe::PaymentIntent creation parameters #173

Closed loicginoux closed 1 year ago

loicginoux commented 1 year ago

Desired Behavior

Currently payment intent is created with basic options (see code) It would be good to support a way to customize it easily. There are a lot more options in Stripe doc for intent creation and people will want to use them at some point. I Imagine, at least to have the Hash parameter extracted in a controller method (easily overwritten) or in a separate service like the example from this PR

elia commented 1 year ago

@loicginoux #prepare_for_payment will create a payment intent if missing and accepts a hash that will be forwarded to the payment intent creation, would that be enough for you?

https://github.com/solidusio/solidus_stripe/blob/4bcc604d48f3f62e5d984b3c75b9a447eee3aa80/lib/generators/solidus_stripe/install/templates/app/views/orders/payment_info/_stripe.html.erb#L9

loicginoux commented 1 year ago

Yes I saw that, that resolves my issue ! Closing it. Thx