Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.x] Set payment confirm options #1516

Merged
merged 4 commits into from
Mar 30, 2023
Merged

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Mar 29, 2023

Resolves #1515

Right now, when a payment intent is confirmed, it'll fail for payment methods like SEPA because they require additional options. I don't want to fiddle with the public API of the methods using the HandlesPaymentFailures trait so instead I'm opting to add a new way to set additional options when confirming payment intents.

Example usage:

$subscription->withPaymentConfirmOptions(['mandate_data' => ...])->swap('price_xxx');

@driesvints driesvints changed the title Set payment confirm options [14.x] Set payment confirm options Mar 29, 2023
@thijskok
Copy link
Contributor

thijskok commented Mar 29, 2023

@driesvints Tested, this works like a charm 👍

Tweaked your example a little bit:

$subscription->withPaymentConfirmOptions(['mandate_data' => ...])->swap('price_xxx');

@driesvints
Copy link
Member Author

@thijskok thanks!

@driesvints driesvints marked this pull request as ready for review March 30, 2023 12:09
@taylorotwell taylorotwell merged commit 54b3cfd into 14.x Mar 30, 2023
6 checks passed
@taylorotwell
Copy link
Member

Renamed to withPaymentConfirmationOptions

@taylorotwell taylorotwell deleted the payment-confirm-options branch March 30, 2023 12:35
@thijskok
Copy link
Contributor

@thijskok thanks!

Thanks for your help @driesvints , much appreciated!

@thijskok
Copy link
Contributor

Renamed to withPaymentConfirmationOptions

@taylorotwell Little typo here: it's been renamed to witihPaymentConfirmationOptions. Do you want me to submit a PR or is it something you can fix yourself?

@driesvints
Copy link
Member Author

@thijskok fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to confirm Payment when using SEPA direct debit
3 participants