question

Ben Snowden avatar image
Ben Snowden asked

PayForPurchase Doesnt call Steam for Overlay Window?

Hello all, You may have seen my posts on other forms..

I am running into an issue where I am receiving Success calls back from start purchase and PayforPurchase however the steam payment window is nowhere to be found. To my understanding from all the documentation, the Overlay is initiated from the backend at playfab, and i would guess that it would use some sort of ref to the linked steam account to know how to route back to that player on the steam side.

I have gone through 3-4 users that have used steams implementation prior and they have all confirmed to the best of their ability that my code and setup is correct.


I have run out of things to debug. How can I determine that playfab is reaching steam correctly?
How can I confirm that eveything is working correctly?

10 |1200

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

Ben Snowden avatar image
Ben Snowden answered

Big progress has been made, I spent most of the day today getting a build uploaded and download through steam. It seems that now the popup shows when the pay for purchase is called. From a form somewhere on the internet i found a group of devs talking about how sometimes you must upload the build through steam and then download it.

Steps:

-upload a build to steam

-download it to your pc

-run the build and try your IAP code.

-you can now just point unity or unreal to build right over that code to test and Eveything should function.


that could be useful for steam or playfab to mention.



My new issue is more in playfab territory.

 public void ConfirmPurchase(string order)
    {
        Debug.Log($"ConfirmPurchase: {order}");


        PlayFabClientAPI.ConfirmPurchase(new ConfirmPurchaseRequest()
        {
            OrderId = order
        }, result => {
            Debug.Log($"Congrats you bought with steam.");
        }, error => {
            Debug.Log($"Error buying  with steam.\n" +
                $"{error.ErrorMessage} \n" +
                $"{error.ErrorDetails} \n" +
                $"{error.Error}");
        });
    }


playfabconfirm.png (51.1 KiB)
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.

Ben Snowden avatar image Ben Snowden commented ·

I have found that the order ID i am passing in the last step is not the same, should i store that ID locally then pass it in, or get an ID from "MicroTxnAuthorizationResponse_t" some how?

0 Likes 0 ·
Made Wang avatar image Made Wang Ben Snowden commented ·

Get the OrderId in the callback of StartPurchase and pass it in here.

0 Likes 0 ·
Ben Snowden avatar image
Ben Snowden answered

Update, it seems that Playfab and Steam are talking to some extent, When the pay for purchase call is called it comes back successful and provides "ProviderData" I took this data and went into a random steam game and started an IAP in their game, when the pay window popped up I replaced the string of numbers in the URL with my ProviderData and Boom I saw what should be my IAP window for my game, This tells me that there is some line of communication happening.

~Edit: using "SteamFriends.ActivateGameOverlayToWebPage" we can open a webpage in steam so that confirms that works, just seems that playfab isnt calling it.

10 |1200

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

Ben Snowden avatar image
Ben Snowden answered

Following Non-Receipt Payment Process it states Under the steam secction that "This automatically causes the user to be presented with the purchase confirmation dialog via the Steam client."

However, we have not found any code in the Playfab SDK that calls anything towards Steam that would pop up the window. How does this system work?

10 |1200

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

Made Wang avatar image
Made Wang answered

Regarding the status of the order, you can find the transaction status in the callbacks of PayForPurchase and ConfirmPurchase.

It should be noted that, in addition to the call of playfab's api, you need to register a callback handler for the MicroTxnAuthorizationResponse_t from steam. In addition, according to your network and the current server situation, the transaction will take a certain amount of time.

What needs to be clarified is that playfab does not implement the steam pop-up window. This is done automatically by steam. For the details, it is recommended that you go to the steam developer community for professional support.

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.

Ben Snowden avatar image Ben Snowden commented ·

Thanks @Made Wang for the response, I am aware of the the status from the playfab callbacks and I have set up a callback with microtxn. Thank you for clarifying how the steam overlay is triggered.

At this point I have had 4-5 people confirm that Eveything is appears to be properly set up code wise and mostly configured correctly.

My last 2 things I have is too fully load my project onto steam and download it that way instead of launching through steam, unfortunately I think they have a 4-6 day wait period, and just contacting their support. I will keep this thread updated per findings as I have seen a handful follow the post.

0 Likes 0 ·
Ben Snowden avatar image Ben Snowden Ben Snowden commented ·

Update, I still have not heard back from steam :(


will likly spend a few hours today figuring out how to upload the build

0 Likes 0 ·
Ben Snowden avatar image
Ben Snowden answered

Steam Responded!


"Hi Ben,


I know your using PlayFab, but is it possible to send over the parameters that will be calling InitTxn? If that API call fails, then there will be no Overlay popup. So verifying that InitTxn is being correctly called is the first step.

Thanks
Jason"


Is there a way for me to get access to that data / calls happening in the backend?

5 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.

Ben Snowden avatar image Ben Snowden commented ·

@Made Wang I sent over the json stuff I get from play steam with pay for purchase and start purchase, and they responded saying it was not useful. Is there any other info I could be provided ?

0 Likes 0 ·
Made Wang avatar image Made Wang Ben Snowden commented ·

Who said it is useless, the api or the support engineer of the steam community?

Are there any bug reports that can be provided?

If possible, can you send me the json stuff you mentioned or the event information about the purchase event in Data->Data Explorer (basic) (Ensure that the private information has been deleted)?

I found some threads that may be useful to you. playfab community Questions about Unity C# Steam in app purchases - playfab community , github issues Calls to InitTxn return status OK but overlay does not show - github issues.

0 Likes 0 ·
Made Wang avatar image Made Wang Made Wang commented ·

And,InitTxn is not the api of playfab and it is called by the server, we can't get it.

0 Likes 0 ·
Show more comments

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.