From 8f2ae033f1c2e0806e19a166bb9d8f20380de5a7 Mon Sep 17 00:00:00 2001 From: Jonathan Cobb Date: Fri, 17 Jan 2020 19:11:24 -0500 Subject: [PATCH] fix payment display and stripe error --- src/_helpers/router.js | 7 ++++++- src/account/payment/StripePayment.vue | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/_helpers/router.js b/src/_helpers/router.js index f506a37..c8fde2b 100644 --- a/src/_helpers/router.js +++ b/src/_helpers/router.js @@ -45,7 +45,12 @@ export const router = new Router({ children: [ { path: '', component: NetworksPage, - children: newNetworkChildren + children: [ + { + path: '', component: NewNetworkPage, + children: newNetworkChildren + }, + ] }, { path: '/me', component: ProfilePage }, { path: '/me/policy', component: PolicyPage }, diff --git a/src/account/payment/StripePayment.vue b/src/account/payment/StripePayment.vue index dae98e7..5488c3b 100644 --- a/src/account/payment/StripePayment.vue +++ b/src/account/payment/StripePayment.vue @@ -43,9 +43,8 @@ ...mapActions('paymentMethods', ['addAccountPaymentMethod']), authorizeCard(e) { const comp = this; - console.log('this.errors='+JSON.stringify(this.errors)); + this.errors.clear(); window.stripe.createToken(this.card).then(function(result) { - console.log('authorizedCard: created token='+JSON.stringify(result.token)); if (result.error) { console.log('authorizedCard: had errors: '+JSON.stringify(result.error)); self.hasCardErrors = true; @@ -54,7 +53,7 @@ } else { comp.submitted = true; comp.addAccountPaymentMethod({ - userId: this.user.uuid, + userId: comp.user.uuid, paymentMethod: { paymentMethodType: 'credit', paymentInfo: result.token.id