Skip to content

Commit

Permalink
tweak resonse code
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno committed May 31, 2023
1 parent 4a092d5 commit e8c4e4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Plugin.InAppBilling/InAppBilling.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ static bool ParseBillingResult(BillingResult result)
if(result == null)
throw new InAppBillingPurchaseException(PurchaseError.GeneralError);

if ((int)result.ResponseCode == Android.BillingClient.Api.BillingClient.BillingResponseCode.NetworkError)
throw new InAppBillingPurchaseException(PurchaseError.ServiceTimeout);//Network connection is down

return result.ResponseCode switch
{
BillingResponseCode.Ok => true,
Expand Down

0 comments on commit e8c4e4a

Please sign in to comment.