diff --git a/app/components/billing/first-plan.js b/app/components/billing/first-plan.js index 4f027e7ba1..526f9f6925 100644 --- a/app/components/billing/first-plan.js +++ b/app/components/billing/first-plan.js @@ -104,7 +104,6 @@ export default Component.extend({ isNewSubscription: not('subscription.id'), creditCardInfo: null, - creditCardOwner: null, creditCardInfoEmpty: computed('subscription.creditCardInfo', function () { return !this.creditCardInfo.lastDigits; @@ -124,12 +123,11 @@ export default Component.extend({ return text; }), - canActivate: computed('country', 'zipCode', 'address', 'creditCardOwner', 'city', 'stripeElement', 'billingEmail', function () { + canActivate: computed('country', 'zipCode', 'address', 'city', 'stripeElement', 'billingEmail', function () { let valid = (val) => !(val === null || val.trim() === ''); return valid(this.billingEmail) && valid(this.country) && valid(this.zipCode) && valid(this.address) && - valid(this.creditCardOwner) && this.stripeElement && - valid(this.city); + this.stripeElement && valid(this.city); }), createSubscription: task(function* () { @@ -201,25 +199,17 @@ export default Component.extend({ const plan = this.store.createRecord('v2-plan-config'); const billingInfo = this.store.createRecord('v2-billing-info'); const creditCardInfo = this.store.createRecord('v2-credit-card-info'); - let ownerName = this.creditCardOwner.trim(); - let idx = ownerName.lastIndexOf(' '); - if (idx > 0) { - this.firstName = ownerName.substr(0, idx); - this.lastName = ownerName.substr(idx + 1); - } else { - this.firstName = ''; - this.lastName = ownerName; - } let empty = (val) => val === null || val.trim() === ''; if (empty(this.lastName) || empty(this.address) || empty(this.city) || empty(this.zipCode) || - empty(this.country) || empty(this.billingEmail) + empty(this.country) || empty(this.billingEmail) || + empty(this.firstName) ) { throw new Error('Fill all required fields'); } billingInfo.setProperties({ - firstName: this.firstName, - lastName: this.lastName, + firstName: this.firstName.trim(), + lastName: this.lastName.trim(), address: this.address, city: this.city, company: this.company, diff --git a/app/components/billing/payment-details-tab.js b/app/components/billing/payment-details-tab.js index 6ad21586d6..8a84f89f60 100644 --- a/app/components/billing/payment-details-tab.js +++ b/app/components/billing/payment-details-tab.js @@ -68,9 +68,6 @@ export default Component.extend({ country: reads('billingInfo.country'), firstName: reads('billingInfo.firstName'), lastName: reads('billingInfo.lastName'), - nameOnCard: computed('firstName', 'lastName', function () { - return `${this.firstName || ''} ${this.lastName || ''}`; - }), hasLocalRegistration: reads('billingInfo.hasLocalRegistration'), isLoading: reads('updatePaymentDetails.isRunning'), @@ -154,14 +151,6 @@ export default Component.extend({ complete(stripeElement) { this.set('stripeElement', stripeElement); }, - modifyNameOnCard(value) { - this.set('nameOnCard', value); - let ownerName = this.nameOnCard.trim(); - this.billingInfo.setProperties({ - firstName: ownerName.split(' ')[0], - lastName: ownerName.split(' ')[1] - }); - }, onCaptchaResolved(reCaptchaResponse) { this.updatePaymentDetails.perform(reCaptchaResponse); }, diff --git a/app/templates/components/billing/first-plan.hbs b/app/templates/components/billing/first-plan.hbs index b4150e1c60..1d192a3601 100644 --- a/app/templates/components/billing/first-plan.hbs +++ b/app/templates/components/billing/first-plan.hbs @@ -8,12 +8,6 @@ @subscription={{this.subscription}} @account={{this.account}} @showPlansSelector={{true}} @showAddonsSelector={{false}} @next={{action 'closePlansModal' }} @showCancelButton={{this.showCancelButton}} /> -
- - - -
+ +
+ + + +
+ +
+ + + +
+
diff --git a/app/templates/components/billing/payment-details-tab.hbs b/app/templates/components/billing/payment-details-tab.hbs index 129a7e88a1..2f7ebf7d98 100644 --- a/app/templates/components/billing/payment-details-tab.hbs +++ b/app/templates/components/billing/payment-details-tab.hbs @@ -7,19 +7,6 @@
- - - - credit card details @@ -45,6 +32,34 @@ > + + + +
 
+
+ + + +
 
+