From 83a75898bef56166f495eca664a8a210238aee7d Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Thu, 8 Aug 2019 19:25:12 +0200 Subject: [PATCH] react-stripe-elements: fix handleCardSetup return type (#37339) This returns a SetupIntent, not a PaymentIntent like handleCardPayment. --- types/react-stripe-elements/index.d.ts | 2 +- types/react-stripe-elements/react-stripe-elements-tests.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/react-stripe-elements/index.d.ts b/types/react-stripe-elements/index.d.ts index b03b8b9f9b..ea8052c283 100644 --- a/types/react-stripe-elements/index.d.ts +++ b/types/react-stripe-elements/index.d.ts @@ -51,7 +51,7 @@ export namespace ReactStripeElements { handleCardSetup( clientSecret: string, data?: stripe.HandleCardSetupOptions - ): Promise; + ): Promise; } interface InjectOptions { diff --git a/types/react-stripe-elements/react-stripe-elements-tests.tsx b/types/react-stripe-elements/react-stripe-elements-tests.tsx index a6a46fd222..2fd3b52b88 100644 --- a/types/react-stripe-elements/react-stripe-elements-tests.tsx +++ b/types/react-stripe-elements/react-stripe-elements-tests.tsx @@ -300,7 +300,7 @@ class HandleCardSetup extends React.Component { testHandleCardSetup = () => { this.props .stripe!.handleCardSetup('clientSecret') - .then((response) => response.paymentIntent); + .then((response) => response.setupIntent); } testHandleCardSetupWithData = () => { @@ -312,7 +312,7 @@ class HandleCardSetup extends React.Component { } }, }) - .then((response) => response.paymentIntent); + .then((response) => response.setupIntent); } testHandleCardSetupWithError = () => {