Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Anroid inAppbilling Module not working for me.

$
0
0

Hi, I am using inAppbilling (2.2.0) module for inApp purchage Android. But I am facing one problem with this. A am using Example code for Check this is working on not.

InAppBilling.addEventListener(InAppBilling.PURCHASE_STATE_CHANGED_EVENT, function (e) {
    Ti.API.info("PURCHASE STATE CHANGED CALLED " + e.signedData + " " + e.signature);
    Ti.API.info("SECURITY RESULT " + e.result);
    App.asyncResponseMessages.value += "PURCHASE STATE CHANGED CALLED \n";
    App.asyncResponseMessages.value += "Signature Verification Result:\n" + App.getVerificationString(e.result) + "\n";
    App.asyncResponseMessages.value += "Signed Data:\n" + e.signedData + "\n";
    if (e.signedData != null) {
        var response = Titanium.JSON.parse(e.signedData);
        InAppBilling.confirmNotifications({
            notificationIds: [response.orders[0].notificationId]
        });
    }
});
But getting Issue always.
[ERROR] :  TiExceptionHandler: (main) [21053,22465] ----- Titanium Javascript Runtime Error -----
[ERROR] :  TiExceptionHandler: (main) [0,22465] - In app.js:264,38
[ERROR] :  TiExceptionHandler: (main) [0,22465] - Message: Uncaught TypeError: Cannot call method 'parse' of undefined
[ERROR] :  TiExceptionHandler: (main) [0,22465] - Source:         var response = Titanium.JSON.parse(e.signedData);
[ERROR] :  V8Exception: Exception occurred at app.js:264: Uncaught TypeError: Cannot call method 'parse' of undefined
Please help me, How i sort this issue.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>