Skip to content

Commit

Permalink
Merge 6475ccd into 525fd07
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno authored Oct 3, 2024
2 parents 525fd07 + 6475ccd commit 0425cf3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "8.0.400",
"rollForward": "latestFeature",
"allowPrerelease": true
}
}
2 changes: 1 addition & 1 deletion src/Plugin.InAppBilling/InAppBilling.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ public override Task DisconnectAsync(CancellationToken cancellationToken)
return Task.CompletedTask;
}


/// <summary>
/// Gets or sets if in testing mode. Only for UWP
/// </summary>
Expand Down Expand Up @@ -483,6 +482,7 @@ static bool ParseBillingResult(BillingResult result, bool ignoreInvalidProducts
return result.ResponseCode switch
{
BillingResponseCode.Ok => true,
BillingResponseCode.NetworkError => throw new InAppBillingPurchaseException(PurchaseError.NetworkError),
BillingResponseCode.UserCancelled => throw new InAppBillingPurchaseException(PurchaseError.UserCancelled),//User Cancelled, should try again
BillingResponseCode.ServiceUnavailable => throw new InAppBillingPurchaseException(PurchaseError.ServiceUnavailable),//Network connection is down
BillingResponseCode.ServiceDisconnected => throw new InAppBillingPurchaseException(PurchaseError.ServiceDisconnected),//Network connection is down
Expand Down
26 changes: 13 additions & 13 deletions src/Plugin.InAppBilling/Plugin.InAppBilling.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<AssemblyName>Plugin.InAppBilling</AssemblyName>
<RootNamespace>Plugin.InAppBilling</RootNamespace>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyFileVersion>7.0.0.0</AssemblyFileVersion>
<Version>7.0.0.0</Version>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyFileVersion>9.0.0.0</AssemblyFileVersion>
<Version>9.0.0.0</Version>
<Authors>James Montemagno</Authors>
<IsPackable>True</IsPackable>
<PackageId>Plugin.InAppBilling</PackageId>
Expand Down Expand Up @@ -95,33 +95,33 @@

<ItemGroup Condition=" $(TargetFramework.Contains('-android')) ">
<PackageReference Include="Microsoft.Maui.Essentials" Version="$(MauiVersion)" />
<PackageReference Include="Xamarin.Android.Google.BillingClient" Version="6.2.1" />
<PackageReference Include="Xamarin.Android.Google.BillingClient" Version="7.1.0" />
<PackageReference Include="Xamarin.AndroidX.Activity">
<Version>1.9.0.4</Version>
<Version>1.9.2.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx">
<Version>1.9.0.4</Version>
<Version>1.9.2.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Collection">
<Version>1.4.0.6</Version>
<Version>1.4.3.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx">
<Version>1.4.0.5</Version>
<Version>1.4.3.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
<Version>2.8.3.1</Version>
<Version>2.8.5.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData.Core">
<Version>2.8.3.1</Version>
<Version>2.8.5.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.Runtime">
<Version>2.8.3.1</Version>
<Version>2.8.5.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModel">
<Version>2.8.3.1</Version>
<Version>2.8.5.1</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.ViewModelSavedState">
<Version>2.8.3.1</Version>
<Version>2.8.5.1</Version>
</PackageReference>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ public enum PurchaseError
FeatureNotSupported,
ServiceDisconnected,
ServiceTimeout,
AppleTermsConditionsChanged
}
AppleTermsConditionsChanged,
NetworkError
}

/// <summary>
/// Purchase exception
Expand Down

0 comments on commit 0425cf3

Please sign in to comment.