fix: multiple same payment methods stored even though logic in place for SEPA
Bug Report
User Story
As a user, I want to store a SEPA payment method once if the same is used for the second time so that it doesn't create an unnecessary payment method for the Stripe customer.
Related to https://github.com/impress-org/givewp/issues/4313
Current Behavior
Currently, when I use same IBAN account number for one user for multiple donations then multiple payment methods are created for the same user having same IBAN account number
Expected Behavior
I expect to discuss this scenario with Stripe developers as to when fetching the payment method list via API I am getting empty results even though there is an IBAN account number payment method due to which this issue is present.
Bug Type
- [ ] This bug describes functionality that once worked as expected in version X.X.X.
- [ ] This bug describes functionality that never worked as expected.
- [x] I am not sure whether this functionality ever worked as expected.
Acceptance Criteria
- [ ] No multiple entries of payment method under customer when same IBAN account number is used for multiple donations of same email.
I see we're using the setup_future_usage payment intent argument for Stripe (SEPA) which in theory should work.
There is also these (newer) docs around the subject.
https://stripe.com/docs/payments/sepa-debit/set-up-payment
@DevinWalker do you have any recollection of this being an issue with customers? or is this just an optimization we've identified?
@kjohnson did you happen to run into this when you were migrating SEPA to the gateway api?
No recent feedback. Related to https://github.com/impress-org/givewp/issues/4313