Payment not completed immediately after getting a valid merchantSession

I am working on an Apple Pay integration for a java based commerce platform. I do my development inside a virtual box Linux Guest VM running on a Windows host OS. i have written the necessary front end and backend changes for Apple Pay integration and I am currently testing the same. I access the application using an iPhone6 connected to the same WIFi as the Windows box or from a simulator running on a Mac which is also on the same network. i connect my phone to the Mac and use the safari to look into the developer tools while I access the application on the phone. I had quite a few issues and I resolved them and now I am in a state where I get a valid merchant session json response from Apple gateway with epoch, expiry , merchant id, session id, signature etc. i parse this JSON and resolve the object in the validation method but the payment sheet shows payment not completed and invokes the cancel method before I could interact with it. what could be the issue ?? Please help me. Thanks, - Naga