diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs index 1c81d8e259..224a88881b 100644 --- a/MediaBrowser.Api/PluginService.cs +++ b/MediaBrowser.Api/PluginService.cs @@ -291,7 +291,7 @@ namespace MediaBrowser.Api public async Task Post(RegisterAppstoreSale request) { - var success = await _securityManager.RegisterAppStoreSale(request.Store, request.Application, request.Product, request.Feature, request.Type, request.StoreId, request.StoreToken, request.Email, request.Amount); + var success = await _securityManager.RegisterAppStoreSale(request.Store, request.Application, request.Product, request.Type, request.StoreId, request.StoreToken, request.Email, request.Amount); if (!success) throw new ApplicationException("Error registering store sale"); } diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs index 410611c8af..18a0cf856b 100644 --- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs +++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs @@ -186,7 +186,7 @@ namespace MediaBrowser.Common.Implementations.Security } } - public async Task RegisterAppStoreSale(string store, string application, string product, string feature, + public async Task RegisterAppStoreSale(string store, string application, string product, string type, string storeId, string storeToken, string email, string amt) { var data = new Dictionary() @@ -194,7 +194,6 @@ namespace MediaBrowser.Common.Implementations.Security {"store", store}, {"application", application}, {"product", product}, - {"feature", feature}, {"type", type}, {"storeId", storeId}, {"token", storeToken}, @@ -202,16 +201,9 @@ namespace MediaBrowser.Common.Implementations.Security {"amt", amt} }; - var options = new HttpRequestOptions() - { - Url = AppstoreRegUrl, - CancellationToken = CancellationToken.None - }; - options.RequestHeaders.Add("X-Emby-Token", /*_appHost.SystemId*/ "08606E86D043"); - try { - using (var json = await _httpClient.Post(options, data).ConfigureAwait(false)) + using (var json = await _httpClient.Post(AppstoreRegUrl, data, CancellationToken.None).ConfigureAwait(false)) { var reg = _jsonSerializer.DeserializeFromStream(json); if (!String.IsNullOrEmpty(reg.key)) diff --git a/MediaBrowser.Common/Security/ISecurityManager.cs b/MediaBrowser.Common/Security/ISecurityManager.cs index b82159aa6c..17bd88b65f 100644 --- a/MediaBrowser.Common/Security/ISecurityManager.cs +++ b/MediaBrowser.Common/Security/ISecurityManager.cs @@ -45,7 +45,7 @@ namespace MediaBrowser.Common.Security /// Register an appstore sale /// /// true if successful - Task RegisterAppStoreSale(string store, string application, string product, string feature, + Task RegisterAppStoreSale(string store, string application, string product, string type, string storeId, string storeToken, string email, string amt); ///