0

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.

1
  • You payment processor should provide you with example code that shows you how to do this
    – Clive
    Commented Jan 27, 2012 at 13:35

2 Answers 2

1

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.

2
  • I do not need a response from the payment gateway. I just need to construct post data and send it to the payment gateway.
    – Vivek
    Commented 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
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.