Update dependency react-stripe-elements to v3
Created by: renovate[bot]
This PR contains the following updates:
Package | Type | Update | New value | References | Sourcegraph |
---|---|---|---|---|---|
react-stripe-elements | dependencies | major | ^3.0.0 | source |
Release Notes
stripe/react-stripe-elements
v3.0.0
New Features
-
added a changelog
-
added support for
stripe.handleCardPayment
andstripe.createPaymentMethod
. These methods allow you to easily integrate Stripe's new Payment Intents API. LikecreateToken
andcreateSource
, these new methods will automatically find and use a corresponding Element when they are called.stripe.createPaymentMethod( paymentMethodType: string, paymentMethodDetails: Object ): Promise<{error?: Object, paymentIntent?: Object}> stripe.handleCardPayment( clientSecret: string, paymentMethodDetails: Object ): Promise<{error?: Object, paymentIntent?: Object}>
For more information, please review the Stripe Docs:
Breaking Changes:
- If you were already using
handleCardPayment
orcreatePaymentMethod
withreact-stripe-elements
, you should upgrade your integration. These methods will now automatically find and use valid Elements.
Old Way
<CardElement
...
onReady={this.handleReady}
/>
handleReady = (element) => {
this.setState({cardElement: element}) ;
};
let { paymentIntent, error } = await this.props.stripe.handleCardPayment(
intent.client_secret, this.state.cardElement, {}
);
New Way
<CardElement />;
let {paymentIntent, error} = await this.props.stripe.handleCardPayment(
intent.client_secret,
{}
);
- Passing a beta flag to Stripe.js to use one of the PaymentIntents betas is not supported.
Old Way
const stripe = window.Stripe(
publicKey,
{betas: ['payment_intent_beta_3']},
);
<StripeProvider stripe={stripe}>
<YourCheckoutComponent>
</StripeProvider>
New Way
<StripeProvider apiKey={publicKey}>
<YourCheckoutComponent>
</StripeProvider>
-
PostalCodeElement
has been removed. We suggest that you build your own postal code input.
Renovate configuration
rebase!
".
-
If you want to rebase/retry this PR, check this box
This PR has been generated by Renovate Bot. View repository job log here.