disable the button as soon as it is clicked
This commit is contained in:
parent
e8a50b0930
commit
70b928707f
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue