feat: insufficant funds
This commit is contained in:
parent
72c8a4475c
commit
f5164624e0
|
|
@ -101,6 +101,10 @@ export class StripeService {
|
|||
await stripe.paymentIntents.cancel(paymentIntent.id as string);
|
||||
return true;
|
||||
} catch (err) {
|
||||
try {
|
||||
await stripe.paymentMethods.detach(paymentMethods.data[0].id);
|
||||
await stripe.subscriptions.cancel(event.data.object.id as string);
|
||||
} catch (err) {/*dont do anything*/}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue