Myket plugin on Construct 2

In the below steps, we are trying to connect a Construct 2 test project to Myket in-App Purchase service:

1. First, download the In-App Purchase Test project here and open it in the Construct 2 environment.

2.  Then, by using the Node.js Command Prompt, enter the below command and create the Cordova project at your desired location:

cordova create In-AppPurchase ir.myket.iap.construct2 In-AppPurchase

3. When developing the app, note that application Package name is ir.myket.iap.construct2.

4. Then return to the Construct 2 environment and export the project to the folder that you created in the previous step.

5. We use Intel XDK software to add plug-ins. Run the program and add the plugin like the image:
 

*It should be noted that in this program you must create an account and developer certificate to use to sign up for the APK.

6. If you encounter the “requested plugin was not found” error message, click the remove button.

7. After the project is opened, log in to Plugin management.

8. Download myket-iab-cordova-plugin from here and click the Add Plugins button.

9. In the Plugin variable field, you must enter the public key of your app, which you received from Myket developer panel. To do this, enter BILLING_KEY in the left section and enter the key in the right section. For this test project, the public key is in the below box:

MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCcXdOUo+1NxAZ72i2hFvq9GwJSUWNBnu/PtxqKTl2M5Z3ozGYjaSJT2rgZtqG+jdIy8fFkx8oAOjtgQyQeaQ5Qcxl7B6lsJEFOuPHVcD3qhEvavxDnemDZ3NfvoK+F8GMGppd7mQW90JJuAer+gq4esigb1ch9upkGgi5QpghQHwIDAQAB

10. Then create the Apk file in the Build tab (at the top).

11. Click Start Build to start the process. If you encounter an error during the build, update your plugins from the plugin management section.

12. Download and install Apk file.

Was this article helpful?
Dislike 0
Previous: Cordova and PhoneGap In-App Purchases
Next: Verification of in-app purchases on the server