From 54ee91d2e5e4546637390d02de04117c2947739e Mon Sep 17 00:00:00 2001 From: Jenni Nurmi Date: Thu, 16 May 2019 15:07:51 +0300 Subject: [PATCH 1/2] Fix bug in showing error message --- src/forms/StripePaymentForm/StripePaymentForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forms/StripePaymentForm/StripePaymentForm.js b/src/forms/StripePaymentForm/StripePaymentForm.js index 46b9bfa4..3ad1f621 100644 --- a/src/forms/StripePaymentForm/StripePaymentForm.js +++ b/src/forms/StripePaymentForm/StripePaymentForm.js @@ -241,8 +241,8 @@ class StripePaymentForm extends Component { this.cardContainer = el; }} /> - {stripePaymentTokenError && !submitInProgress ? ( - {stripePaymentTokenError} + {this.state.error && !submitInProgress ? ( + {this.state.error} ) : null} {initialMessage}
From e6250edfe4f7e0e432ac3529afb697842fb22dfd Mon Sep 17 00:00:00 2001 From: Jenni Nurmi Date: Thu, 16 May 2019 15:17:00 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d59777d8..9023b441 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,9 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2019-XX-XX -- [cghange] Use Final Form on `StripePaymentForm` for consistency. Note that card form Stripe +- [fix] Show error when typing credit card number if e.g. the number is invalid. Fixes bug that was + introduced in PR #1088. [#1092](https://github.com/sharetribe/flex-template-web/pull/1092) +- [change] Use Final Form on `StripePaymentForm` for consistency. Note that card form Stripe Elements in `StripePaymentForm` is not a Final Form field so it's not available trough Final Form but handled separately. [#1088](https://github.com/sharetribe/flex-template-web/pull/1088) - [change] Move Stripe SDK call from `StripePaymentForm` to `stripe.duck.js` for consistency.