firebase / firebase/functions-samples
Stripe sample addPaymentMethodDetails is missing some logic
Open
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 3.8k
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
See https://github.com/firebase/functions-samples/blob/7eb43734bb88fb9ba9e859ae558f72b185377f28/stripe/functions/index.js#L61
In that line, `paymentMethod.customer` returned from `stripe.paymentMethods.retrieve()` may be a string, null, or a `Customer` object. The code should treat each of those cases separately when creating the `setupIntent` from it. Noticed that while porting it over to Typescript.
Contributor guide
Assessment
This issue has not been assessed yet.