sending post/get request to another site without leaving current site
I am developing a payment confirmation module. When a buyer successfully
confirms his payment, the gateway redirects him/her to my success url as:
http://mysite.com/success.php?oid=P01&amt=100&refId=TXN3456
The gateway has provision to verify the current transaction using their
transaction verification url as:
https://paymentgateway.com/epay/transverify.php?oid=P01&amt=100&refId=TXN3456
This url accepts POST/GET requests and returns xml response as
<response>
<status>Success</status>
</response>
or
<response>
<status>Failed</status>
</response>
Now my problem is that how can I the send the confirmation request to the
gateway without leaving my site, so that i can update my order payment
status on successful verification response. As a solution i tried to send
an ajax request to the payment gateway, but may be due to cross domain
request limitation, i was not able to do so. Is their any other method to
send this request and get the response?
No comments:
Post a Comment