diff --git a/settings.Preview.json b/settings.Preview.json index aadd101e55..a0aa8ec5a3 100644 --- a/settings.Preview.json +++ b/settings.Preview.json @@ -1,6 +1,7 @@ { "appSettings": { "apiUri": "https://preview-api.bitwarden.com", - "identityUri": "https://preview-identity.bitwarden.com" + "identityUri": "https://preview-identity.bitwarden.com", + "stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD" } } diff --git a/settings.Production.json b/settings.Production.json index a497d29e87..148fd58a2c 100644 --- a/settings.Production.json +++ b/settings.Production.json @@ -1,6 +1,7 @@ { "appSettings": { "apiUri": "https://api.bitwarden.com", - "identityUri": "https://identity.bitwarden.com" + "identityUri": "https://identity.bitwarden.com", + "stripeKey": "pk_live_bpN0P37nMxrMQkcaHXtAybJk" } } diff --git a/settings.json b/settings.json index be17e03895..0b79bed998 100644 --- a/settings.json +++ b/settings.json @@ -1,6 +1,7 @@ { "appSettings": { "apiUri": "http://localhost:4000", - "identityUri": "http://localhost:33656" + "identityUri": "http://localhost:33656", + "stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD" } } diff --git a/src/app/config.js b/src/app/config.js index 820eeb03a8..d04fe34af3 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -2,7 +2,7 @@ angular .module('bit') .config(function ($stateProvider, $urlRouterProvider, $httpProvider, jwtInterceptorProvider, jwtOptionsProvider, - $uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, stripeProvider) { + $uibTooltipProvider, toastrConfig, $locationProvider, $qProvider, stripeProvider, appSettings) { $qProvider.errorOnUnhandledRejections(false); $locationProvider.hashPrefix(''); jwtOptionsProvider.config({ @@ -10,7 +10,7 @@ angular whiteListedDomains: ['api.bitwarden.com', 'preview-api.bitwarden.com', 'localhost', '192.168.1.8'] }); var refreshPromise; - jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (options, appSettings, tokenService, authService) { + jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (options, tokenService, authService) { if (options.url.indexOf(appSettings.apiUri) !== 0) { return; } @@ -35,7 +35,7 @@ angular return refreshPromise; }; - stripeProvider.setPublishableKey('pk_live_bpN0P37nMxrMQkcaHXtAybJk'); + stripeProvider.setPublishableKey(appSettings.stripeKey); angular.extend(toastrConfig, { closeButton: true, diff --git a/src/app/settings.js b/src/app/settings.js index 11e2f52d58..ba23c6df81 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -1,2 +1,2 @@ angular.module("bit") -.constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","version":"1.10.1","environment":"Production"}); +.constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","stripeKey":"pk_live_bpN0P37nMxrMQkcaHXtAybJk","version":"1.10.2","environment":"Production"});