2

Note : This is NOT a duplicate of Is it possible to send POST data with a PHP redirect?

The idea of what I am trying to do is :

1) there is a.php page . it has a html form and submit button . when the user submits the form , the data will post to the b.php page.

2) in b.php page I want to get the post data(of curse it can be done with php) and manipulate it , after that I need to make a SOAP request to a gateway payment .

3) client will submit credit card information and submit the form in gateway . the gateway will send the SOAP response to the b.php page .

4) I need to verify the payment in b.php and then post the data to a.php and also I want to redirect user to a.php and show them the post data . is it possible to do it with curl? can curl send the post data and redirect the user to that page with the post data?

for some reason I don't want to use javascript , it can be done with hidden input and javascript form submission . I'm afraid that it can't be done with curl .

any suggestion on how to solve this issue?

Thanks.

Parsa Mir Hassannia
  • 351
  • 2
  • 6
  • 17

1 Answers1

1

Sounds doable.

If you show us what's not working in your code I'm sure someone will help). If you show us what's not working in your code I'm sure someone will help

BeetleJuice
  • 39,516
  • 19
  • 105
  • 165
  • Thank you for your response . I already mentioned that I need to redirect user to external web server with POST data , so in this case the header ( location ) and session doesn't work . – Parsa Mir Hassannia Jul 27 '17 at 07:42
  • @Parsamhn Why wouldn't location header work? It prevents you from redirecting to another website? Also, do you want your server to POST to the gateway, or do you want the user's browser to POST to the gateway? – BeetleJuice Jul 27 '17 at 07:51
  • I want to POST data from b.php to the a.php and redirect user to that page and show them the POST data . if you use location header it just redirect user to specific page without POST data . – Parsa Mir Hassannia Jul 27 '17 at 08:09