Skip to content

Update dependency react-stripe-elements to v3

Administrator requested to merge renovate/react-stripe-elements-3.x into master

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 code search for "react-stripe-elements"

Release Notes

stripe/react-stripe-elements

v3.0.0

Compare Source

New Features
  • added a changelog

  • added support for stripe.handleCardPayment and stripe.createPaymentMethod. These methods allow you to easily integrate Stripe's new Payment Intents API. Like createToken and createSource, 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 or createPaymentMethod with react-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

📅 Schedule: "on the 1st through 7th day of the month" in timezone America/Los_Angeles.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

🔕 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 Renovate Bot. View repository job log here.

Merge request reports

Loading