Server Side Validation for other stores



  • Thanks for the response. I notice the SIS Server Side Receipt Verification Document mentions IOS and Android for the php file.

    Is it possible to use the verify.php file with other stores that SIS supports? If so, how do I go about implementing it? Thank you



  • I moved your question to a new thread because it is not related to the original topic (subscriptions) anymore.

    We provide server side validation for iOS and Google Play only, since there is little to no interest in using it for other stores, i.e. Amazon or Windows Store.

    @Dmarc92 said in Server Side Validation for other stores:

    Is it possible to use the verify.php file with other stores that SIS supports? If so, how do I go about implementing it?

    This question is very vague, since you have to know how receipt validation works before adding it for a store. If by "other stores that SIS supports" you mean other stores than iOS and Google Play, then yes. Obviously you need to receive a receipt by the app, which you can send to your server (the php file). So if it is a completely new store, you also have to implement it via the Unity IAP store interfaces to begin with. The server php then initiates a connection to the store backend (store validation server), validates the receipt and sends the result back to the app. The exact implementation depends on the store and validation server - you have to look into their documentation for that.

    When using PlayFab or Steam, validation happens on their backend automatically. So for PayPal and Steam you do not even need your own server php validation. May I ask what store we are talking about?



  • Thank you for the response. Sorry, I didn't realize how vague my question was. I was thinking in general all stores accommodates IAP.

    So, all these stores supported in SIS allow IAP but some stores have consumers who are more interested in installing apps without IAP even though there's apps with IAP in their store(Amazon, Windows Store etc.)?

    The instructions of the Server Side Validation only mentions subscriptions for IOS and Google Play. Does it also work with non-consumables refunds?

    And yes, other stores than IOS and Google Play. So I make my own C# script from scratch or use your ReceiptValidatorServer.cs script that receives the receipt from the app, then send it to my server (the php file)? Forgive me I'm not sure what "servers" really are as a whole lol, is it basically making a website, putting the php file in it, and host it online so that it connects to the store backend(store validation server)? If so I'm thinking of converting the php file to a node.js file since I'm going to learn that server-side language, would node.js work with your ReceiptValidatorServer.cs script the same as the php file does?

    As for Steam I think your forum said it needs PlayFab to use IAP and as you said in this post it has a store validation server on their backend automatically, so PlayFab is updating the store validation server and my app? What SIS code do I use to check PlayFab and reset an item to be purchased again? I saw the script reference for PlayFabSteamStore but i'm not sure how to implement it. Thank you



  • apps without IAP even though there's apps with IAP in their store(Amazon, Windows Store etc.)?

    As a developer, receipt validation only makes sense on stores that either have a high customer base, or high piracy. Amazon does have neither and Windows Store is practically dead.

    The instructions of the Server Side Validation only mentions subscriptions for IOS and Google Play. Does it also work with non-consumables refunds?

    It works with any type of purchase, consumable/non-cons/subscription. Refunds are a special case outside of this and handled as well.

    make my own C# script from scratch or use your ReceiptValidatorServer.cs script

    The ReceiptValidatorServer script has platform defines and checks for the selected Unity IAP store. You could add your own store implementation using defines and use the existing WWW request, or write it from scratch. It really is up to you.

    then send it to my server (the php file)

    The php file lying around on your hosted server, yes.

    would node.js work with your ReceiptValidatorServer.cs script the same as the php file does?

    If you rewrite the backend with node.js, obviously you will have to rewrite parts of the frontend to match your methods too. Currently the ReceiptValidatorServer script makes a POST request to your endpoint so you have to handle that.

    As for Steam I think your forum said it needs PlayFab to use IAP

    PlayFab is optional for Steam. On our product page on the Unity Asset Store, in the screenshot section you can see that Steam is supported by our Unity IAP implementation or via PlayFab.

    PlayFab is updating the store validation server and my app?

    PlayFab is a player management solution, it has its own validation servers. It validates receipts on purchase and saves them in the player's inventory.

    What SIS code do I use to check PlayFab and reset an item to be purchased again?

    In Unity, you call our methods like DBManager.isPurchased since they are synced with the player's inventory on PlayFab. If you want to delete an item you have to do it on the PlayFab website, in the player's inventory. After relaunching the app, the product will no longer be purchased for that player.

    I saw the script reference for PlayFabSteamStore but i'm not sure how to implement it.

    You do not, since we did it for you. If you choose to integrate PlayFab, you do it using our PlayFab guide on the forums.



  • It works with any type of purchase, consumable/non-cons/subscription. Refunds are a special case outside of this and handled as well.

    When a puchase is canceled/refunded does the ReceiptValidatorServer script send the transaction to the HandleSuccessfulPurchase method in the IAPListner script?

    PlayFab is optional for Steam. On our product page on the Unity Asset Store, in the screenshot section you can see that Steam is supported by our Unity IAP implementation or via PlayFab.

    So without using PlayFab, my question would be the same as the first. Do I have to setup the steam validation server implementation in the ReceiptValidatorServer script or does steam automatically sends purchases/cancels/refunds to the IAPListner script? That would be convenient for me since I'm familiar with that script handling purchases and modifies the app. Thank you.



  • When a puchase is canceled/refunded does the ReceiptValidatorServer script send the transaction to the HandleSuccessfulPurchase method in the IAPListner script?

    No. As the method says, only successful purchases are sent to that method. Canceled/refunded purchases are deemed as invalid by the ReceiptValidatorServer script and removed from the local database immediately. You and the player won't notice.

    Do I have to setup the steam validation server implementation in the ReceiptValidatorServer script or does steam automatically sends purchases/cancels/refunds to the IAPListner script?

    As said above, Steam purchases are handled by either our Unity IAP or PlayFab implementation. Successful purchases are passed to the HandleSuccessfulPurchase method in the IAPListener as usual. The ReceiptValidatorServer script does not have anything to do with Steam.

    To keep a long story short - if you wish to have Steam validation, do not reinvent the wheel. It is already there. See our Steam guide on the forum (skip all PlayFab parts if you aren't using it).



  • No. As the method says, only successful purchases are sent to that method. Canceled/refunded purchases are deemed as invalid by the ReceiptValidatorServer script and removed from the local database immediately. You and the player won't notice.

    Your saying that without further code all cancel/refund shop items(UI, text, functionality) will reset to its default state? Also if its shop items were deleted after successful purchases? Thank you



  • How about you test it out ;)

    We're keeping this very theoretical, but just start implementing your shop and test for yourself.



  • Ok I'll try it out, thank you for the info :)


Log in to reply