Skip to content

Commit

Permalink
Merge pull request #119 from BioTurboNick/master
Browse files Browse the repository at this point in the history
Replaced "BillingUnavailable" with "ServiceUnavailable" for certain cases
  • Loading branch information
jamesmontemagno committed Feb 12, 2018
2 parents 6c94a00 + 07b44c1 commit aa6f418
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -11,10 +11,10 @@ namespace Plugin.InAppBilling.Abstractions
/// </summary>
public enum PurchaseError
{
/// <summary>
/// Billing system unavailable
/// </summary>
BillingUnavailable,
/// <summary>
/// Billing API version is not supported for the type requested (Android), client error (iOS)
/// </summary>
BillingUnavailable,
/// <summary>
/// Developer issue
/// </summary>
Expand Down
10 changes: 5 additions & 5 deletions src/Plugin.InAppBilling.Android/InAppBillingImplementation.cs
Expand Up @@ -81,7 +81,7 @@ public async override Task<IEnumerable<InAppBillingProduct>> GetProductInfoAsync
{
if (serviceConnection?.Service == null)
{
throw new InAppBillingPurchaseException(PurchaseError.BillingUnavailable, "You are not connected to the Google Play App store.");
throw new InAppBillingPurchaseException(PurchaseError.ServiceUnavailable, "You are not connected to the Google Play App store.");
}

IEnumerable<Product> products = null;
Expand Down Expand Up @@ -151,7 +151,7 @@ public async override Task<IEnumerable<InAppBillingPurchase>> GetPurchasesAsync(
{
if (serviceConnection?.Service == null)
{
throw new InAppBillingPurchaseException(PurchaseError.BillingUnavailable, "You are not connected to the Google Play App store.");
throw new InAppBillingPurchaseException(PurchaseError.ServiceUnavailable, "You are not connected to the Google Play App store.");
}

List<Purchase> purchases = null;
Expand Down Expand Up @@ -252,7 +252,7 @@ public async override Task<InAppBillingPurchase> PurchaseAsync(string productId,

if (serviceConnection?.Service == null)
{
throw new InAppBillingPurchaseException(PurchaseError.BillingUnavailable, "You are not connected to the Google Play App store.");
throw new InAppBillingPurchaseException(PurchaseError.ServiceUnavailable, "You are not connected to the Google Play App store.");
}

Purchase purchase = null;
Expand Down Expand Up @@ -403,7 +403,7 @@ public override Task<InAppBillingPurchase> ConsumePurchaseAsync(string productId
{
if (serviceConnection?.Service == null)
{
throw new InAppBillingPurchaseException(PurchaseError.BillingUnavailable, "You are not connected to the Google Play App store.");
throw new InAppBillingPurchaseException(PurchaseError.ServiceUnavailable, "You are not connected to the Google Play App store.");
}

var response = serviceConnection.Service.ConsumePurchase(3, Context.PackageName, purchaseToken);
Expand Down Expand Up @@ -466,7 +466,7 @@ bool ParseConsumeResult(int response)
public async override Task<InAppBillingPurchase> ConsumePurchaseAsync(string productId, ItemType itemType, string payload, IInAppBillingVerifyPurchase verifyPurchase)
{
if (serviceConnection?.Service == null)
throw new InAppBillingPurchaseException(PurchaseError.BillingUnavailable, "You are not connected to the Google Play App store.");
throw new InAppBillingPurchaseException(PurchaseError.ServiceUnavailable, "You are not connected to the Google Play App store.");


if (payload == null)
Expand Down

0 comments on commit aa6f418

Please sign in to comment.