richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
219 stars 77 forks source link

Attempting to retrieve a setup intent should rederive the setup intent #123

Closed jon-armen closed 3 years ago

jon-armen commented 3 years ago

Is this a feature request or a bug report? Bug Report

What's gone wrong? Retrieving a Setup Intent is actually attempting to confirm a sepa debit

What was meant to happen? A setup Intent should be retrieved.

Steps to reproduce Attempting to retrieve setup intents actually tries to confirm

Other information

https://github.com/richnologies/ngx-stripe/blob/main/projects/ngx-stripe/src/lib/services/stripe-instance.class.ts

retrieveSetupIntent( clientSecret: string ): Observable<{ setupIntent?: SetupIntent; error?: StripeError; }> { return this.stripe.pipe( switchMap((stripe) => from(stripe.confirmSepaDebitSetup(clientSecret))), first() ); }

jon-armen commented 3 years ago

See #124 for a PR to resolve

richnologies commented 3 years ago

Thanks @jon-armen for the fix. Really appreciate it. New npm release comming today