Make sure to run setup script first to download the cocos2d-x engine
./setup
If the setup script runs correctly the folder structure should look like this
+-- sdkbox-cocos2d-x-binary
+-- sdkbox-sample-iap
| +-- cpp
| +-- lua
| \-- js
- iOS simulator don't support purchase, please test with a real device.
- You need to use your iTunesConnect account to create a test user in order to test IAP
- Update bundle identifier to match your own bundle identifier
- To test Android IAP you need to opt-in as an alpha tester here
- You can only test IAP in release build
- Replace the key with your key. In https://play.google.com/apps/publish/, open your game, follow menu "Development tools -> Services & APIs -> in-app billing"
Run the following command
cocos run -p android -m release
For more information, check out the SDKBOX IAP plugin