question

hippogamesunity avatar image
hippogamesunity asked

Steam payment window is not shown

Hello! I'm trying to implement Steam in-app purchases inside my app made with Unity 2019.

I was able to authorize with Steam, then I make successful calles to StartPurchase and PayForPurchase. But Steam purchase window is not shown. I've also tried releasing and running my build from Steam directly, with no luck. Is there something I'm missing? Thanks for any help!

My Playfab account is hippogamesunity@gmail.com.

var itemPurchaseRequest = new ItemPurchaseRequest { ItemId = "com.pixelstudio.pro", Quantity = 1 };
var startPurchaseRequest = new StartPurchaseRequest { Items = new List<ItemPurchaseRequest> { itemPurchaseRequest } };


PlayFabClientAPI.StartPurchase(startPurchaseRequest, startPurchaseResult =>
{
	Debug.Log(JsonConvert.SerializeObject(startPurchaseResult));
	Popup.Instance.ShowMessage(JsonConvert.SerializeObject(startPurchaseResult));


	var payForPurchaseRequest = new PayForPurchaseRequest { Currency = "RM", OrderId = startPurchaseResult.OrderId, ProviderName = "Steam" };


	PlayFabClientAPI.PayForPurchase(payForPurchaseRequest, payForPurchaseResult =>
	{
		Debug.Log(JsonConvert.SerializeObject(payForPurchaseResult));
		Popup.Instance.ShowMessage(JsonConvert.SerializeObject(payForPurchaseResult));
	}, OnPlayFabError);
}, OnPlayFabError);
{"Contents":[{"Description":null,"DisplayName":"PRO","ItemClass":null,"ItemId":"com.pixelstudio.pro","ItemInstanceId":"556C001EF15BF688","RealCurrencyPrices":null,"VCAmount":null,"VirtualCurrencyPrices":{"RM":499}}],"OrderId":"8F52245E81BD3E93","PaymentOptions":[{"Currency":"RM","Price":499,"ProviderName":"Steam","StoreCredit":0},{"Currency":"RM","Price":499,"ProviderName":"Test","StoreCredit":0}],"VirtualCurrencyBalances":{},"Request":{"CatalogVersion":null,"Items":[{"Annotation":null,"ItemId":"com.pixelstudio.pro","Quantity":1,"UpgradeFromItems":null}],"StoreId":null,"AuthenticationContext":null},"CustomData":null}
{"CreditApplied":0,"OrderId":"8F52245E81BD3E93","ProviderData":"1664582026701558233","ProviderToken":null,"PurchaseConfirmationPageURL":null,"PurchaseCurrency":"RM","PurchasePrice":499,"Status":1,"VCAmount":{},"VirtualCurrency":{},"Request":{"Currency":"RM","OrderId":"8F52245E81BD3E93","ProviderName":"Steam","ProviderTransactionId":null,"AuthenticationContext":null},"CustomData":null}
1 comment
10 |1200

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

hippogamesunity avatar image hippogamesunity commented ·

Also MicroTxnAuthorizationResponse_t is not called. Maybe I need to enable IAP for my app on Steam page or something? I have no ideas what to do next(

0 Likes 0 ·
hippogamesunity avatar image
hippogamesunity answered

Hello! Steam Overlay is disabled for apps (not games) by default. I've contacted Steam support and they've enabled Steam Overlay for my app, now IAP works.

1 comment
10 |1200

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

Seth Du avatar image Seth Du ♦ commented ·

Thanks for your feedback. I think developers having the same issue will find this thread for reference. I will mark the answer for you.

0 Likes 0 ·
Seth Du avatar image
Seth Du answered

The whole configuration will be the setups of the Steam Application ID and key on the Game Manager Add-ons page, creating the items properly, and implementing Steamworks API and PlayFab SDK on your project.

According to the documentation -- Establishing the payment provider: Non-webhook providers, when PayForPurchase API is called, PlayFab should have informed Steam to pop up the overlay for the payment. What we should do is to register a handler for MicroTxnAuthorizationResponse_t. If this API call returns a successful callback, it means the process has been done. There is hardly anything we can do for it because the next steps of actions are controlled by the Steamworks API.

I am not sure if it is related to the steamwork SDK, unity version or backend script type, but there is a similar thread you may refer to: https://community.playfab.com/questions/19581/steam-unity-microtxnauthorizationresponse-t-not-ge.html. If you still have trouble in triggering the callback, we suggest you to contact with Steamworks team for dedicated support.

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.