Real Money purchases not validated but virtual items are.



  • Hi,

    I am having a hard time getting real money purchases to get receipt validation on PlayFab. Virtual items do show up under the players PlayFab account but not real money purchases. I have set these items as Currency on IAP Settings Editor and I have enabled Full Suite on the Plugins Setup. Please help.

    I noticed this snippet in IAPManager

    validator.shouldValidate(VerificationType.onPurchase)

    is returning false.

    Thanks,
    Gilbert



  • So I looked into ReceiptValidator.shouldValidate and it turns out that it only returns false regardless of what you pass in as a parameter. Is that a bug perhaps?

    public virtual bool shouldValidate(VerificationType verificationType)
    {
         return false;
    }
    


  • Hi Gilbert,

    which platform are you running on? Since there are a few settings needed for receipt validation to work with real money purchases, did you follow section 5+6 in our PlayFab guide?

    In section 5 specifically, App Store settings on PlayFab's website are mentioned, as well as adding the ReceiptValidatorService component to the IAPManager. It is correct that the "ReceiptValidator" script returns false in all cases, however it is an interface for the "real" validators and should not be used anywhere in-game.



  • @Baroni

    So this is for both iOS and Android. I can see the receipts for non-currency type items but I just cant see any if its designated as Default or Currency. I must be missing something.

    Thanks again.



  • Did you check if your purchases go through the App Stores without PlayFab? This is a bit difficult for me to assist with, as without information on whether the purchases are successful at all, I can only point to our setup instructions and manual. You should be able to see the receipt data coming from Google Play and iTunes, before it is send to PlayFab. Please check the WaitForRequest method in the ReceiptValidatorService script, which contains the original receipt as well as callbacks for success and failure - you may want to look deeper into this and insert a few more Debug.Logs.



  • @Baroni

    Our app is currently in Test Flight. Is it supposed to show while our app is still in Test Flight? The image represented on your documentation shows Receipt Validation on PlayFab and I expect to see something similar.



  • To clarify: when using receipt validation via PlayFab, the purchase is a three step process. In the first step, the purchase is treated as without PlayFab and goes directly to the App Store. Second, when the purchase result comes back, the receipt received is send to PlayFab and validated via their servers. And third, on a response from PlayFab, the product is granted within the app - or not.

    Testing the first step with Test Flight or Google Play as a tester user is totally fine. If you don't get a receipt at all, you know there's something wrong (and it's not related to PlayFab). If you don't even get a request to send out from the app with PlayFab Full Suite enabled, you will know that you should double check your Unity+PlayFab title settings.



  • @Baroni

    That is very helpful indeed.

    Ok. So on our app in TestFlight, we do get the iOS native popup that says the purchase was successful upon a purchase of a Currency type. So that piece of the puzzle works. Can you please direct me as to where to long now in SIS to troubleshoot this issue further?

    Thanks



  • As I wrote above, please have a look at the ReceiptValidatorService script and contents within the WaitForRequest method. Then debug the result received from PlayFab - if the request actually reaches PlayFab, you will see the error in the player's account too.

    Also double check that your App Store settings for iOS on PlayFab's "Add-ons" section are correct.


Log in to reply