fix(deps): update dependency react-stripe-elements to v6
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| react-stripe-elements | 2.0.3 -> 6.1.2 |
Release Notes
stripe/react-stripe-elements
v6.1.2
Bug Fixes
- Fix a bug where the
elementsprop is not injected byinjectStripewhen using asyncStripeand mounting only aCardCvcElementorCardExpiryElement. (#519 )
v6.1.1
Changes
- Register package version with Stripe instance (#512)
v6.1.0
New Features
Added the auBankAccount and fpxBank elements. These elements will not have
automatic Element detection/insertion. To use them you will need to use
elements.getElement and pass them directly to other Stripe.js methods (e.g.
stripe.confirmFpxPayment):
const FpxForm = injectStripe(({stripe, elements}) => {
const handleSubmit = async (event) => {
event.preventDefault();
const {error} = await stripe.confirmFpxPayment('{{CLIENT_SECRET}}', {
payment_method: {
fpx: elements.getElement('fpxBank'),
},
});
};
return (
<form onSubmit={handleSubmit}>
<FpxBankElement accountHolderType="individual" />
<button>Pay</button>
</form>
);
});
v6.0.1
Version bump that fixes some typos, no changes.
v5.1.0
New Features
- Add support for accessing the underlying Element using refs via
getElement.
Bug Fixes
- Fix crash when trying to create element while unmounting. Thanks @CarsonF!
v5.0.1
Bug Fixes
- Fixes a bug where calling
stripe.createPaymentMethodwould error in IE.
v5.0.0
New Features
- React 16.9 compatibility.
Breaking Changes
- We replaced the internal use of deprecated
componentWillReceiveProps. This internal movement of logic between lifecycle methods is likely safe for almost all apps and should not require any changes.
v4.0.2
Bug Fixes
- Fixes a bug where calling
stripe.createPaymentMethodwould error in IE.
v4.0.1
Bug Fixes
- Fixes a bug where calling
stripe.handleCardPaymentwith only a client secret caused an error to be thrown.
v4.0.0
New Features
-
Renamed
CardCVCElementtoCardCvcElementwhich better mirrors the Elements API. We will keep the old component name around as an alias until 5.0.0. -
Added support for
stripe.handleCardSetupstripe.handleCardSetup( clientSecret: string, data?: Object ): Promise<{error?: Object, setupIntent?: Object}>
For more information, please review the Stripe Docs:
Deprecations
-
CardCVCElementhas been renamed toCardCvcElement.CardCVCElementwill be removed in version 5.0.0.
Breaking Changes
- If you were already using
handleCardSetupwithreact-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,
{}
);
v3.0.1
Bug Fixes
- Fixes a bug where calling
stripe.createPaymentMethodwould error in IE.
v3.0.0
New Features
-
added a changelog
-
added support for
stripe.handleCardPaymentandstripe.createPaymentMethod. These methods allow you to easily integrate Stripe's new Payment Intents API. LikecreateTokenandcreateSource, 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, data?: Object ): Promise<{error?: Object, paymentIntent?: Object}>For more information, please review the Stripe Docs:
Breaking Changes:
- If you were already using
handleCardPaymentorcreatePaymentMethodwithreact-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>
-
PostalCodeElementhas been removed. We suggest that you build your own postal code input.
Configuration
📅 Schedule: Branch creation - "before 3am on Monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.