react-stripe-elements: fix handleCardSetup return type (#37339)

This returns a SetupIntent, not a PaymentIntent like handleCardPayment.
This commit is contained in:
Renaud Chaput
2019-08-08 10:25:12 -07:00
committed by Nathan Shively-Sanders
parent 21040635fe
commit 83a75898be
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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 = () => {