Skip to content
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

Merged
merged 5 commits into from
May 9, 2019

Conversation

OtterleyW
Copy link
Contributor

No description provided.

@OtterleyW OtterleyW force-pushed the create-payment-to-stripe-duck branch from 9b39b29 to c1f930a Compare May 9, 2019 10:11
@OtterleyW OtterleyW changed the title Move create payment to stripe.duck.js Move creating payment token to stripe.duck.js May 9, 2019
})
.catch(e => {
dispatch(stripePaymentTokenCreateError(e));
log.error(e, 'stripe-payment-form-submit-failed', {
Copy link
Contributor

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}
Copy link
Contributor

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,
Copy link
Contributor

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

@OtterleyW OtterleyW force-pushed the create-payment-to-stripe-duck branch from ad90856 to b4949b1 Compare May 9, 2019 12:57
@OtterleyW OtterleyW force-pushed the create-payment-to-stripe-duck branch from b4949b1 to 3029d8d Compare May 9, 2019 13:03
@OtterleyW OtterleyW merged commit 07cd93a into master May 9, 2019
@OtterleyW OtterleyW deleted the create-payment-to-stripe-duck branch May 9, 2019 13:09
@Gnito Gnito mentioned this pull request May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants