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

[13.x] Support more payment method types #1074

Merged
merged 5 commits into from
Feb 26, 2021
Merged

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Feb 26, 2021

This PR provides support for all payment methods provided by Stripe. Thanks to @simonhir.

By allowing people to choose the type when calling the payment methods methods (phew!) they can cycle through the ones they need. Payment method types will be set as the card_brand on the customer record unless it's a card. In that case it will be the actual card brand. If a payment method type have a last4 param it'll be synced to the card_last_four.

$cards = $user->paymentMethods('card');
$sepaDebits = $user->paymentMethods('sepa_debit');

This does not include changes needed to be payment page which will need to be tackled in a different PR. There's already a PR from the past by @lsmith77 that looks promising: #893

Fixes #507

@driesvints driesvints marked this pull request as draft February 26, 2021 14:33
@driesvints driesvints linked an issue Feb 26, 2021 that may be closed by this pull request
@driesvints driesvints changed the title [13.x] Support more pm types [13.x] Support more payment method types Feb 26, 2021
@driesvints driesvints marked this pull request as ready for review February 26, 2021 15:38
@taylorotwell taylorotwell merged commit 8a1ccef into master Feb 26, 2021
@taylorotwell taylorotwell deleted the support_more_pm_types branch February 26, 2021 16:25
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.

Billable::cards does not return bank accounts
3 participants