Class PaymentsKit
PaymentsKit can be used to integrate in-app purchases in your game.
Inheritance
Namespace: Trail
Assembly: Trail.dll
Syntax
public static class PaymentsKit : object
Methods
GetEntitlements(PaymentsKit.GetEntitlementsCallback)
Retrieves the player's entitlements that are neither consumed nor refunded.
Use this method to check if there are any unconsumed entitlements from previous sessions that still need to be sent to your backend to be consumed This happens in situations where the game or your backend are interrupted, i.e. crashes, connectivity, user quitting, etc. You should call this method as soon as the game has finished booting.
Declaration
public static void GetEntitlements(PaymentsKit.GetEntitlementsCallback callback)
Parameters
Type | Name | Description |
---|---|---|
PaymentsKit.GetEntitlementsCallback | callback | Callback returning the entitlements. |
GetProductPrice(String, PaymentsKit.GetProductPriceCallback)
Used to get the price for a product. The product ID can be found in the Dev Area after you have created the product.
Declaration
public static void GetProductPrice(string productID, PaymentsKit.GetProductPriceCallback callback)
Parameters
Type | Name | Description |
---|---|---|
System.String | productID | Product id for the product you want to get the price of. |
PaymentsKit.GetProductPriceCallback | callback | Callback returning the price. |
RequestPayment(String, PaymentsKit.RequestPaymentCallback)
Used to start a purchase. The product ID can be found in the Dev Area after you have created the product.
Declaration
public static void RequestPayment(string productID, PaymentsKit.RequestPaymentCallback callback)
Parameters
Type | Name | Description |
---|---|---|
System.String | productID | Product id for the product you want to request a purchase for. |
PaymentsKit.RequestPaymentCallback | callback | Callback returning the purchase. |