diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-29 09:28:05 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-10-29 09:28:05 -0400 |
| commit | 0bd1f36ececc04c86bbf49b1ffd07dd30a5878b1 (patch) | |
| tree | ad170bf705bcd7be704382b3e4e2e320f59b29c9 /MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs | |
| parent | a9e079787827ba588c4f70db5fe9747aa9061639 (diff) | |
update db queries
Diffstat (limited to 'MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs')
| -rw-r--r-- | MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs index 7cc31ad7a..1176407ce 100644 --- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs +++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs @@ -8,8 +8,10 @@ using MediaBrowser.Model.Serialization; using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.Net; namespace MediaBrowser.Common.Implementations.Security { @@ -219,10 +221,6 @@ namespace MediaBrowser.Common.Implementations.Security { SupporterKey = reg.key; } - else - { - throw new PaymentRequiredException(); - } } } @@ -231,10 +229,15 @@ namespace MediaBrowser.Common.Implementations.Security SaveAppStoreInfo(parameters); throw; } - catch (PaymentRequiredException) + catch (HttpException e) { - SaveAppStoreInfo(parameters); - throw; + _logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT"); + + if (e.StatusCode.HasValue && e.StatusCode.Value == HttpStatusCode.PaymentRequired) + { + throw new PaymentRequiredException(); + } + throw new ApplicationException("Error registering store sale"); } catch (Exception e) { |
