diff --git a/src/app/settings/settingsBillingChangePaymentController.js b/src/app/settings/settingsBillingChangePaymentController.js index 2afce9ac4fe..bd1d3cf5315 100644 --- a/src/app/settings/settingsBillingChangePaymentController.js +++ b/src/app/settings/settingsBillingChangePaymentController.js @@ -45,11 +45,17 @@ $scope.submit = function () { $scope.submitPromise = getPaymentToken($scope.card).then(function (token) { + if (!token) { + throw 'No payment token.'; + } + var request = { paymentToken: token }; return apiService.accounts.putPayment(null, request).$promise; + }, function (err) { + throw err; }).then(function (response) { $scope.card = null; if (existingPaymentMethod) { @@ -73,6 +79,8 @@ if ($scope.paymentMethod === 'paypal') { return btInstance.requestPaymentMethod().then(function (payload) { return payload.nonce; + }).catch(function (err) { + throw err.message; }); } else { diff --git a/src/app/settings/views/settingsBillingChangePayment.html b/src/app/settings/views/settingsBillingChangePayment.html index e12e0c772bc..c2c907ef51b 100644 --- a/src/app/settings/views/settingsBillingChangePayment.html +++ b/src/app/settings/views/settingsBillingChangePayment.html @@ -14,13 +14,13 @@
-
diff --git a/src/app/settings/views/settingsPremium.html b/src/app/settings/views/settingsPremium.html index f9496c4e987..522c844b7c2 100644 --- a/src/app/settings/views/settingsPremium.html +++ b/src/app/settings/views/settingsPremium.html @@ -89,13 +89,13 @@

Payment Information

-