Hi! this is my first post in the forum, I´m from Spain so sorry for my English;)
I sent my first game to Apple for review and the app was rejected for this;
"When validating receipts on your server, your server needs to be able to handle a production-
signed app getting its receipts from Apple’s test environment. The recommended approach is
for your production server to always validate receipts against the production App Store first. If
validation fails with the error code "Sandbox receipt used in production," you should validate
against the test environment instead."
Then I try to use LiveOps for this validation.
I have the sdkbox_config.json exported from LiveOps in my Resources folder and this is my code:
In my appDelegate: ( ----- Copied and pasted from liveOps Export Config File)
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
sdkbox::init("-----------", "-----------");
#endif
In the BuyScene I have:
sdkbox::IAP::setListener(new IAPPListener());
sdkbox::IAP::init();
sdkbox::IAP::setDebug(false);
sdkbox::IAP::enableUserSideVerification(false);
Before I run the purchase I get the correct info of the IAP:
IAP :creating Products list:
IAP :Refreshing products: '-----------'
2018-12-13 20:57:58.265370+0100 -----------[1448:171265] Requesting products: {(
"-----------"
)}
onInitialized : 1
IAP :Found product: ----------- 2.29
IAP: ========= IAP Item =========
IAP: Name: -----------
IAP: ID:-----------
IAP: Title: -----------
IAP: Desc: -----------
IAP: Price: 2,29 €
IAP: Price Value: 2.290000
IAP: Currency: EUR
ProductRequestSuccess
But when i´m trying to confirm the purchase i get:
IAP :Server validation: not authenticated
Purchase Failed: -----------
If I set “sdkbox::IAP::enableUserSideVerification(true);” the purchase works and i get this info:
IAP: ========= IAP Item =========
IAP: Name: -----------
IAP: ID: -----------
IAP: Title: -----------
IAP: Desc:-----------
IAP: Price: 2,29 €
IAP: Price Value: 2.290000
IAP: Currency: EUR
IAP: transactionID: 1000000486987294
IAP: receipt:
IAP: receipt data: MIITnAYJKo-------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------kM9X8=
I notice that the field “IAP:receipt:” is empty… i don´t know if this means something…
What i´m missing?
Will Apple approve my game if i set enableUserSideVerification to true?
Thanks!