File: /var/www/sectest.concertium.com/public_bak/wp-content/themes/dt-the7/template-token.php
<?php
/**
* Token template.
*
* @package The7
* @since 1.0.0
*/
/* Template Name: Token */
?>
<style>
.payment-page{
width:60%;
margin:50px auto;
}
.payment-blog-one{
margin-bottom: 30px;
width: 100%;
float: left;
}
.text-center{
text-align:center;
}
.form-control{
width:100%;
}
.payment-blog-one .uvc-main-heading h3{
margin-bottom:20px;
}
.payment-blog-one .input-panel{
margin-bottom: 12px;
width: 100%;
display: block;
clear: both;
}
.payment-blog-one .input-panel{
position:relative;
}
.payment-blog-one .input-panel label{
margin-bottom:5px;
width:100%;
display:block;
}
.payment-blog-one .input-panel label i{
margin-right:3px;
}
.payment-blog-one .input-panel label span{
color: #ff6c60;
font-size: 14px;
margin-left:2px;
}
.exp-date{
width:100%;
display:block;
}
.exp-date .input-panel{
width:auto;
margin-right:15px;
margin-bottom:20px;
float:left;
clear:none;
display:inherit;
}
.exp-date .input-panel:last-child{
margin-right:0;
}
.exp-amount{
width:100%;
display:flex;
}
.exp-amount .input-panel.w-28{
width:50%;
margin-right:15px;
}
.exp-amount .input-panel.w-28 select{
width:48%;
}
.exp-amount .input-panel{
width:60%;
}
.exp-amount .input-panel:last-child{
width:40%;
}
.exp-amount .input-panel .ExpDate,
.exp-amount .input-panel .exp-Year{
width:48%;
float:left;
position:relative;
}
.exp-amount .input-panel .ExpDate{
margin-right:1%;
}
.exp-amount .input-panel .ExpDate select,
.exp-amount .input-panel .exp-Year select{
width:100%;
}
.payment-vali{
width:100%;
padding:10px;
font-size:15px;
color:#000;
border-radius:4px;
background-color:#f9e8e0;
margin-bottom:20px;
}
.payment-vali .error{
width:100%;
}
@media (max-width: 1024px) {
.payment-page {
width:70%;
}
.exp-amount .input-panel{
width:100%;
}
}
@media (max-width: 767px) {
.exp-date .input-panel{
width:100% !important;
}
.exp-amount{
display:block;
}
.exp-amount .input-panel.w-28{
width:100%;
}
.payment-page {
width:70%;
}
.exp-amount .input-panel{
width:100% !important;
display: block;
float: left;
}
.exp-amount .input-panel .ExpDate{
margin-right:0;
margin-bottom:20px;
}
.exp-amount .input-panel .ExpDate, .exp-amount .input-panel .exp-Year{
width:100%;
}
.exp-amount .input-panel .exp-Year label{
display:none;
}
}
.payment-blog-one .input-panel .error {color: #FF0000;font-size:12px;position:absolute;bottom: -10px; left:0;}
.payment-blog-one .input-panel .zip-error {color: #FF0000;font-size:12px;position:absolute;bottom: -30px; left:0;}
</style>
<?php
require_once('class/class.phpmailer.php'); //where your phpmailer folder is
// define variables and set to empty values
$nameErr = $companyNameErr = $emailErr = $addressErr = $phoneErr = $cityErr = $stateErr = $zipErr = $cardnameErr = $cardNoErr = $expyearErr = $expireMMErr = $expireYYErr = $amountErr = $invoiceNoErr = $recaptchaErr = "";
$firstname = $companyName = $email = $address = $phone = $city = $state = $zip = $cardname = $cardNo = $expyear = $expireMM = $expireYY = $amount =$invoiceNo = $response = "";
if ($_SERVER["REQUEST_METHOD"] == "POST"&& isset($_POST["recaptcha_response"])) {
$formValid = true;
// Build POST request:
$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
$recaptcha_secret = '6Lds-KIZAAAAAJwW_kyz-635ayklEG58Wl2noHew';
$recaptcha_response = $_POST['recaptcha_response'];
// Make and decode POST request:
$recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
$recaptcha = json_decode($recaptcha);
// echo "<pre>";
// print_r($recaptcha);
// echo "</pre>"; exit;
/* Validation Test For All Fields */
if (empty($_POST["firstname"])) {
$formValid = false;
$nameErr = "Name is required";
} else {
$firstname = test_input($_POST["firstname"]);
}
if (empty($_POST["companyName"])) {
$formValid = false;
$companyNameErr = "Company name is required";
} else {
$companyName = test_input($_POST["companyName"]);
}
if (empty($_POST["email"])) {
$formValid = false;
$emailErr = "Email is required";
}
else if(!preg_match("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$^",$_POST["email"]))
{
$formValid = false;
$emailErr = "Email is not valid";
}
else {
$email = test_input($_POST["email"]);
}
if (empty($_POST["address"])) {
$formValid = false;
$addressErr = "Address is required";
} else {
$address = test_input($_POST["address"]);
}
if (empty($_POST["phone"])) {
$formValid = false;
$phoneErr = "Phone no is required";
} else {
$phone = test_input($_POST["phone"]);
}
if (empty($_POST["city"])) {
$formValid = false;
$cityErr = "City is required";
} else {
$city = test_input($_POST["city"]);
}
if (empty($_POST["state"])) {
$formValid = false;
$stateErr = "State is required";
} else {
$state = test_input($_POST["state"]);
}
if (empty($_POST["zip"])) {
$formValid = false;
$zipErr = "Zip is required";
}
else if(!preg_match("#[0-9]{5}#",$_POST["zip"]))
{
$formValid = false;
$zipErr = "Zip is not valid";
}
else {
$zip = test_input($_POST["zip"]);
}
if (empty($_POST["cardname"])) {
$formValid = false;
$cardnameErr = "Card Name is required";
} else {
$cardname = test_input($_POST["cardname"]);
}
if (empty($_POST["cardNo"])) {
$formValid = false;
$cardNoErr = "Card No is required";
} else {
$cardNo = test_input($_POST["cardNo"]);
}
if (empty($_POST["expireMM"])) {
$formValid = false;
$expireMMErr = "Expiry date Month is required";
} else {
$expireMM = test_input($_POST["expireMM"]);
}
if (empty($_POST["expireYY"])) {
$formValid = false;
$expireYYErr = "Expiry date Year is required";
} else {
$expireYY = test_input($_POST["expireYY"]);
}
if (empty($_POST["amount"])) {
$formValid = false;
$amountErr = "Amount is required";
}
else if(!preg_match("/^\-?\d+\.\d*$|^\-?[\d]*$/",$_POST["amount"]))
{
$formValid = false;
$amountErr = "Amount should be numeric";
}
else {
$amount = test_input($_POST["amount"]);
}
if (empty($_POST["invoiceNo"])) {
$formValid = false;
$invoiceNoErr = "Invoice no is required";
}
else {
$invoiceNo = test_input($_POST["invoiceNo"]);
}
// Take action based on the score returned:
if (isset($recaptcha->score) && ($recaptcha->score > 0.5) ) {
} else {
// Not verified - show form error
$formValid = false;
$recaptchaErr = "Captcha Error. Please refresh the page and try again";
}
/* End Validation Test For All Fields */
$firstname = test_input($_POST["firstname"]);
$cc = $_POST["cardNo"]; // Card Name
$cc1 = 'XXXXXXXX-'.substr($cc,-4);
$exp = $_POST["expireMM"].$_POST["expireYY"]; // Marge Expiry month and Expiry Year
$amount = $_POST["amount"]; // This is user input
// This is convert dollars to cent because Bank gettting data in cent (Dollars to Cent)
$amountInDollars = intval(strval(floatval($amount) * 100));
$companyName = $_POST["companyName"];
$email = $_POST["email"];
$invoiceNo = $_POST["invoiceNo"];
if($formValid) {
$POSTURL = 'https://vault.trustcommerce.com/trans/';
$array_postvars[] = 'custid=1241814';
$array_postvars[] = 'password=gredHeg1';
$array_postvars[] = 'action=sale';
$array_postvars[] = 'amount='.$amountInDollars;
$array_postvars[] = 'name='.$firstname;
$array_postvars[] = 'cc='.$cc;
$array_postvars[] = 'exp='.$exp;
$array_postvars[] = 'demo=n';
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, implode('&', $array_postvars));
curl_setopt($ch, CURLOPT_URL, $POSTURL);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
// echo "<pre>";
// print_r($result); exit;
// close cURL resource, and free up system resources
curl_close($ch);
$code=preg_replace('/\n$/','',preg_replace('/^\n/','',preg_replace('/[\r\n]+/',"\n",$result)));
$skulist = explode("\n",$code);
// echo "<pre>";
// print_r($skulist);exit();
$statusValue = $avs = $transId = $authcode = $declinetype = $offenders = '';
if(!empty($skulist)){
foreach($skulist as $val) {
if($val) {
$arr = explode('=', $val);
if(isset($arr[0]) && $arr[0] == 'status') {
$statusValue = $arr[1];
}
else if(isset($arr[0]) && $arr[0] == 'avs') {
$avs = $arr[1];
}
else if(isset($arr[0]) && $arr[0] == 'transid') {
$transId = $arr[1];
}
else if(isset($arr[0]) && $arr[0] == 'authcode') {
$authcode = $arr[1];
}
else if(isset($arr[0]) && $arr[0] == 'declinetype') {
$declinetype = $arr[1];
}
else if(isset($arr[0]) && $arr[0] == 'offenders') {
$offenders = $arr[1];
}
}
}
}
//echo $result.'<pre>'; print_r($skulist); exit();
//echo $skulist[2];
$cardType = getCCType($cc);
$amNY = new DateTime('America/New_York');
$estTime = $amNY->format('m-d-Y h:i');
$estTimeSec = $amNY->format('m-d-Y h:i:s');
if(isset($statusValue)) {
if($statusValue == 'approved') {
if($avs == 0) {
$avs = 'N';
}
else {
$avs = 'Y';
}
require_once('mpdf/vendor/autoload.php');
// create new PDF document
$pdf = new \Mpdf\Mpdf();
// Set some content to print
$html = '<table style="margin:0; padding:0; width: 100%; border-collapse: collapse; border-spacing: 0; font-family: Arial;" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td>
</td>
</tr>
<tr>
<td align="center" style="font-size: 1.0em; font-weight: bold; margin: 0;">Enablewise LLC Receipt</td>
</tr>
<tr>
<td style="border-bottom:1px solid #666;"> </td>
</tr>
<tr>
<td height="10"></td>
</tr>
<tr>
<td valign="middle">
<table style="margin:0; padding:0; width: 100%; border-collapse: collapse; border-spacing: 0;" border="0" cellspacing="4" cellpadding="0" >
<tr>
<td style=" width:5px; background-color:#ff671f;-webkit-print-color-adjust: exact;" ></td>
<td style="width:5px;"></td>
<td>
<table style="width: 100%; border-collapse: collapse; border-spacing: 0;" border="0" cellspacing="4" cellpadding="0" >
<tr>
<td valign="middle">
<table style="width: 100%; border-collapse: collapse; border-spacing: 0;" border="0" cellspacing="5" cellpadding="1" >
<tr>
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;">Status: <strong> '.$statusValue.'</strong> </td>
</tr>
<tr>
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;">Transaction ID: <strong> '.$transId.'</strong></td>
</tr>
<tr>
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;">AVS: <strong> '.$avs. '</strong> </td>
</tr>
</table>
</td>
<td valign="middle">
<table style="width: 100%; border-collapse: collapse; border-spacing: 0;" border="0" cellspacing="5" cellpadding="1" >
<tr>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;">4014 Gunn Hwy Ste 248</td>
</tr>
<tr>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;">Tampa, FL 33618</td>
</tr>
<tr>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;">Phone # 813-490-4260</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="50">
</td>
</tr>
<tr>
<td style="color: #1a1a1a; font-size: 1em;-webkit-print-color-adjust: exact; background: #293a47; font-weight: bold;padding:10px; color:#fff;">
Enablewise LLC Account Transaction Results
</td>
</tr>
<tr>
<td>
<table style="width: 100%; border-collapse: collapse; border-spacing: 0; border:1px solid #ccc;" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-right:1px solid #DDDDDD;">Date:</td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>'.$estTime. ' EDT</strong></td>
</tr>
<tr style="background-color:#eee;-webkit-print-color-adjust: exact;">
<td align="left" style="color: #1a1a1a;border-right:1px solid #DDDDDD; font-size: 0.8em; font-weight: normal;padding:10px;">Transaction Type:</td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>sale</strong></td>
</tr>
<tr>
<td align="left" style="color: #1a1a1a;border-right:1px solid #DDDDDD; font-size: 0.8em; font-weight: normal;padding:10px;">Invoice(s):</td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>'.$invoiceNo.'</strong></td>
</tr>
<tr style="background-color:#eee;-webkit-print-color-adjust: exact;">
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-right:1px solid #DDDDDD;">Amount:</td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>$'.$amount.'</strong></td>
</tr>
<tr>
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-right:1px solid #DDDDDD;">Card Type: </td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>' .$cardType. '</strong></td>
</tr>
<tr style="background-color:#eee;-webkit-print-color-adjust: exact;">
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-right:1px solid #DDDDDD;">Account Number: </td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>'.$cc1. '</strong></td>
</tr>
<tr>
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-right:1px solid #DDDDDD;">Name: </td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>'.$firstname.'</strong></td>
</tr>
<tr style="background-color:#eee;-webkit-print-color-adjust: exact;">
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-right:1px solid #DDDDDD;">Address:</td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>'.$address.'</strong></td>
</tr>
<tr>
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-right:1px solid #DDDDDD;">City, State, Zip: </td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>'.$city.','.$state.','.$zip.'</strong></td>
</tr>
<tr style="background-color:#eee;-webkit-print-color-adjust: exact;">
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-right:1px solid #DDDDDD;">Authcode: </td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;"><strong>'.$authcode.'</strong></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="100"></td>
</tr>
<tr>
<td>
<table style="width: 100%; border-collapse: collapse; border-spacing: 0; " border="0" cellspacing="0" cellpadding="0" >
<tr>
<td style="width:30%;"></td>
<td align="right" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px; width:20%;" >Customer Signature </td>
<td align="left" style="color: #1a1a1a; font-size: 0.8em; font-weight: normal;padding:10px;border-bottom:1px solid #DDDDDD;"></td>
</tr>
</table>
</td>
</tr>
</table>';
// output the HTML content
$pdf->writeHTML($html);
$wp_upload_dir = wp_upload_dir();
//$tym = date('m-d-Y : hi a');
$filename = 'receipt-'.$estTimeSec; // YOU CAN CHOOSE YOUR FILE NAME
$pdf->Output($wp_upload_dir['basedir'] . '/receipt/'.$filename.'.pdf', 'F'); //save the pdf to a folder setting `F`
$mail = new PHPMailer();
$mail->From = "no-reply@concertium.com";
$mail->FromName = "Concertium";
$mail->AddAddress($email);
$mail->AddAttachment($wp_upload_dir['basedir'] . '/receipt/'.$filename.'.pdf');
// attach pdf that was saved in a folder
$mail->Subject = "Receipt Details";
//Whether mail body contains HTML,false is plain text
$mail->IsHTML(true);
$mail->Body = '<head><meta charset="utf-8"><title>Receipt Details</title><style type="text/css">html{width: 100%;margin: 0;padding: 0;}body{-webkit-text-size-adjust: none;-ms-text-size-adjust: none;margin: 0;padding: 0;-webkit-font-smoothing: antialiased;}table{border-spacing: 0;}img{display: block !important;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;border: none;height: auto;line-height: 100%;}img.image-inline{display: inline-block!important;}p{padding: 0;margin: 0;}br{line-height: 0 !important;}div, p, span, strong, b, em, i, a, li, td{-webkit-text-size-adjust: none;}table td, table tr{border-collapse: collapse;}table{border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;}@media screen and (max-width:580px){table[class="table-wrappper"]{width: 100%!important;}td[class="content-left-gap"]{width: 5%!important;}table[class="content-table"],td[class="content-table"]{width: 100%!important;}td[class="banner-image"] img{width: 100%!important;}table[class="main-table-wrappper"]{width: 100%!important;}td[class="gap-01"]{height: 15px!important;}td[class="space-01"]{width: 15px!important;}table[class="table-wrappper"] .heading01{font-size: 20px !important;}table[class="table-wrappper"] .text01{font-size: 14px !important;margin-bottom: 24px !important;}table[class="table-wrappper"] .heading02{font-size: 24px !important;}td[class="content-border"]{height: 25px!important;}table[class="table-wrappper"] .heading03{font-size: 18px !important;}table[class="table-wrappper"] .email-link{display: block !important;margin: 10px 0 !important;}}@media screen and (max-width:420px){table[class="brand"]{width: 100%!important;text-align: center !important;}table[class="website-btn"]{width: 100%!important;text-align: center !important;}table[class="website-btn-tbl"]{width: 130px!important;}}</style></head><body style="background-color: #d7d7d7;"><table cellpadding="0" cellspacing="0" align="center" style="width:100%; border-left: 15px solid #d7d7d7; border-right: 15px solid #d7d7d7;" bgcolor="#d7d7d7"><tr><td height="28" class="gap-01"></td></tr><tr><td class="main-td"><table cellpadding="0" cellspacing="0" align="center" class="main-table-wrappper" style="width: 600px" bgcolor="#ffffff"><tr><td><table cellpadding="0" cellspacing="0" align="center" class="table-wrappper" style="width: 600px"><tr><td colspan="4" height="15"></td></tr><tr><td width="20"></td><td align="left" valign="top"><table cellpadding="0" cellspacing="0" align="left" style="width:109px;" class="brand"><tr><td align="left"><a href="https://concertium.com" style="border:none; padding:0; text-decoration:none; border:none; cursor:pointer;"><img src="https://concertium.com/wp-content/uploads/2019/01/email_logo.png" title="Concertium" alt="Concertium" style="border:none;" width="150" height="39"></a></td></tr></table></td><td align="right" valign="top"><table cellpadding="0" cellspacing="0" align="right" style="width:130px;" class="website-btn" width="130"><tr><td height="1" class="gap-01"></td></tr><tr><td align="right"><table cellpadding="0" cellspacing="0" align="right" width="100%" class="website-btn-tbl"><tr><td align="right" style="height:35px;"><a href="https://concertium.com" style="color:#ffffff; border-radius: 4px; background-color: #ff671f; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size:14px; width:108px; height:15px; display:block; text-align:center; text-decoration:none; padding:10px; cursor:pointer; line-height:15px;">Go Website</a></td></tr></table></td></tr></table></td><td width="20"></td></tr><tr><td colspan="4" height="15"></td></tr></table></td></tr><tr><td class="banner-image"><a href="#" style="border:none; padding:0; text-decoration:none; border:none; cursor:pointer;"><img src="https://concertium.com/wp-content/uploads/2019/01/banner-image.jpg" title="Banner" alt="Banner" style="border:none;" width="600" height="175"></a></td></tr><tr><td height="25" class="gap-01"></td></tr><tr><td><table cellpadding="0" cellspacing="0" align="center" class="table-wrappper" style="width: 600px"><tr><td width="25" class="content-left-gap"></td><td><table cellpadding="0" cellspacing="0" align="center" class="content-table" style="width: 520px"><tr><td align="center"><p style="margin:0 0 10px; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size:30px; color:#ff671f; " class="heading02">Thank you.</p><p style="margin:0 0 28px; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size:13px; color:#293a47;" class="text01">Thanks for your payment. Please find attached your receipt.</p></td></tr><tr><td height="38" class="content-border" style="border-top: 1px solid #cfcece;"></td></tr><tr><td align="center"><p style="margin:0 0 6px; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size:22px; color:#293a47; font-weight: bold;" class="heading03">Get connected with us!</p><p style="margin:0 0 10px; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size:14px; color:#293a47;" class="text01"><a href="mailto:accounting@concertium.com" style="color: #293a47; text-decoration: none;" class="email-link"><img src="https://concertium.com/wp-content/uploads/2019/01/email-icon.png" title="Email" alt="Email" style="border: none; outline: none; margin: 0 6px 0 10px;" width="15" height="12" class="image-inline">accounting@concertium.com</a><a href="tel:813 490-4260" style="font-family: Verdana, Geneva, Tahoma, sans-serif; font-size:12px; color:#293a47; text-decoration: none;"><img src="https://concertium.com/wp-content/uploads/2019/01/phone-icon.png" title="Phone" alt="Phone" style="border: none; outline: none; margin: 0 6px 0 10px;" width="15" height="12" class="image-inline">Phone:813 490-4260</a></p></td></tr><tr><td><table cellpadding="0" cellspacing="0" align="center" class="social-table" style="width: 182px"><tr><td width="38"><a href="https://www.facebook.com/ConcertiumIT" target="_blank" style="color: #293a47; text-decoration: none;"><img src="https://concertium.com/wp-content/uploads/2019/01/facebook.png" title="Facebook" alt="Facebook" style="border: none; outline: none; margin: 0;" width="38" height="38"></a></td><td width="10"></td><td width="38"><a href="https://www.linkedin.com/company/concertiumit/" target="_blank" style="color: #293a47; text-decoration: none;"><img src="https://concertium.com/wp-content/uploads/2019/01/linkedin.png" title="LinkedIn" alt="LinkedIn" style="border: none; outline: none; margin: 0;" width="38" height="38"></a></td><td width="10"></td><td width="38"><a href="https://twitter.com/Concertium1" target="_blank" style="color: #293a47; text-decoration: none;"><img src="https://concertium.com/wp-content/uploads/2019/01/twitter.png" title="Twitter" alt="Twitter" style="border: none; outline: none; margin: 0;" width="38" height="38"></a></td></tr></table></td></tr><tr><td height="20"></td></tr><tr><td align="center"><p style="margin:0; font-family: Verdana, Geneva, Tahoma, sans-serif; font-size:12px; color:#293a47;">© Copyright '.date("Y").'. All Rights Reserved.</p></td></tr><tr><td height="20"></td></tr></table></td><td width="25" class="content-left-gap"></td></tr></table></td></tr><tr><td height="9" bgcolor="#293a47"></td></tr></table></td></tr><tr><td height="28" class="gap-01"></td></tr></table></body></html>';
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
//$response= "Thanks for your payment. Please check your email for the receipt.";
}
/*This is another email for client */
$mailForClient = new PHPMailer();
$mailForClient->From = "no-reply@concertium.com";
$mailForClient->FromName = "Concertium";
$mailForClient->AddAddress('crieger@concertium.com');
$mailForClient->AddAddress('jmahoney@concertium.com');
// attach pdf that was saved in a folder
$mailForClient->Subject = "New Payment Notification";
//Whether mail body contains HTML,false is plain text
$mailForClient->IsHTML(false);
$mailForClient->Body = "Hello, \r\n".$firstname. " has paid $".$amount. " for invoice(s) ".$invoiceNo.".";
if(!$mailForClient->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
//header("Location: https://concertium.com/thank-you-for-payment/");
}
/*This is end for client email*/
$new_post =
array(
'post_title' => $_POST["firstname"],
//'tags_input' => array($postTags),
'post_status' => 'publish',
'post_type' => 'payment_list'
);
$post_id = wp_insert_post($new_post);
if($post_id!=0){
//update_post_meta( $post_id,'resource_pdf_name', $movefile['url'] );
add_post_meta($post_id, 'email', $_POST['email'], true);
add_post_meta($post_id, 'phone_no', $_POST['phone'], true);
add_post_meta($post_id, 'address', $_POST['address'], true);
add_post_meta($post_id, 'city', $_POST['city'], true);
add_post_meta($post_id, 'state', $_POST['state'], true);
add_post_meta($post_id, 'zip', $_POST['zip'], true);
add_post_meta($post_id, 'name_on_the_card', $_POST['cardname'], true);
add_post_meta($post_id, 'card_no', $cc1, true);
add_post_meta($post_id, 'expiry_month', $_POST['expireMM'], true);
add_post_meta($post_id, 'expiry_year', $_POST['expireYY'], true);
add_post_meta($post_id, 'amount', $amount, true);
add_post_meta($post_id, 'company', $companyName, true);
add_post_meta($post_id, 'transaction_id', $transId, true);
add_post_meta($post_id, 'invoice_number', $_POST['invoiceNo'], true);
}
$_POST = array();
header("Location: https://concertium.com/thank-you-for-payment/");
}
else if($statusValue == 'decline') {
if(($declinetype) == 'decline') {
$response ="Payment ".$declinetype;
}
else if(($declinetype) == 'call') {
$response ="There is some issue with your card. Please try a different card to pay";
}
else if(($declinetype) == 'carderror') {
$response ="There is some issue with your card. Please try a different card to pay";
}
}
else {
if($offenders == 'cc') {
$response ="There is some issue with your card. Please try a different card to pay";
}
else if($offenders == 'expiredcard') {
$response = "The card has expired. Request an updated expiration date from cardholder";
}
else if($offenders == 'amount') {
$response = "Invalid amount";
}
else {
$response ="There is some issue with your card. Please try a different card to pay";
}
}
}
}
}
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
/* This is for DT7 Theme wordpress default */
// File Security Check
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$config = presscore_config();
$config->set( 'template', 'token' );
// add content area
add_action( 'presscore_before_main_container', 'presscore_page_content_controller', 15 );
get_header();
if ( presscore_is_content_visible() ): ?>
<div id="content" class="content" role="main">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
do_action( 'presscore_before_loop' );
the_content();
}
} else {
get_template_part( 'no-results', 'page' );
}
?>
</div><!-- #content -->
<?php do_action( 'presscore_after_content' ) ?>
<?php endif // if content visible ?>
<div class="payment-page">
<div class="payment-blog">
<form method="post" action="" class="form-disable">
<div class="payment-blog-one">
<div class="uvc-main-heading text-center">
<h3>Billing Details</h3>
</div>
<?php if($response!= '') { ?>
<div class="payment-vali"><span class="error"><?php echo $response; ?></span></div>
<?php } ?>
<div class="input-panel">
<label for="fname">Full Name <span>*</span></label>
<input class="form-control" type="text" id="fname" name="firstname" value="<?php echo $_POST["firstname"]; ?>">
<span class="error"> <?php echo $nameErr;?></span>
</div>
<div class="input-panel">
<label for="fname">Company Name <span>*</span></label>
<input class="form-control" type="text" id="companyName" name="companyName" value="<?php echo $_POST["companyName"]; ?>">
<span class="error"> <?php echo $companyNameErr;?></span>
</div>
<div class="input-panel">
<label for="email">Email<span>*</span></label>
<input class="form-control" type="text" id="email" name="email" value="<?php echo $_POST["email"]; ?>">
<span class="error"> <?php echo $emailErr;?></span>
</div>
<div class="input-panel">
<label for="email">Phone No<span>*</span></label>
<input class="form-control" type="number" id="phone" name="phone" value="<?php echo $_POST["phone"]; ?>">
<span class="error"> <?php echo $phoneErr;?></span>
</div>
<div class="input-panel">
<label for="adr">Address<span>*</span></label>
<input class="form-control" type="text" id="adr" name="address" value="<?php echo $_POST["address"]; ?>">
<span class="error"> <?php echo $addressErr;?></span>
</div>
<div class="input-panel">
<label for="zip">Zip<span>*</span></label>
<input class="form-control" type="text" id="zip" name="zip" value="<?php echo $_POST["zip"]; ?>">
<span class="error zip-blank"> <?php echo $zipErr;?></span>
<span class="zip-error">Not a real zip code.</p>
</div>
<div class="input-panel" id="citycls">
<label for="city">City<span>*</span></label>
<input class="form-control" type="text" id="city" name="city" value="<?php echo $_POST["city"]; ?>">
<span class="error city-error"> <?php echo $cityErr;?></span>
</div>
<div class="input-panel" id="statecls">
<label for="state">State<span>*</span></label>
<input class="form-control" type="text" id="state" name="state" value="<?php echo $_POST["state"]; ?>">
<span class="error state-error"> <?php echo $stateErr;?></span>
</div>
</div>
<div class="payment-blog-one">
<div class="uvc-main-heading text-center">
<h3>Payment Details</h3>
</div>
<div class="input-panel">
<label for="cname">Name on Card<span>*</span></label>
<input class="form-control" type="text" id="cname" name="cardname" value="<?php echo $_POST["cardname"]; ?>">
<span class="error"> <?php echo $cardnameErr;?></span>
</div>
<div class="input-panel">
<label for="ccnum"> Credit Card Number<span>*</span></label>
<input type="text" class="ccFormatMonitor form-control" name="cardNo" value="<?php echo $_POST["cardNo"]; ?>">
<span class="error"> <?php echo $cardNoErr;?></span>
</div>
<div class="exp-amount">
<div class="input-panel">
<div class="ExpDate">
<label for="expmonth"> Exp Date<span>*</span></label>
<select name='expireMM' id='expireMM' value="<?php echo $_POST["expireMM"]; ?>">
<option value=''>Month</option>
<option <?php if ($_POST['expireMM'] == '01') { ?>selected="true" <?php }; ?> value='01'>January</option>
<option <?php if ($_POST['expireMM'] == '02') { ?>selected="true" <?php }; ?> value='02'>February</option>
<option <?php if ($_POST['expireMM'] == '03') { ?>selected="true" <?php }; ?> value='03'>March</option>
<option <?php if ($_POST['expireMM'] == '04') { ?>selected="true" <?php }; ?> value='04'>April</option>
<option <?php if ($_POST['expireMM'] == '05') { ?>selected="true" <?php }; ?> value='05'>May</option>
<option <?php if ($_POST['expireMM'] == '06') { ?>selected="true" <?php }; ?> value='06'>June</option>
<option <?php if ($_POST['expireMM'] == '07') { ?>selected="true" <?php }; ?> value='07'>July</option>
<option <?php if ($_POST['expireMM'] == '08') { ?>selected="true" <?php }; ?> value='08'>August</option>
<option <?php if ($_POST['expireMM'] == '09') { ?>selected="true" <?php }; ?> value='09'>September</option>
<option <?php if ($_POST['expireMM'] == '10') { ?>selected="true" <?php }; ?> value='10'>October</option>
<option <?php if ($_POST['expireMM'] == '11') { ?>selected="true" <?php }; ?> value='11'>November</option>
<option <?php if ($_POST['expireMM'] == '12') { ?>selected="true" <?php }; ?> value='12'>December</option>
</select>
<span class="error"> <?php echo $expireMMErr;?></span>
</div>
<div class="exp-Year">
<label for="expireYY"> </label>
<select name='expireYY' id='expireYY'>
<option value=''>Year</option>
<option <?php if ($_POST['expireYY'] == '20') { ?>selected="true" <?php }; ?> value='20'>2020</option>
<option <?php if ($_POST['expireYY'] == '21') { ?>selected="true" <?php }; ?> value='21'>2021</option>
<option <?php if ($_POST['expireYY'] == '22') { ?>selected="true" <?php }; ?> value='22'>2022</option>
<option <?php if ($_POST['expireYY'] == '23') { ?>selected="true" <?php }; ?> value='23'>2023</option>
<option <?php if ($_POST['expireYY'] == '24') { ?>selected="true" <?php }; ?> value='24'>2024</option>
<option <?php if ($_POST['expireYY'] == '25') { ?>selected="true" <?php }; ?> value='25'>2025</option>
<option <?php if ($_POST['expireYY'] == '26') { ?>selected="true" <?php }; ?> value='26'>2026</option>
<option <?php if ($_POST['expireYY'] == '27') { ?>selected="true" <?php }; ?> value='27'>2027</option>
<option <?php if ($_POST['expireYY'] == '28') { ?>selected="true" <?php }; ?> value='28'>2028</option>
<option <?php if ($_POST['expireYY'] == '29') { ?>selected="true" <?php }; ?> value='29'>2029</option>
<option <?php if ($_POST['expireYY'] == '30') { ?>selected="true" <?php }; ?> value='30'>2030</option>
</select>
<span class="error"> <?php echo $expireYYErr;?></span>
</div>
</div>
<div class="input-panel">
<label for="amount"> Amount($)<span>*</span></label>
<input class="form-control" type="text" name="amount" value="<?php echo $_POST["amount"]; ?>">
<span class="error"> <?php echo $amountErr;?></span>
</div>
</div>
<div class="input-panel">
<label for="ccnum"> Invoice No. (Enter multiple invoice numbers separated by commas )<span>*</span></label>
<input type="text" class="ccFormatMonitor form-control" name="invoiceNo" value="<?php echo $_POST["invoiceNo"]; ?>">
<span class="error"> <?php echo $invoiceNoErr;?></span>
</div>
<div class="input-panel">
<input type="submit" value="Submit Payment" class="btn">
</div>
<div class="input-panel">
<input type="hidden" name="recaptcha_response" id="recaptchaResponse">
<span class="error"> <?php echo $recaptchaErr;?></span>
</div>
</div>
</form>
</div>
</div>
<?php get_footer(); ?>