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

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
dweedon-stripe committed Nov 13, 2019
1 parent f29ea72 commit 9580eea
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,9 @@ Within the wrapped component, the `stripe` and `elements` props have the type:
type FactoryProps = {
elements: null | {
getElement: (type: string) => Element | null,
// and other functions available on the `elements` object,
// as officially documented here: https://stripe.com/docs/elements/reference#the-elements-object
// For more detail and documentation on other methods available on
// the `elements` object, please refer to our official documentation:
// https://stripe.com/docs/elements/reference#the-elements-object
},
stripe: null | {
createToken: (tokenData: {type?: string}) => Promise<{
Expand All @@ -744,22 +745,23 @@ type FactoryProps = {
paymentMethod?: Object,
error?: Object,
}>,
handleCardPayment: (
confirmCardPayment: (
clientSecret: string,
paymentMethodData?: Object
paymentIntentData?: Object
) => Promise<{
paymentIntent?: Object,
error?: Object,
}>,
handleCardSetup: (
confirmCardSetup: (
clientSecret: string,
paymentMethodData?: Object
paymentIntentData?: Object
) => Promise<{
setupIntent?: Object,
error?: Object,
}>,
// and other functions available on the `stripe` object,
// as officially documented here: https://stripe.com/docs/elements/reference#the-stripe-object
// For more detail and documentation on other methods available on
// the `stripe` object, please refer to our official documentation:
// https://stripe.com/docs/elements/reference#the-stripe-object
},
};
```
Expand Down Expand Up @@ -811,9 +813,14 @@ reach all components.
2. You can use the [`pure: false`][pure-false] option for redux-connect:

```jsx
const Component = connect(mapStateToProps, mapDispatchToProps, mergeProps, {
pure: false,
})(injectStripe(_CardForm));
const Component = connect(
mapStateToProps,
mapDispatchToProps,
mergeProps,
{
pure: false,
}
)(injectStripe(_CardForm));
```

[pure-false]:
Expand Down
8 changes: 6 additions & 2 deletions demo/intents/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ class _HandleCardPayment extends React.Component<
} else {
this.setState({
succeeded: true,
message: `Charge succeeded! PaymentIntent is in state: ${payload.paymentIntent.status}`,
message: `Charge succeeded! PaymentIntent is in state: ${
payload.paymentIntent.status
}`,
});
console.log('[PaymentIntent]', payload.paymentIntent);
}
Expand Down Expand Up @@ -263,7 +265,9 @@ class _HandleCardSetup extends React.Component<
} else {
this.setState({
succeeded: true,
message: `Setup succeeded! SetupIntent is in state: ${payload.setupIntent.status}`,
message: `Setup succeeded! SetupIntent is in state: ${
payload.setupIntent.status
}`,
});
console.log('[SetupIntent]', payload.setupIntent);
}
Expand Down

0 comments on commit 9580eea

Please sign in to comment.