mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
react-stripe-elements: fix handleCardSetup return type (#37339)
This returns a SetupIntent, not a PaymentIntent like handleCardPayment.
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
21040635fe
commit
83a75898be
+1
-1
@@ -51,7 +51,7 @@ export namespace ReactStripeElements {
|
||||
handleCardSetup(
|
||||
clientSecret: string,
|
||||
data?: stripe.HandleCardSetupOptions
|
||||
): Promise<stripe.PaymentIntentResponse>;
|
||||
): Promise<stripe.SetupIntentResponse>;
|
||||
}
|
||||
|
||||
interface InjectOptions {
|
||||
|
||||
@@ -300,7 +300,7 @@ class HandleCardSetup extends React.Component<InjectedStripeProps> {
|
||||
testHandleCardSetup = () => {
|
||||
this.props
|
||||
.stripe!.handleCardSetup('clientSecret')
|
||||
.then((response) => response.paymentIntent);
|
||||
.then((response) => response.setupIntent);
|
||||
}
|
||||
|
||||
testHandleCardSetupWithData = () => {
|
||||
@@ -312,7 +312,7 @@ class HandleCardSetup extends React.Component<InjectedStripeProps> {
|
||||
}
|
||||
},
|
||||
})
|
||||
.then((response) => response.paymentIntent);
|
||||
.then((response) => response.setupIntent);
|
||||
}
|
||||
|
||||
testHandleCardSetupWithError = () => {
|
||||
|
||||
Reference in New Issue
Block a user