disable the button as soon as it is clicked

This commit is contained in:
Rimian Perkins 2017-05-29 10:48:32 +10:00
parent e8a50b0930
commit 70b928707f
2 changed files with 4 additions and 2 deletions

View File

@ -52,15 +52,17 @@ export default Ember.Component.extend({
submitStripeCard() { submitStripeCard() {
let self = this; let self = this;
self.set('transactionInProgress', true);
this.get('stripe').createToken(this.get('card')).then(data => { this.get('stripe').createToken(this.get('card')).then(data => {
self.set('result', []); self.set('result', []);
if (data.error) { if (data.error) {
self.set('result', data.error.message); self.set('result', data.error.message);
self.endTranscation();
} }
else { else {
self.set('transactionInProgress', true);
let params = { let params = {
stripeToken: data.token.id, stripeToken: data.token.id,

View File

@ -1,6 +1,6 @@
# name: discourse-donations # name: discourse-donations
# about: Integrating Discourse with Stripe for donations # about: Integrating Discourse with Stripe for donations
# version: 1.11.0 # version: 1.11.1
# url: https://github.com/choiceaustralia/discourse-donations # url: https://github.com/choiceaustralia/discourse-donations
# authors: Rimian Perkins # authors: Rimian Perkins