drupal_http_post redirect I am currently experimenting with drupal_http_request to send my users information to a payment service - there is more configuration to be done so it is not working yet.

When I do get it successfully POSTing users details, it is important that the user is redirected to the payment service.

Can anyone tell me if drupal_http_request does redirect as it POSTs data?

If it doesn't I would appreciate suggestions on how I can achieve simultaneous POSTing and redirection.
Here is an example of how to use drupal_http_request(). 

$options = array(
  'method' =&gt; 'POST',
  'data' =&gt; 'name=Test&amp;email=example...',
  'headers' =&gt; array('Content-Type' =&gt; 'application/x-www-form-urlencoded'),
);

$result = drupal_http_request('http://example.com', $options);


In $result, you will get an object with the data of the request. 
Check the $result object and make sure the payment is gone through (or whatever the condition that should pass before redirecting the user). 

Then, use drupal_goto() to redirect the user to the new location. 

Note that this is just a normal redirect (GET) and data is already submitted to the Payment server by your site. 

If you want to use Paypal IPN-like requests that the user POSTs data to the server, you need to create a form instead. 

function _test_payment_form() {
  $form = array();

  $form['user'] = array(
    '#type' =&gt; 'hidden',
    '#name-info' =&gt; 'user', // this is the field name that will become name attribute of the input tag. No need to use this if your $form['KEY'] is same as this one. 
  );

  $form['submit'] = array(
    '#type' =&gt; 'submit', 
    '#value' =&gt; t('Proceed to @server for the payment', array('@server' =&gt; 'Paypal')),
  );

  $form['#action'] = 'http://example-payment-server.com/example/2/3/4'; // Information will now be submitted to this URL other than Drupal. 
  $form['#method'] = 'POST', // Just for clarification. This is the default value. 

   return $form;
}


You can print the form using the following code.

print drupal_render(drupal_get_form('_test_payment_form'));


You can also use the following code, where render arrays are accepted.

drupal_get_form('_test_payment_form');