cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this solution

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.

 

 

View solution in original post

hhalim
Member
Who Me Too'd this solution