Closed jonwaldstein closed 1 year ago
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.
This issue still needs to be addressed.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.
This issue was closed because it has been stalled for an additional 14 days with no activity.
User Story
As an admin, I want my donor's Stripe customer ID to be specific to the account they were created in so that they can be a customer in multiple stripe accounts.
Details
Multiple Stipe account GiveWP has the ability to use different Stripe accounts. From what I can tell, our donor meta does not account for this - meaning anytime a donor uses stripe for a donation, the customer ID for that account is saved to their meta - overwriting the previous value. We should really have an identifier for that customer ID that connects back to the specific stripe account it's for. That could be something like a key / value pair with the stripe account as the key and customer ID as the value:
Another option we have discussed, is not saving the customer ID at all. That would depend on if we are using the ID elsewhere, but since we have to hit the Stripe api to retrieve the customer anyway, we can just run a search instead (more on this next).
Stripe API & searching Newer versions of the Stripe api feature a search functionality. This would be a much better use case for us when try to retrieve a customer record. As pointed out earlier, the only way to know if a customer does not exist is by catching a _resourcemissing exception. Searching for a customer based on ID and/or email appears to be a more appropriate way of looking up a customer.
This does require updating our stripe sdk and api version.
Additional Context
Related: https://github.com/impress-org/givewp-next-gen/pull/122
Acceptance Criteria