}); var label = Ti.UI.createLabel(); label.text = "card details not received"; win.add(label); win.open(); // TODO: write your module tests here var codestrong_android = require('com.ashish.cardioandroid'); Ti.API.info("module is => " + JSON.stringify(codestrong_android.LCAT, null, 2)); var proxy = codestrong_android.createCardio({ "APP_TOKEN" : "cardioscanninghefre123456789", "REQUIRE_EXPIRY" : true, "REQUIRE_CVV" : true, "REQUIRE_ZIP" : false, "SUPPRESS_MANUAL_ENTRY" : false, "KEEP_APPLICATION_THEME" : true }); label.addEventListener("click",function(){ proxy.doScan({ success : function(resp) { alert(resp + "ashish"); Ti.API.info(' back in success'); var s = JSON.stringify(resp, null, 2); label.text = s; }, error : function(resp) { alert(resp + "nigam");
// to users on how to use it by example. // open a single window var win = Ti.UI.createWindow({ backgroundColor:'white' }); var label = Ti.UI.createLabel(); win.add(label); win.open(); // TODO: write your module tests here var cardioandroid = require('com.ashish.cardioandroid'); Ti.API.info("module is => " + cardioandroid); label.text = cardioandroid.example(); Ti.API.info("module exampleProp is => " + cardioandroid.exampleProp); cardioandroid.exampleProp = "This is a test value"; if (Ti.Platform.name == "android") { var proxy = cardioandroid.createExample({ message: "Creating an example Proxy", backgroundColor: "red", width: 100, height: 100, top: 100, left: 150 }); proxy.printMessage("Hello world!");