Aight,
It seems its depends on my framework apparently. Im using knockout.js framework hence my declaration for a function is different that causes the response callback execution issues.
(normal javascript function calling)
function responseHandler(response) {
if (response.messages.resultCode === 'Error') {
for (var i = 0; i < response.messages.message.length; i++) {
console.log(response.messages.message[i].code + ':' + response.messages.message[i].text);
}
} else {
useOpaqueData(response.opaqueData)
}
}
(knockoutjs function calling)
responseHandler = function(response){
if (response.messages.resultCode === 'Error') {
for (var i = 0; i < response.messages.message.length; i++) {
console.log(response.messages.message[i].code + ':' + response.messages.message[i].text);
}
} else {
useOpaqueData(response.opaqueData)
}
}
I'm replying this anyways since some people might think its the Accept.js issues, apparently its not. Check your framework documentation just to make sure how the function calling is called.
10-07-2016 11:19 PM - edited 10-07-2016 11:20 PM