date_default_timezone_set("UTC"); $tsf_page=(int) $_POST['tsf_page']; if ($tsf_page!=1) { $tsf_page=0; } $tsf_fname=strip_tags(addslashes(stripslashes(trim($_POST['tsf_fname'])))); $tsf_lname=strip_tags(addslashes(stripslashes(trim($_POST['tsf_lname'])))); $tsf_company=strip_tags(addslashes(stripslashes(trim($_POST['tsf_company'])))); $tsf_street=strip_tags(addslashes(stripslashes(trim($_POST['tsf_street'])))); $tsf_city=strip_tags(addslashes(stripslashes(trim($_POST['tsf_city'])))); $tsf_zip=strip_tags(addslashes(stripslashes(trim($_POST['tsf_zip'])))); $tsf_phone=strip_tags(addslashes(stripslashes(trim($_POST['tsf_phone'])))); $tsf_invoice=trim($_POST['tsf_invoice']); $tsf_amount=str_replace("\$","",trim($_POST['tsf_amount'])); if ($tsf_page==1) { $error="Some of the details are missing"; if($tsf_fname=="") { $errflag=true; $error="Your first name is missing"; } if($tsf_lname=="") { $errflag=true; $error="Your last name is missing"; } if($tsf_street=="") { $errflag=true; $error="Your street address is missing"; } if($tsf_phone=="") { $errflag=true; $error="Your phone number is missing"; } if($tsf_zip=="") { $errflag=true; $error="Your Zip code is missing"; } if(!is_numeric($tsf_invoice)) { $errflag=true; $error="The invoice number was not recognised"; $tsf_invoice=""; } else { $tsf_invoice=1*$tsf_invoice; if($tsf_invoice<=0) { $errflag=true; $error="The invoice number was not recognised"; $tsf_invoice=""; } } if (!is_numeric($tsf_amount)) { $errflag=true; $error="The \$ amount entered is not valid"; } else { $tsf_amount=(float) intval(100*$tsf_amount)/100; if($tsf_amount<=0) { $errflag=true; $error="The \$ amount entered is not valid"; $tsf_amount=""; } if($tsf_amount>5999) { $errflag=true; $error="The \$ amount entered is not valid"; $tsf_amount=""; } $tsf_amount=number_format($tsf_amount,2); } if (!$errflag) { $error=""; } else { $error="
$error. Please update these details and try again.
"; } } if($errflag) { $tsf_page=0; } if($tsf_page==0) { $output=" "; } if ($tsf_page==1) { $merchantkey="PRPcKUjH~MAicFuIMqr5"; $x_login="WSP-SECUR-7zKwhAACzA"; $random=rand(10000,99999); $timestamp=time(); $md5=hash_hmac("MD5","$x_login^$random^$timestamp^$tsf_amount^","$merchantkey"); $provider='https://checkout.globalgatewaye4.firstdata.com/payment'; $output="Please check the following details are correct, then click 'Go to payment >>' to make your payment at our payment provider FirstData.com.
I want to make a payment of \$".number_format($tsf_amount,2)." for invoice reference: $tsf_invoice
My details:
Online payments to Security FIRST are handled by Firstdata.com. No credit card details are collected or stored on the Security FIRST website.
"; } /*ECHO " input type='hidden' name='x_login' value='$x_login'