Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Testing Cordova In App Purchases on Android and iOS

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 517
    Comment on it

    In this post, you will learn how to test your cordova application with using cordova InAppPurchase. You can test the purchasing with both android and iOS platforms. You need to have android and iOS devices to test it.

     

    Testing on Android:

     

    To test inAppPurchase on android, you need to follow these steps:

     

    1. Go to Google Play console and add the products which you want to buy in your application and also put them on active mode.
    2. After adding products, you should publish your apk file. It must be a signed apk file and you can publish it on alpha or beta testing. It will take few hours to publish the app.  
    3. You need to add email address to test the purchasing. You have to add the email address by going into "Settings > Account Details > License Testing”. Make sure this email account is open on your android device while testing the application. You can choose open beta testing or closed beta testing to test purchasing.
    4. In open beta testing, you have to visit an opt-in-link to test the app. In closed beta testing, you have to create a google group in which you can add testers.
    5. One thing you have to do in your code: add a manifest.json file in your www folder and put android billing key inside it. You can get it from Google play store after uploading app.
    6. Now you can test for purchasing products without being charges in your application. You will also get email for each purchase you do from google with the receipt of your order.

     

    Testing on iOS:

     

    In iOS, to test inAppPurchase, you need to have sandbox tester account and you can use it to test for purchases in your application. You have to follow these steps:

     

    1. First, you have to add all the products you want to sale on iTunes connect.
    2. For testing the purchase of products you need to create sandbox tester account. You can see the guidelines to create this account here.
    3. After creating sandbox tester account, then if you are logged in iTunes on your device, you have to logout. When you will make a purchase from app it will ask for email address and password, enter the credentials, the transaction will be done without any charges.

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: