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

Commit 9580eea

Browse files
prettier
1 parent f29ea72 commit 9580eea

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,9 @@ Within the wrapped component, the `stripe` and `elements` props have the type:
726726
type FactoryProps = {
727727
elements: null | {
728728
getElement: (type: string) => Element | null,
729-
// and other functions available on the `elements` object,
730-
// as officially documented here: https://stripe.com/docs/elements/reference#the-elements-object
729+
// For more detail and documentation on other methods available on
730+
// the `elements` object, please refer to our official documentation:
731+
// https://stripe.com/docs/elements/reference#the-elements-object
731732
},
732733
stripe: null | {
733734
createToken: (tokenData: {type?: string}) => Promise<{
@@ -744,22 +745,23 @@ type FactoryProps = {
744745
paymentMethod?: Object,
745746
error?: Object,
746747
}>,
747-
handleCardPayment: (
748+
confirmCardPayment: (
748749
clientSecret: string,
749-
paymentMethodData?: Object
750+
paymentIntentData?: Object
750751
) => Promise<{
751752
paymentIntent?: Object,
752753
error?: Object,
753754
}>,
754-
handleCardSetup: (
755+
confirmCardSetup: (
755756
clientSecret: string,
756-
paymentMethodData?: Object
757+
paymentIntentData?: Object
757758
) => Promise<{
758759
setupIntent?: Object,
759760
error?: Object,
760761
}>,
761-
// and other functions available on the `stripe` object,
762-
// as officially documented here: https://stripe.com/docs/elements/reference#the-stripe-object
762+
// For more detail and documentation on other methods available on
763+
// the `stripe` object, please refer to our official documentation:
764+
// https://stripe.com/docs/elements/reference#the-stripe-object
763765
},
764766
};
765767
```
@@ -811,9 +813,14 @@ reach all components.
811813
2. You can use the [`pure: false`][pure-false] option for redux-connect:
812814

813815
```jsx
814-
const Component = connect(mapStateToProps, mapDispatchToProps, mergeProps, {
815-
pure: false,
816-
})(injectStripe(_CardForm));
816+
const Component = connect(
817+
mapStateToProps,
818+
mapDispatchToProps,
819+
mergeProps,
820+
{
821+
pure: false,
822+
}
823+
)(injectStripe(_CardForm));
817824
```
818825

819826
[pure-false]:

demo/intents/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ class _HandleCardPayment extends React.Component<
171171
} else {
172172
this.setState({
173173
succeeded: true,
174-
message: `Charge succeeded! PaymentIntent is in state: ${payload.paymentIntent.status}`,
174+
message: `Charge succeeded! PaymentIntent is in state: ${
175+
payload.paymentIntent.status
176+
}`,
175177
});
176178
console.log('[PaymentIntent]', payload.paymentIntent);
177179
}
@@ -263,7 +265,9 @@ class _HandleCardSetup extends React.Component<
263265
} else {
264266
this.setState({
265267
succeeded: true,
266-
message: `Setup succeeded! SetupIntent is in state: ${payload.setupIntent.status}`,
268+
message: `Setup succeeded! SetupIntent is in state: ${
269+
payload.setupIntent.status
270+
}`,
267271
});
268272
console.log('[SetupIntent]', payload.setupIntent);
269273
}

0 commit comments

Comments
 (0)