I have an ordering script which has to wait for card verification before showing the confirmation details. I want to display an animated "processing" gif while the user waits for this to happen (sometimes upto 2 minutes).
I have created a "processing" div that I can hide with javascript upon the page completing loading that contains the gif and some text. I call the template->display() function before I call the card verification code so that this div (and the header etc) will display immediately.
Once the card has been verified, I then want to include and display either a success message with the confirmation details or a declined message, which I store in seperate templates.
How do I get this second part to display?
This doesn't seem to work:
The above will display the animated gif and then hide it after the transaction returns but won't display the declined message...
I have created a "processing" div that I can hide with javascript upon the page completing loading that contains the gif and some text. I call the template->display() function before I call the card verification code so that this div (and the header etc) will display immediately.
Once the card has been verified, I then want to include and display either a success message with the confirmation details or a declined message, which I store in seperate templates.
How do I get this second part to display?
This doesn't seem to work:
Code:
$tpl->display('step4.tpl');
flush();
// do transaction request
// if card declined
echo $tpl->fetch('step4declined.tpl');