Dimitris

Dimitris

  • NA
  • 1
  • 706

Web service combined with form http post

Sep 9 2014 8:26 AM
I'm facing with the following situation.
I have an asmx service that till now was connecting to the bank via xml interface. Now the Payment Gateway is changing, and according to their rules we have to do the following
a) post a form to a specific url
b) collect their response in another url ( for security reasons, their response will end in two possible urls on my server (okUrl, failUrl) )
c) based on their response, build and send an xml request to a specific url.
d) get the actual response from the bank. 
Can I handle this using my web service. 
The web service method fires and.
1. get request details.
2. build a form(containing all needed details, such as card, ids, amount, etc) and post it to a specified url 
    Now the code of web service will continue to the next line and eventually it will terminate, while in a couple of seconds let'say the page_load event of my okurl.aspx will hit.
The question is how will I get the response form the page (okurl/failurl) and continue program flow, within the asmx method, immediatelly after the post. ??
Any ideas ???