question

davidmenard0 avatar image
davidmenard0 asked

,Steam purchase overlay not shown

Hi,

I'm trying to setup In App Purchases in Unity, but I can't trigger the Steam Overlay for the user to confirm the purchase.

I'm calling PlayFabClient.PayForPurchase, and getting a callback result with the "Init" status:

void StartPurchaseCallback(StartPurchaseResult result) {


        PlayFabClientAPI.PayForPurchase(new PayForPurchaseRequest() {
            OrderId = result.OrderId,
            ProviderName = "Steam",
            Currency = "RM"
        }, 
        PurchaseConfirmation,
        ErrorCallback );
    }


    void PurchaseConfirmation(PayForPurchaseResult result) {
        Debug.Log("Order successful!");
        Debug.Log(result.Status.Value.ToString());
    }

I'm logged in with steam, but the overlay simply doesn't trigger.

I've tried a few of the other solutions I found, like running from steam, building with Mono instead of IL2CPP, and moving the game to steamapps/common, but none of those work for me.

Any help is appreciated, thanks!

,

Hi,

I'm trying to setup IAP with Steam in Unity and facepunch. I authenticate fine, but whenever I try to trigger an IAP using PlayFabClientAPI.PayForPurchase, it doesn't trigger the steam overlay for the user to confirm the purchase.

void StartPurchaseCallback(StartPurchaseResult result) {


        PlayFabClientAPI.PayForPurchase(new PayForPurchaseRequest() {
            OrderId = result.OrderId,
            ProviderName = "Steam",
            Currency = "RM"
        }, 
        PurchaseConfirmation,
        ErrorCallback );
    }


    void PurchaseConfirmation(PayForPurchaseResult result) {
        Debug.Log("Order successful!");
        Debug.Log(result.Status.Value.ToString());
    }

I get a PurchaseConfirmation with the result status as "Init", but it just never triggers the overlay.

I've tried some of the solutions I tried on other threads, like running the game from steam, and placing it in steamapps/common, but it just doesnt trigger.

Any help is appreciated!

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

davidmenard0 avatar image davidmenard0 commented ·

I can also see the "PayForPurchase" event getting received ion my account on playfab, in the data explorer

0 Likes 0 ·
davidmenard0 avatar image davidmenard0 davidmenard0 commented ·

Here's the event data on the server side
{

    "EventName": "player_paid_for_purchase",
    "OrderId": "69EB35C00D7BE5A5",
    "Status": "Init",
    "ProviderName": "Steam",
    "VirtualCurrencyGrants": {},
    "PurchaseCurrency": "RM",
    "PurchasePrice": 499,
    "ProviderData": "2584485374955335637",
    "PurchaseConfirmationPageURL": null,
    "VirtualCurrencyBalances": {},
    "ProviderToken": null,
    "EventNamespace": "com.playfab",
    "EntityType": "player",
    "Source": "PlayFab",
    "TitleId": "A447B",
    "EntityId": "B85CEDA501C67882",
    "EventId": "2ca5c80129f446e1bc9e52d7e78d1067",
    "SourceType": "BackEnd",
    "Timestamp": "2021-07-05T21:50:57.3533073Z",
    "History": null,
    "CustomTags": null,
    "Reserved": null,
    "PlayFabEnvironment": {
        "Vertical": "master",
        "Cloud": "main",
        "Application": "mainserverlinux",
        "Commit": "4c99e2c"
    }
}
0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

Are your trying to test it in Unity Editor? Please refer to Brendan's answer in this thread -- Steam Overlay not visible in Unity editor. - Playfab Community

Since the call to PayForPurchase is returning successfully, you'd need to check with the Steamworks developer support to see why the overlay isn't showing up in your client. As Brendan has mentioend, PlayFab has no control over that.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.