I am running drupal 6 and currently working on payment gateway integration module. I have a basic form in my module which will collect billing information from the user. In the form submit handler, I need to create certain parameters and send the post data to the payment gateway URL. How do I handle this? Any help is appreciated.
2 Answers
Check drupal_http_request().
Performs an HTTP request.
This is a flexible and powerful HTTP client implementation. Correctly handles GET, POST, PUT or any other HTTP requests. Handles redirects.
-
I do not need a response from the payment gateway. I just need to construct post data and send it to the payment gateway.– VivekCommented Jan 27, 2012 at 14:26
-
yeah, you can do whatever you want. either way, the server will send a response no matter how you connect to it, it's up to you what you're going to do with that response. Commented Jan 27, 2012 at 14:29
You can use CURL. CURL stands for client URL library. It allows you to communicate with any webservice (and much more). It can handle SSL/HTTPS and all the other stuff you might need.