diff --git a/assets/javascripts/discourse/components/stripe-card.js.es6 b/assets/javascripts/discourse/components/stripe-card.js.es6 index 606670b..14e50ca 100644 --- a/assets/javascripts/discourse/components/stripe-card.js.es6 +++ b/assets/javascripts/discourse/components/stripe-card.js.es6 @@ -52,15 +52,17 @@ export default Ember.Component.extend({ submitStripeCard() { let self = this; + self.set('transactionInProgress', true); + this.get('stripe').createToken(this.get('card')).then(data => { self.set('result', []); if (data.error) { self.set('result', data.error.message); + self.endTranscation(); } else { - self.set('transactionInProgress', true); let params = { stripeToken: data.token.id, diff --git a/plugin.rb b/plugin.rb index e41d108..50805b5 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,6 +1,6 @@ # name: discourse-donations # about: Integrating Discourse with Stripe for donations -# version: 1.11.0 +# version: 1.11.1 # url: https://github.com/choiceaustralia/discourse-donations # authors: Rimian Perkins