I get the error: "InvalidParams" - "Invalid input params" after I click the Authorize button on the Steam Purchase overlay.
private void PurchaseCoins() { PlayFabClientAPI.StartPurchase(new StartPurchaseRequest() { CatalogVersion = "Avatar Items", Items = new List<ItemPurchaseRequest>() { new ItemPurchaseRequest() { ItemId = "IAP_1Dollar", Quantity = 1, Annotation = "Purchased via in-game store" } } }, result => { text.text += Environment.NewLine + "StartPurchase: " + result.OrderId; Debug.Log("StartPurchase"); PurchaseOnSteam(result.OrderId); }, error => { text.text += Environment.NewLine + "StartPurchase FAILED"; Debug.Log("StartPurchase FAILED: " + error.ErrorMessage); }); } private void PurchaseOnSteam(string orderId) { PlayFabClientAPI.PayForPurchase(new PayForPurchaseRequest() { OrderId = orderId, ProviderName = "Steam", Currency = "RM" }, result => { text.text += Environment.NewLine + "Purchase on steam"; }, error => { text.text += Environment.NewLine + "SENT TO STEAM FAILED"; }); } private void OnSteamApproval(MicroTxnAuthorizationResponse_t pCallback) { if (pCallback.m_bAuthorized == 1) { text.text += Environment.NewLine + "Authorized Payment: " + pCallback.m_ulOrderID.ToString(); ConfirmPurchase(pCallback.m_ulOrderID); } else { text.text += Environment.NewLine + "Failed to authorize payment"; // Player didn't authorize the payment Debug.Log("Failed to authorize payment"); } } private void ConfirmPurchase(ulong orderId) { PlayFabClientAPI.ConfirmPurchase(new ConfirmPurchaseRequest() { OrderId = orderId.ToString() }, result => { text.text += Environment.NewLine + "CONFIRMED PURCHASE"; }, error => { text.text += Environment.NewLine + "FAILED: " + error.Error; text.text += Environment.NewLine + error.ErrorMessage; }); }
Not sure what's wrong?