Hello C2 community!!
Please apologize if my question is misplaced.
I have a working C2 game and I want to add it the In Ap purchase feature.
I have set up all with Google Play and I have my billing key already.
The problem is that I can not seem to run the IAP plugin. Here is what I have done so far:
Related to the game itself:
- Added the IAP plugin in the game.
- IAP plugin is set to test mode.
- Added the "add product IDs" (with mi product id of course), and the "request store listing" actions to the "On start of layout" event.
- Added the "On store listing success" event with a few alerts showing product name, product price, etc.
- Added the "On store listing failed" event with an alert showing the "IAP.ErrorMessage"
- Exported as "cordova" project from C2.
Related to the export to android via apache cordova:
- Added the "cc.fovea.plugins.inapppurchase" plugin to the cordova project.
- Added the "com.mcm.plugins.androidinappbilling" plugin to the cordova project, with the --variable BILLING_KEY="MY_KEY" parameter
- Compile the project (generate APK file) manually via command line with Apache Cordova, signed and zip aligned it.
The problem is that the "On store listing success" event is firing ok, but there is not data retrieved from the store. All alerts shows empty strings.
Can please anyone tell me what am I doing wrong?
I appreciate all the help you can provide.
Thanks in advance!!