Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Releases: stripe-archive/react-stripe-elements

4.0.1

14 Aug 22:06
Compare
Choose a tag to compare

Bug Fixes

  • Fixes a bug where calling stripe.handleCardPayment with only a client secret
    caused an error to be thrown.

v4.0.0

11 Jul 10:54
Compare
Choose a tag to compare

New Features

  • Renamed CardCVCElement to CardCvcElement 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 to CardCvcElement. CardCVCElement will
    be removed in version 5.0.0.

Breaking Changes

  • If you were already using handleCardSetup with react-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.0

22 Apr 17:43
Compare
Choose a tag to compare

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

    // 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. Users are suggested to build their own
    postal code input.

v2.0.3

25 Jan 21:01
Compare
Choose a tag to compare
  • Fixes a bug where the elements.update event was triggered far too often, incorrectly, when an Element was repeatedly rendered with the same options (#304)
  • Actually is the expected release of master, fixing the bad release of v2.0.2.

v2.0.2

16 Jan 23:48
Compare
Choose a tag to compare

(This release was tagged mistakenly and should not be used. Sorry for the confusion.)

v2.0.1

11 Jul 20:59
@jez jez
Compare
Choose a tag to compare

Bug fixes

  • The Element higher-order component now reports a proper displayName,
    which is more useful for debugging. (Thanks @emilrose!)

    See #220 for more.

v2.0.0

01 Jun 17:58
Compare
Choose a tag to compare

New Features

  • Support for the IbanElement and IdealBankElement.

Breaking Changes

  • stripe.createSource now requires the Source type be passed in.

    For example, if you previously called stripe.createSource({ name: 'Jenny Rosen' }), you now must use stripe.createSource({ type: 'card', name: 'Jenny Rosen' }).

  • elementRef is no longer a valid prop you can pass to an <Element />. Use onReady instead to get a reference to the underlying Element instance.

v1.7.0

31 May 21:34
Compare
Choose a tag to compare

Deprecations

  • createSource automatically infers the type of Source to create based on which Elements are in use. This behavior is now deprecated, and the Source type will be required in version 2.0.0.

v1.6.0

05 Mar 22:05
@jez jez
Compare
Choose a tag to compare

Deprecations

  • The elementRef callback is deprecated and will be removed in version 2.0.0.
    • Use onReady instead, which is the exact same.

Bug fixes

  • The id prop from v1.5.0 was absent from the PaymentRequestButtonElement.
    Now, the PaymentRequestButtonElement behaves like all the other *Element
    components.

v1.5.0

02 Mar 18:56
@jez jez
Compare
Choose a tag to compare

New features

  • (#177 / #178) The *Element classes learned a new id prop. This can be
    used to set the ID of the underlying DOM Element.