This repository has been archived by the owner on Mar 27, 2021. It is now read-only.
v4.0.0
New Features
-
Renamed
CardCVCElement
toCardCvcElement
which better mirrors the Elements
API. We will keep the old component name around as an alias until 5.0.0. -
Added support for
stripe.handleCardSetup
stripe.handleCardSetup( clientSecret: string, data?: Object ): Promise<{error?: Object, setupIntent?: Object}>
For more information, please review the Stripe Docs:
Deprecations
CardCVCElement
has been renamed toCardCvcElement
.CardCVCElement
will
be removed in version 5.0.0.
Breaking Changes
-
If you were already using
handleCardSetup
withreact-stripe-elements
, you
should upgrade your integration. This method will now automatically find and
use valid Elements.Old Way
<CardElement ... onReady={this.handleReady} /> handleReady = (element) => { this.setState({cardElement: element}) ; }; const {setupIntent, error} = await this.props.stripe.handleCardSetup( intent.client_secret, this.state.cardElement, {} );
New Way
<CardElement />; const {setupIntent, error} = await this.props.stripe.handleCardSetup( intent.client_secret, {} );