|
@@ -43,9 +43,8 @@ |
|
|
...mapActions('paymentMethods', ['addAccountPaymentMethod']), |
|
|
...mapActions('paymentMethods', ['addAccountPaymentMethod']), |
|
|
authorizeCard(e) { |
|
|
authorizeCard(e) { |
|
|
const comp = this; |
|
|
const comp = this; |
|
|
console.log('this.errors='+JSON.stringify(this.errors)); |
|
|
|
|
|
|
|
|
this.errors.clear(); |
|
|
window.stripe.createToken(this.card).then(function(result) { |
|
|
window.stripe.createToken(this.card).then(function(result) { |
|
|
console.log('authorizedCard: created token='+JSON.stringify(result.token)); |
|
|
|
|
|
if (result.error) { |
|
|
if (result.error) { |
|
|
console.log('authorizedCard: had errors: '+JSON.stringify(result.error)); |
|
|
console.log('authorizedCard: had errors: '+JSON.stringify(result.error)); |
|
|
self.hasCardErrors = true; |
|
|
self.hasCardErrors = true; |
|
@@ -54,7 +53,7 @@ |
|
|
} else { |
|
|
} else { |
|
|
comp.submitted = true; |
|
|
comp.submitted = true; |
|
|
comp.addAccountPaymentMethod({ |
|
|
comp.addAccountPaymentMethod({ |
|
|
userId: this.user.uuid, |
|
|
|
|
|
|
|
|
userId: comp.user.uuid, |
|
|
paymentMethod: { |
|
|
paymentMethod: { |
|
|
paymentMethodType: 'credit', |
|
|
paymentMethodType: 'credit', |
|
|
paymentInfo: result.token.id |
|
|
paymentInfo: result.token.id |
|
|