SLVZ.Billing.Myket
1.0.3
dotnet add package SLVZ.Billing.Myket --version 1.0.3
NuGet\Install-Package SLVZ.Billing.Myket -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SLVZ.Billing.Myket" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SLVZ.Billing.Myket" Version="1.0.3" />
<PackageReference Include="SLVZ.Billing.Myket" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SLVZ.Billing.Myket --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SLVZ.Billing.Myket, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SLVZ.Billing.Myket@1.0.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SLVZ.Billing.Myket&version=1.0.3
#tool nuget:?package=SLVZ.Billing.Myket&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
📦 SLVZ Billing Myket
SLVZ Billing Myket is a lightweight and easy-to-use .NET library for handling in-app purchases via Myket on Android.
It simplifies the integration of the Myket payment system for .NET MAUI apps without needing to write any Java code directly.
✨ Features
- Supports both in-app purchases and subscriptions
- Simple, async-based API
- No extra dependencies required
- Works with .NET MAUI
- Secure and easy to integrate
⚙️ Installation
Install-Package SLVZ.Billing.Myket
⚙️ Usage Example
1. Initialize the library
using SLVZ.Billing;
List<string> products = new() { "coin_pack_1", "subscription_premium" };
InAppBilling.Initialize(this, "YOUR_RSA_KEY_HERE", products);
Initialize must be called once when the app starts (e.g., in your main Activity).
2. Purchase a product
using SLVZ.Billing;
var result = await InAppBilling.Purchase("coin_pack_1" , "Optional payload");
if (result.Status)
Console.WriteLine($"Purchase successful: {result.Product.productId}");
else
Console.WriteLine("Purchase failed.");
3. Purchase a subscription
using SLVZ.Billing;
var result = await InAppBilling.Subscription("coin_pack_1" , "Optional payload");
if (result.Status)
Console.WriteLine("Subscription activated!");
4. All availible items to purchase
using SLVZ.Billing;
var items = await InAppBilling.AllAvailibleItems();
It will return all subs and purchase items with details
5. Consume a product (for repeatable items)
using SLVZ.Billing;
var result = await InAppBilling.Consume(purchaseModel);
if (result.Status)
Console.WriteLine($"Item '{result.ProductID}' Consumed");
6. Data Models (PurchaseModel)
public class PurchaseModel
{
public string? productId { get; set; }
public string? purchaseToken { get; set; }
public JsonElement? state { get; set; }
public string? payload { get; set; }
public string? signature { get; set; }
public string? orderId { get; set; }
public string? originalJson { get; set; }
public string? purchaseTime { get; set; }
public string? type { get; set; }
}
7. ItemModel
Contains product details.
public class ItemModel
{
public string? productId { get; set; }
public string? description { get; set; }
public string? price { get; set; }
public string? title { get; set; }
public string? type { get; set; }
}
⚠️ Notes
- Call
InAppBilling.Initialize()once before using any other methods. - All operations are asynchronous — make sure to use
await. - If a purchase or subscription fails or is canceled, the returned
Statuswill befalse. - Always validate the purchase signature on your server to ensure transaction integrity.
- The RSA key must match the one from your Myket developer panel.
- For consumable items, remember to call
Consume()after a successful purchase. - Do not call
Initialize()multiple times — the helper automatically handles initialization state. - Make sure to declare all your product IDs when calling
Initialize(). - All callbacks return strongly typed models (
PurchaseModel,ItemModel) for simplicity.
👨💻 Author: SLVZ
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0-android36.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0-android36.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.