Hi,
I'm currently integrating a payment system into my website. I have a response script which basically takes in the data from the secure server and displays to the customer if the payment has gone through or not. My problem is that the if statement is actually displaying both messages to the customer, even if the payment has been successful or unsuccessful.
Here is the If statement:
<?
if ($result == "00") && ($payersetup == "00") && ($pmtsetup =="00"){
?>
Thank you
<br/><br/>
To return to the home page <a href="http://www.xx.com"><b><u>click here</u></b></a>
<br/><br/>
<?
} else {
?>
<br/><br/>
There was an error processing your subscription.
To try again please <a href="http://www.xx.com/signUp.html"><b><u>click here</u></b></a><br><BR>
Please contact our customer care department at <a href="mailto:[email protected]"><b><u>[email protected]</u></b></a>
<?
}
?>
I have also tried doing this the following way, however with this method, the body is blank - no text is displayed.
<?
if ($result == "00") && ($payersetup == "00") && ($pmtsetup =="00"){
$thanks = "Thank you! \n\n To Return to the homepage <a href=http://www.epubdirect.com>Click Here</a>";
echo $thanks;
}
else
{
$nothanks = "There was an error processing your subscription.\n\n To try again please <a href=http://www.epubdirect.com/signUp.html>click here</a>. \n\n If the problem persists, please contact our customer care department at <a href=mailto:[email protected]>[email protected]</a>";
echo $nothanks;
}
?>
And after that I tried to put the HTML into a seperate document and use require_once() but this didn't work either - same result as previous - blank body.
Any one have any ideas?
EDIT:
I have tried some of the ways suggested however I'm still having the blank page problem :(
Here is the way I have gone ->
<?
if (($result == "00") && ($payersetup == "00") && ($pmtsetup =="00"))
{
require_once('thankyou.html');
}
else
{
require_once('error.html');
}
?>
This still gives me a blank page even though the syntax looks right?