-
Notifications
You must be signed in to change notification settings - Fork 943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move creating payment token to stripe.duck.js #1086
Conversation
9b39b29
to
c1f930a
Compare
src/ducks/stripe.duck.js
Outdated
}) | ||
.catch(e => { | ||
dispatch(stripePaymentTokenCreateError(e)); | ||
log.error(e, 'stripe-payment-form-submit-failed', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add handling for storable error
@@ -464,6 +468,10 @@ export class CheckoutPageComponent extends Component { | |||
paymentInfo={intl.formatMessage({ id: 'CheckoutPage.paymentInfo' })} | |||
authorDisplayName={currentAuthor.attributes.profile.displayName} | |||
showInitialMessageInput={showInitialMessageInput} | |||
onCreateStripePaymentToken={this.props.onCreateStripePaymentToken} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should just spread this onCreateStripePaymentToken
out of props similarly as the other ones.
@@ -306,6 +286,10 @@ StripePaymentForm.propTypes = { | |||
paymentInfo: string.isRequired, | |||
authorDisplayName: string.isRequired, | |||
showInitialMessageInput: bool, | |||
onCreateStripePaymentToken: func, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add .isRequired
flag here or add default values in StripePaymentForm.defaultProps
ad90856
to
b4949b1
Compare
b4949b1
to
3029d8d
Compare
No description provided.