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

Add support for SEPA direct debit payment method #38

Merged
merged 3 commits into from
Apr 2, 2021

Conversation

skress
Copy link
Contributor

@skress skress commented Mar 30, 2021

This PR adds support for SEPA direct debit.

The previous flow for credit cards which uses Stripe's Payment Intents API (1$ card auth which is later voided) does not work with SEPA direct debit, as SEPA direct debit can only be used with an automatic capture. To keep the overall amount of code as low as possible the credit card flow was also adapted such that there is only one flow for both payment methods. Instead of using the Payment Intents API the plugin now uses Setup Intents, i.e. the payment method is only setup for later payments.

When this PR is in a state to be merged, we need to change the version number of the plugin.

The previous flow for credit cards which uses Stripe's Payment Intents API (1$ card auth which is later voided) does not work with SEPA direct debit, as SEPA direct debit can only be used with an automatic capture. To keep the overall amount of code as low as possible the credit card flow was also adapted such that there is only one flow for both payment methods. Instead of using the Payment Intents API the plugin now uses Setup Intents, i.e. the payment method is only setup for later payments.
Copy link
Member

@pierre pierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for doing the work and running the tests on both accounts! 🎉

Just a few comments on the code, see below.

return buildAccount(currency, UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString(), UUID.randomUUID().toString().substring(0, 16), country);
}

// Currently needed as TestUtils.buildAccount does not create a valid e-mail address
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skress
Copy link
Contributor Author

skress commented Apr 1, 2021

The version number still needs to be updated. I can update the PR when you tell me which number the next release should get.

@pierre pierre merged commit e20d1f1 into killbill:master Apr 2, 2021
@pierre
Copy link
Member

pierre commented Apr 2, 2021

Thanks!

I've released 7.3.0.

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.

None yet

2 participants