Hi All,
I need your help in solving this problem.
The scenario:
1. Students fill enrolment form - form 1 (Form)
2. Enrolment data displayed for students with a unique transaction reference number. - Form 2 (Confirm page)
3. This takes the student to payment gateway and form finalised - redirection page and Form 3 (Process page) Form finalised
4. Payment Gateway payment processing
5. After payment, a response is sent to the response page having this code. (response page/thankyou page)
<?php
$hostname = "myhost";
$username="my_form_tools_database username";
$password="my_password";
$dbname="my_database;
$usertable="ft_form_99";
mysql_connect($hostname,$username,$password);
mysql_select_db("my_database") or die("Could not select database");
if(isset($_POST['ce_transref'])){
// the following are the parameters returned by $_POST
$ceresponse = strtoupper($_POST['ce_response']);
$cetransref = $_POST['ce_transref'];
$ceamt = $_POST['ce_amount'];
$cedata = $_POST['ce_data'];
$cememo = $_POST['ce_memo'];
if($cedata=='datacode')
{
$query="UPDATE ft_form_99 SET ce_response='$ceresponse', ce_transref='$cetransref', ce_amount='$ceamt', ce_data='$cedata', ce_memo='$cememo',
WHERE cetxref='$cetransref'";
mysql_query($query);
mysql_close();
}
else
{
// terminate because this transaction was not initiated from your store; it's a fake
}
}
?>
5 (a) After payment, a response page is displayed to the students as thank you for your payment. But with the above php on top.
In my database, the following field supposed to be updated by filling data from the response from the payment gateway:
ce_response
ce_transref
ce_amount
ce_data
ce_memo
I have tested the form, all other data are ok, and the forms are finalised. The only snag is that I cannot update the above data in red.
Please advise if there is another way, I can get the response to work and update the submitted finalised data with the response from the payment gateway.
I need your help in solving this problem.
The scenario:
1. Students fill enrolment form - form 1 (Form)
2. Enrolment data displayed for students with a unique transaction reference number. - Form 2 (Confirm page)
3. This takes the student to payment gateway and form finalised - redirection page and Form 3 (Process page) Form finalised
4. Payment Gateway payment processing
5. After payment, a response is sent to the response page having this code. (response page/thankyou page)
<?php
$hostname = "myhost";
$username="my_form_tools_database username";
$password="my_password";
$dbname="my_database;
$usertable="ft_form_99";
mysql_connect($hostname,$username,$password);
mysql_select_db("my_database") or die("Could not select database");
if(isset($_POST['ce_transref'])){
// the following are the parameters returned by $_POST
$ceresponse = strtoupper($_POST['ce_response']);
$cetransref = $_POST['ce_transref'];
$ceamt = $_POST['ce_amount'];
$cedata = $_POST['ce_data'];
$cememo = $_POST['ce_memo'];
if($cedata=='datacode')
{
$query="UPDATE ft_form_99 SET ce_response='$ceresponse', ce_transref='$cetransref', ce_amount='$ceamt', ce_data='$cedata', ce_memo='$cememo',
WHERE cetxref='$cetransref'";
mysql_query($query);
mysql_close();
}
else
{
// terminate because this transaction was not initiated from your store; it's a fake
}
}
?>
5 (a) After payment, a response page is displayed to the students as thank you for your payment. But with the above php on top.
In my database, the following field supposed to be updated by filling data from the response from the payment gateway:
ce_response
ce_transref
ce_amount
ce_data
ce_memo
I have tested the form, all other data are ok, and the forms are finalised. The only snag is that I cannot update the above data in red.
Please advise if there is another way, I can get the response to work and update the submitted finalised data with the response from the payment gateway.