Advertisement
Guest User

In app billing

a guest
Jun 9th, 2015
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if((window.device && device.platform == "Android") && typeof inappbilling !== "undefined") {
  2.         inappbilling.init(function(resultInit) {
  3.             console.log("IAB Initialized");
  4.             inappbilling.getPurchases(function(result) {
  5.                 console.log("PURCHASES -> " + JSON.stringify(result));
  6.                 if(result.length == 0)
  7.                     showAD();
  8.             },
  9.             function(errorPurchases) {
  10.                 console.log("PURCHASE ERROR -> " + errorPurchases);
  11.                 showAD();
  12.             });
  13.         },
  14.         function(errorInit) {
  15.             console.log("ERROR -> " + errorInit);
  16.             showAD();
  17.         },
  18.         {showLog: true},
  19.         ["ad_free"]);
  20.     } else {
  21.         showAD();
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement