React Stripe Elements Versions Save

Moved to stripe/react-stripe-js.

v6.1.2

4 years ago

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

4 years ago

Changes

  • Register package version with Stripe instance (#512)

v6.1.0

4 years ago

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

4 years ago

Version bump that fixes some typos, no changes.

v6.0.0

4 years ago

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

4 years ago

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!

v3.0.1

4 years ago

Bug Fixes

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

v4.0.2

4 years ago

Bug Fixes

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

v5.0.1

4 years ago

Bug Fixes

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

v5.0.0

4 years ago

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.