public List<InventoryDef> Cart =
new List<InventoryDef>();
public void Start()
{
SteamUser.
OnMicroTxnAuthorizationResponse += OnPurchaseFinished;
}
public void AddToCart( InventoryDef item )
{
Cart.
Add( item );
}
public async Task CheckoutAsync()
{
ShowPurchaseInProgressScreen();
var result =
await Steamworks.
SteamInventory.
StartPurchaseAsync(
Cart.
ToArray() );
Log(
$"Result: {r.Value.Result}" );
Log(
$"TransID: {r.Value.TransID}" );
Log(
$"OrderID: {r.Value.OrderID}" );
}
private void OnPurchaseFinished( AppId appid,
ulong orderid,
bool success )
{
HidePurchaseInProgressScreen();
if ( success )
{
}
else
{
}
}