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

v6.1.2

21 Apr 17:19
Compare
Choose a tag to compare

Bug Fixes

  • Fix a bug where the elements prop is not injected by injectStripe when using async Stripe and mounting only a CardCvcElement or CardExpiry Element. (#519 )

v6.1.1

01 Apr 17:47
Compare
Choose a tag to compare

Changes

  • Register package version with Stripe instance (#512)

v6.1.0

14 Feb 18:32
Compare
Choose a tag to compare

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

13 Nov 18:43
Compare
Choose a tag to compare

Version bump that fixes some typos, no changes.

v6.0.0

13 Nov 18:37
91c465c
Compare
Choose a tag to compare

New Features

  • injectStripe now injects a reference to the Elements instance created by
    <Elements> as the prop elements.

The primary reason you would want an Elements instance is to use elements.getElement(), which provides an easy way to get a reference to an Element. You will need to get a reference to an Element to use confirmCardPayment, confirmCardSetup(), or createPaymentMethod().

Note that the old API for createPaymentMethod will continue to work and
provide automatic element injection, but we are updating documentation and
examples to use the new argument shape:

// old shape with automatic element detection - still works
this.props.stripe.createPaymentMethod('card').then(/* ... */);

// new shape without automatic element detection - recommended and 
// will work with new non-card PaymentMethods
this.props.stripe
  .createPaymentMethod({
    type: 'card',
    card: this.props.elements.getElement('card'),
  })
  .then(/* ... */);

Breaking Changes

  • We have removed the getElement method on RSE components that we introduced
    in v5.1.0 in favor of the above change. Sorry for the churn.

v5.1.0

22 Oct 19:57
Compare
Choose a tag to compare

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

18 Sep 22:18
Compare
Choose a tag to compare

Bug Fixes

  • Fixes a bug where calling stripe.createPaymentMethod would error in IE.

v4.0.2

18 Sep 22:33
Compare
Choose a tag to compare

Bug Fixes

  • Fixes a bug where calling stripe.createPaymentMethod would error in IE.

v3.0.1

18 Sep 22:52
Compare
Choose a tag to compare

Bug Fixes

  • Fixes a bug where calling stripe.createPaymentMethod would error in IE.

v5.0.0

27 Aug 19:45
Compare
Choose a tag to compare

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.