Hi,
I have a problem with my PayForPurchase call :
Even if all my request params seems good, the PayForPurchase return the "InvalidParams" Error
here is my code :
public static void StartBundlePurchase ( string itemID ) { if (_catalog.ContainsKey(itemID) == false) { Debug.LogError("Bundle not found !"); return ; } Debug.Log("PlayFab: start Bundle purchase : " + itemID); StartPurchaseRequest request = new StartPurchaseRequest(); request.CatalogVersion = _settings.catalogVersion; request.Items = new List<ItemPurchaseRequest>(); ItemPurchaseRequest item = new ItemPurchaseRequest(); item.ItemId = itemID; item.Quantity = 1; request.Items.Add(item); PlayFabClientAPI.StartPurchase(request, OnBundleStartPurchaseSuccess, OnBundleStartPurchaseError); } private static void OnBundleStartPurchaseSuccess ( StartPurchaseResult result ) { Debug.Log("PlayFab: Bundle purchase started"); foreach (PaymentOption paymentOption in result.PaymentOptions) { Debug.Log("Provider name : " + paymentOption.ProviderName + ", currency : " + paymentOption.Currency + ", price : " + paymentOption.Price + ", store credit : " + paymentOption.StoreCredit); } _currentOrderId = result.OrderId; PayForPurchase(result.OrderId, result.PaymentOptions[0]); } private static void OnBundleStartPurchaseError ( PlayFabError error ) { if (error.ErrorCode != 0) { Debug.LogError("PlayFab: Fail to start Bundle purchase - error code : " + error.ErrorCode + ",\nerror messsage : " + error.ErrorMessage); } } public static void PayForPurchase ( string orderId, PaymentOption paymentOption ) { Debug.Log("PlayFab: Pay for purchase : " + orderId + " in : " + paymentOption.Currency + " with : " + paymentOption.ProviderName); PayForPurchaseRequest request = new PayForPurchaseRequest(); request.OrderId = orderId; request.ProviderName = paymentOption.ProviderName; request.Currency = paymentOption.Currency; PlayFabClientAPI.PayForPurchase(request, OnBundlePayForPurchaseSuccess, OnBundlePayForPurchaseError); } private static void OnBundlePayForPurchaseSuccess ( PayForPurchaseResult result ) { Debug.Log("PlayFab: Bundle pay for purchase"); XsollaSDKStatic.CreatePaymentForm(result.ProviderToken, OnXsollaPaymentDone, OnXsollaPaymentError, true); _currentOrderId = null; }
We are using Xsolla and all the setup of Xsolla may be completed.
I have 2 payment providers : "Xsolla" and "Test".
When I try with Test I have a "ServiceUnavailable" Error instead of "InvalidParams".
Hope you can help me.
Regards