Facepunch / Facepunch.Steamworks

Another fucking c# Steamworks implementation
MIT License
2.94k stars 353 forks source link

Need help with In Game Purchases #642

Closed Shamahan262 closed 2 years ago

Shamahan262 commented 2 years ago

Greetings, I'm having some problems getting my game on Steam, it's failing the review process with this explenation:

_Failure: Your app has failed our review because the current in-app purchase flow appears to use the sandbox version of the API: https://partner.steamgames.com/doc/webapi/ISteamMicroTxnSandbox

Please replace these sandbox calls with the real-money versions of the API. For help with this implementation, please see: https://partner.steamgames.com/doc/features/microtransactions/implementation_

I have no idea how to fix this issue, the in game purchases are working in the game as they should, even the real steam wallet money was withdrawn from the account.

Also I am not using a server to validate the purchases or anything, I'm simply using the Steam Inventory Service for these purchases

Here is the code from my game

private void OnEnable()
    {
        SteamUser.OnMicroTxnAuthorizationResponse += OnSteamPurchaseFinished;
    }

    public void BuyItem(int itemID)
    {
        AddToCart(new InventoryDef(itemID));
    }

    public InventoryDef[] Cart = new InventoryDef[1];
    public void AddToCart(InventoryDef item)
    {
        Cart[0] = item;
        SteamInventory.StartPurchaseAsync(Cart);
    }

    private void OnSteamPurchaseFinished(AppId appid, ulong orderid, bool success)
    {
        if (success)
        {
            // product found and purchased, grant the player the purchased item
        }
    }
Shamahan262 commented 2 years ago