Welcome to WebmasterWorld Guest from 18.104.22.168
I've got a form where the action is a redirect to a payment gateway page.
This has worked fine for a couple of years but now I want to create a mysql database entry of the customer details before they go through to the payment gateway.
I have tried having the php program that does the database entry as the action from the form with a redirect to the payment gateway in the php program, that worked but there were no values in the form by the time it got to the payment gateway.
Has anyone come across this problem and more important has anyone solved it?
When you redirect In your PHP/db script, add the POSTED data onto the URL.
$redirect_url = "Location: paymentgateway.com?name=$name&email=$email...etc";
or, I think this would work:
$redirect_url = "Location: paymentgateway.com$_SERVER['query_string']";
I had thought of adding the paremeters to the payment gateway url, but the restriction on passing parameters is 255 characters I believe. This limit could easily be hit with the data being transfered so that's not an option.
Would it be possible to send the form twice?
First time to update the database and then the second time to the payment gateway?