| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/usa_sites/pcisecureform.com/ |
Upload File : |
<?php
session_start();
require_once($_SERVER['DOCUMENT_ROOT'].'/php/mysql.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/php/phpCrypto.class.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/php/NetworkMerchants.php');
$db = new MySQL('db.syndbs.com', 'lc2user', 'SYN57CRUZ', 'asap_leads');
function time_left($str) {
$secs = strtotime($str) - time();
$minutes = floor($secs / 60);
$seconds = $secs % 60;
return str_pad($minutes,2,'0',STR_PAD_LEFT).':'.str_pad($seconds,2,'0',STR_PAD_LEFT).' mins';
}
function pretty_phone($str) {
$str = preg_replace('/[^0-9]/','',$str);
return '('.substr($str,0,3).') '.substr($str,3,3).'-'.substr($str,6);
}
function DoSale($bq_id) {
$crypto = new phpCrypto();
$nmi = new gwapi();
$nmi->setLogin('asfap','znFWG_pV73Gn7y','asapcms');
$db = new MySQL('db.syndbs.com', 'lc2user', 'SYN57CRUZ', 'asap_leads');
$res = $db->get_results("SELECT pi.customer_vault_id,r.rebill_proc,r.first_name as fname, r.last_name as lname, r.address1 as address, r.city, r.state, r.zip, r.country, r.phone, r.email, r.id as leadid, 'Kit' as description, bq.auth_amount as billing_amount, pi.cc_num, pi.cc_exp_year, pi.cc_exp_month, pi.cc_cvv
FROM asap_leads.billing_queue bq
LEFT JOIN asap_leads.payment_info pi ON bq.payment_info_id=pi.id
LEFT JOIN asap_leads.client_info r ON r.id=bq.client_id
WHERE bq.id='".$db->clean($bq_id)."'");
$user = $res[0];
if(empty($user->rebill_proc)) {
//$num = rand(1,2);
//if($num==1) {
// $nmi->setLogin('asfap14','5881Fall20','498240335881');
// $db->query("UPDATE client_info SET rebill_proc='asfap14' WHERE id='".$db->clean($user->leadid)."'");
//} else {
$nmi->setLogin('asfap','znFWG_pV73Gn7y','asapcms');
$db->query("UPDATE client_info SET rebill_proc='asfap' WHERE id='".$db->clean($user->leadid)."'");
//}
} else {
//if($user->rebill_proc=='asfap14') {
// $nmi->setLogin('asfap14','5881Fall20','498240335881');
//} else {
$nmi->setLogin('asfap','znFWG_pV73Gn7y','asapcms');
//}
}
$user->cc_num = $crypto->decrypt($user->cc_num);
$user->cc_cvv = $crypto->decrypt($user->cc_cvv);
$nmi->setBilling($user->fname,$user->lname,"",$user->address,"", $user->city,$user->state,$user->zip,$user->country,$user->phone,"",$user->email,"");
$nmi->setShipping($user->fname,$user->lname,"",$user->address,"",$user->city,$user->state,$user->zip,$user->country,$user->email);
$nmi->setOrder($user->leadid,$user->description,"","","","");
$cc_year = $user->cc_exp_year;
if(strlen($cc_year) > 2) { $cc_year = substr($cc_year, -2);}
if(!empty($user->customer_vault_id)) {
$data = array();
$data['username'] = 'asfap';
$data['password'] = 'znFWG_pV73Gn7y';
$data['processor_id'] = 'asapcms';
$data['customer_vault_id'] = $user->customer_vault_id;
$data['amount'] = $user->billing_amount;
$data['type'] = 'sale';
$result = charge_nmi_partial($data);
$nmi->responses = $result;
} else {
$result = $nmi->doSale($user->billing_amount,$user->cc_num,$user->cc_exp_month.$cc_year,$user->cc_cvv);
}
$response = array();
$response['response'] = $nmi->responses['response'];
$response['transactionid'] = $nmi->responses['transactionid'];
$response['avsresponse'] = $nmi->responses['avsresponse'];
$response['cvvresponse'] = $nmi->responses['cvvresponse'];
$response['ordernumber'] = $nmi->responses['authcode'];
$response['transresponse'] = $nmi->responses['responsetext'];
$response['proc_id'] = 'asapcms';
$response['gateway'] = 'giso';
return $response;
}
function charge_nmi_partial($postdata) {
$query = '';
foreach($postdata as $k=>$v) {
$query .= ($query=='') ? '' : '&';
$query .= $k.'='.$v;
}
$c_url = "https://secure.networkmerchants.com/api/transact.php";
$data = shell_exec('curl --tlsv1.2 --data "'.$query.'" '.$c_url);
$data = explode("&",$data);
for($i=0;$i<count($data);$i++) {
$rdata = explode("=",$data[$i]);
$responses[$rdata[0]] = $rdata[1];
}
return $responses;
}
function cleanup_processor_response($response_text) {
$return_string = $response_text;
$filters = array(
'/REFID:\d+/i',
'/\[\d{2}-\d+\]/'
);
foreach($filters as $search) {
$return_string = preg_replace($search, '', $return_string);
}
//Also strip and whitespace characters
$return_string = preg_replace('/\s+/', ' ', $return_string);
return $return_string;
}
if(!empty($_POST['action'])) {
if($_POST['action']=='save_cc_info') {
$errors = '';
if(empty($_POST['cc_num'])) {
$errors .= ($errors=='') ? 'You must enter a credit card number.' : "\n".'You must enter a credit card number.';
} else {
$_POST['cc_num'] = preg_replace('/[^0-9]/','',$_POST['cc_num']);
if(empty($_POST['cc_num'])) {
$errors .= ($errors=='') ? 'You must enter a credit card number.' : "\n".'You must enter a credit card number.';
} else {
if(substr($_POST['cc_num'],0,1)=='3') {
if(strlen($_POST['cc_num'])!=15) {
$errors .= ($errors=='') ? 'American Express cards should be 15 digits long. You have entered '.strlen($_POST['cc_num']).' digits.' : "\n".'American Express cards should be 15 digits long. You have entered '.strlen($_POST['cc_num']).' digits.';
}
} else {
if(strlen($_POST['cc_num'])!=16) {
$errors .= ($errors=='') ? 'Your credit card should be 16 digits long. You have entered '.strlen($_POST['cc_num']).' digits.' : "\n".'Your credit card should be 15 digits long. You have entered '.strlen($_POST['cc_num']).' digits.';
}
}
}
}
if(empty($_POST['cc_exp_month'])) {
$errors .= ($errors=='') ? 'You must enter an expiration month.' : "\n".'You must enter an expiration month.';
}
if(empty($_POST['cc_exp_year'])) {
$errors .= ($errors=='') ? 'You must enter an expiration year.' : "\n".'You must enter an expiration year.';
}
if(($_POST['cc_exp_year'] < date('Y')) || ($_POST['cc_exp_year']==date('Y') && ($_POST['cc_exp_month']*1) < (date('m')*1))) {
$errors .= ($errors=='') ? 'The credit card expiration has expired.' : "\n".'The credit card expiration has expired.';
}
if(empty($_POST['cc_cvv'])) {
if(substr($_POST['cc_first_four'],0,1)!=3) {
$errors .= ($errors=='') ? 'You must enter an CVV number (3 digits on back of card).' : "\n".'You must enter an CVV number (3 digits on back of card).';
} else {
$errors .= ($errors=='') ? 'You must enter an CVV number (4 digits on front of card near the top right).' : "\n".'You must enter an CVV number (4 digits on front of card near the top right).';
}
}
if(empty($_POST['first'])) {
$errors .= ($errors=='') ? 'You must enter your first name.' : "\n".'You must enter your first name.';
}
if(empty($_POST['last'])) {
$errors .= ($errors=='') ? 'You must enter your last name.' : "\n".'You must enter your last name.';
}
if(empty($_POST['email'])) {
$errors .= ($errors=='') ? 'You must enter your email.' : "\n".'You must enter your email.';
}
if(empty($_POST['phone_1'])) {
$errors .= ($errors=='') ? 'You must enter your phone.' : "\n".'You must enter your phone.';
} else {
$_POST['phone_1'] = preg_replace('/[^0-9]/','',$_POST['phone_1']);
}
if(empty($_POST['zip'])) {
$errors .= ($errors=='') ? 'You must enter the zip code.' : "\n".'You must enter the zip code.';
}
if(!empty($errors)) {
die($errors);
}
$res = $db->get_results("SELECT * FROM lc2admin.cc_info_request_update WHERE id='".$db->clean($_POST['cid'])."'");
if(empty($res)) {
die('There was an error processing your request. Please have your representative send you a new link.');
}
$responses = array();
$c_url = "https://secure.networkmerchants.com/api/transact.php";
//if(!empty($_POST['customer_vault_id'])) {
// $query = "customer_vault=update_customer&customer_vault_id=".$_POST['customer_vault_id'];
//} else {
$query = "customer_vault=add_customer";
//}
$query .= "&username=asfap";
$query .= "&password=znFWG_pV73Gn7y&";
// Sales Information
$query .= "ccnumber=" . urlencode($_POST['cc_num']) . "&";
$query .= "ccexp=" . urlencode($_POST['cc_exp_month'] . substr($_POST['cc_exp_year'],-2)) . "&";
// Order Information
$query .= "ipaddress=" . urlencode($_SERVER['REMOTE_ADDR']) . "&";
$query .= "ponumber=" . urlencode($_POST['phone_1']) . "&";
// Billing Information
$query .= "firstname=" . urlencode($_POST['first']) . "&";
$query .= "lastname=" . urlencode($_POST['last']) . "&";
$query .= "company=" . urlencode('') . "&";
$query .= "address1=" . urlencode($_POST['street_address']) . "&";
$query .= "address2=" . urlencode('') . "&";
$query .= "city=" . urlencode($_POST['city']) . "&";
$query .= "state=" . urlencode($_POST['state']) . "&";
$query .= "zip=" . urlencode($_POST['zip']) . "&";
$query .= "country=" . urlencode('US') . "&";
$query .= "phone=" . urlencode($_POST['phone_1']) . "&";
$query .= "fax=" . urlencode('') . "&";
$query .= "email=" . urlencode($_POST['email']) . "&";
$query .= "website=" . urlencode('') . "&";
// Shipping Information
$query .= "shipping_firstname=" . urlencode($_POST['first']) . "&";
$query .= "shipping_lastname=" . urlencode($_POST['last']) . "&";
$query .= "shipping_company=" . urlencode('') . "&";
$query .= "shipping_address1=" . urlencode($_POST['street_address']) . "&";
$query .= "shipping_address2=" . urlencode('') . "&";
$query .= "shipping_city=" . urlencode($_POST['city']) . "&";
$query .= "shipping_state=" . urlencode($_POST['state']) . "&";
$query .= "shipping_zip=" . urlencode($_POST['zip']) . "&";
$query .= "shipping_country=" . urlencode('US') . "&";
$query .= "shipping_email=" . urlencode($_POST['email']);
$data = shell_exec('curl --tlsv1.2 --data "'.$query.'" '.$c_url);
$data = explode("&",$data);
$responses = array();
for($i=0;$i<count($data);$i++) {
$rdata = explode("=",$data[$i]);
$responses[$rdata[0]] = $rdata[1];
}
if($responses['response']=='3') {
/*$marketer_res = $db->get_results("SELECT marketer FROM lc2admin.cc_info_request_update WHERE id='".$db->clean($_POST['cid'])."'");
$body = '<p>Client Name: '.$_POST['first'].' '.$_POST['last'].'</p>
<p>Marketer: '.$marketer_res[0]->marketer.'</p>
<p>CC Type: '.$_POST['cc_type'].'</p>
<p>Card Length: '.strlen($_POST['cc_num']).'</p>
<pre>'.print_r($responses,true).'</pre>';
require_once($_SERVER['DOCUMENT_ROOT'].'/php/mailgun.php');
mailgun_send_message('jeremy@usbusinessfundingsolutions.com','NoReply@surfcrm.com','PCI Customer Vault Failed',$body,1,'PCI Customer Vault Failed','heinz57@gmail.com,golfjrk@gmail.com','','',0,array(),'',0);
*/
if(strpos($responses['responsetext'],'REFID:')!==false) {
$arr = explode('REFID:',$responses['responsetext']);
$responses['responsetext'] = trim($arr[0]);
}
$cc_passed = strtoupper($_POST['cc_type']).', '.strlen($_POST['cc_num']);
$db->query("INSERT INTO lc2admin.cc_info_errors
(
request_type
,request_id
,error_message
,cc_passed
,ts
) VALUES (
'marketer'
,'".$db->clean($_POST['cid'])."'
,'".$db->clean($responses['responsetext'])."'
,'".$db->clean($cc_passed)."'
,NOW()
)");
die('There was a problem saving your card: '.$responses['responsetext']);
} else {
require_once($_SERVER['DOCUMENT_ROOT'].'/php/mailgun.php');
$db->query("UPDATE lc2admin.cc_info_request_update
SET is_updated=1
,client_ip_address='".$db->clean($_SERVER['REMOTE_ADDR'])."'
WHERE id='".$db->clean($_POST['cid'])."'");
require_once($_SERVER['DOCUMENT_ROOT'].'/php/phpCrypto.class.php');
$crypto = new phpCrypto();
$db->query("INSERT INTO asap_leads.payment_info
(
client_id
,payment_type
,name_as_appears
,street_address
,city
,state
,zip
,cc_num
,cc_exp_month
,cc_exp_year
,cc_cvv
,cc_first_four
,cc_last_four
,customer_vault_id
) VALUES (
'".$db->clean($_POST['rid'])."'
,'credit_card'
,'".$db->clean($_POST['first'].' '.$_POST['last'])."'
,'".$db->clean($_POST['street_address'])."'
,'".$db->clean($_POST['city'])."'
,'".$db->clean($_POST['state'])."'
,'".$db->clean($_POST['zip'])."'
,'".$db->clean($crypto->encrypt(substr($_POST['cc_num'],0,6).'******'.substr($_POST['cc_num'],-4)))."'
,'".$db->clean($_POST['cc_exp_month'])."'
,'".$db->clean($_POST['cc_exp_year'])."'
,''
,'".$db->clean(substr($_POST['cc_num'],0,4))."'
,'".$db->clean(substr($_POST['cc_num'],-4))."'
,'".$db->clean($responses['customer_vault_id'])."'
)");
$pid = $db->last_insert_id();
$db->query("UPDATE asap_leads.client_info
SET finance_recurring_payment_info_id='".$db->clean($pid)."'
WHERE id='".$db->clean($_POST['rid'])."'");
if(!empty($_POST['bq_id'])) {
$db->query("UPDATE asap_leads.billing_queue
SET payment_info_id='".$db->clean($pid)."'
WHERE id='".$db->clean($_POST['bq_id'])."'");
$bres = $db->get_results("SELECT id,auth_amount FROM asap_leads.billing_queue WHERE id='".$db->clean($_POST['bq_id'])."'");
if(!empty($bres[0]->auth_amount)) {
$rs = DoSale($_POST['bq_id']);
if($rs['response']=='1') {
$client_res = $db->get_results("SELECT ci.id as cid,ci.first_name,ci.last_name,ci.email,ci.salutation,bq.* FROM asap_leads.`billing_queue` bq LEFT JOIN client_info ci ON ci.id=bq.client_id WHERE bq.id='".$db->clean($_POST['bq_id'])."'");
if(!empty($client_res)) {
$db->query("UPDATE asap_leads.client_info SET client_status='Active',client_status_description='',client_status_date='".date("Y-m-d H:i:s")."' WHERE id='".$db->clean($r->client_id)."'");
$db->query("UPDATE asap_leads.orders SET payment_number=payment_number+1 WHERE id='".$db->clean($r->order_id)."'");
$billing_check = $db->get_results("SELECT COUNT(*) as c FROM asap_leads.billing_queue WHERE order_id='".$db->clean($r->order_id)."' AND auth_response_num='1'");
if($billing_check[0]->c==0) {
mailgun_send_message('support@americansocietyap.org','NoReply@surfcrm.com',$r->first_name.' '.$r->last_name.' first successful payment',$r->first_name.' '.$r->last_name.' first payment was successful, please send the kit.',1,'ASAP first successful payment');
}
$mres = $db->get_results("SELECT kit_client_id FROM asap_leads.client_info WHERE id='".$db->clean($r->client_id)."'");
if(!empty($mres)) {
$db->query("UPDATE asap.Members SET active='1' WHERE id='".$db->clean($mres[0]->kit_client_id)."'");
}
}
} elseif($rs['response']=='2') {
$tran_response = $rs['transresponse'];
$temp_response_text = cleanup_processor_response($tran_response);
$reason = trim(strtolower(preg_replace('/\s+\[[0-9\-]*\]/', '',preg_replace('/ [a-z]*:[0-9]*/i','',$temp_response_text))));
die('Your card declined for the following reason: '.$reason);
} else {
$tran_response = $rs['transresponse'];
$temp_response_text = cleanup_processor_response($tran_response);
$reason = trim(strtolower(preg_replace('/\s+\[[0-9\-]*\]/', '',preg_replace('/ [a-z]*:[0-9]*/i','',$temp_response_text))));
die('Your card declined for the following reason: '.$reason);
}
$db->query("UPDATE asap_leads.billing_queue SET
auth_num='".$db->clean($rs['ordernumber'])."',
auth_response_num='".$db->clean($rs['response'])."',
auth_response='".$db->clean($rs['transresponse'])."',
auth_transaction_id='".$db->clean($rs['transactionid'])."',
auth_date='".date('Y-m-d H:i:s')."',
bill_response_num='".$db->clean($rs['response'])."',
bill_response='".$db->clean($rs['transresponse'])."',
bill_transaction_id='".$db->clean($rs['transactionid'])."',
bill_date='".date('Y-m-d H:i:s')."',
bill_amount=auth_amount
WHERE id='".$db->clean($_POST['bq_id'])."'");
//Maybe insert note here
$db->query("INSERT INTO asap_leads.notes (leadid,employee,notedate,notes,sys_note)
VALUES ('".$db->clean($r->client_id)."','System','".date('Y-m-d H:i:s')."','Auto Billed a charge of $".($r->auth_amount*1).".','1')");
}
}
$body = '<p>An ASAP client has updated their credit card from the decline email.</p>
<p>Client Name: '.$_POST['first'].' '.$_POST['last'].'</p>
<p>CC Type: '.$_POST['cc_type'].'</p>';
mailgun_send_message('hanskirchhausen@gmail.com','NoReply@surfcrm.com','PCI Customer Vault Updated',$body,1,'PCI Customer Vault Updated','','','',0,array(),'',0);
}
}
die();
}
$res = $db->get_results("SELECT c.*
FROM lc2admin.cc_info_request_update c
WHERE c.code='".$db->clean($_GET['c'])."'
ORDER BY id DESC LIMIT 1");
if(!empty($res)) {
$siteCode = $res[0]->site_code;
$res = $db->get_results("SELECT c.*,r.id as rid,r.first_name as first,r.last_name as last,r.address1,r.city,r.state,r.zip,r.phone,r.email,pi.customer_vault_id
FROM lc2admin.cc_info_request_update c
LEFT JOIN asap_leads.client_info r ON r.id=c.client_id
LEFT JOIN asap_leads.payment_info pi ON pi.id=r.finance_recurring_payment_info_id
WHERE c.code='".$db->clean($_GET['c'])."'
AND c.site_code='".$db->clean($siteCode)."'
AND c.expires >= NOW()");
$bres = $db->get_results("SELECT id,auth_amount FROM asap_leads.billing_queue WHERE client_id='".$db->clean($res[0]->rid)."' AND auth_date='0000-00-00 00:00:00' ORDER BY id DESC LIMIT 1");
if(empty($bres)) {
$bres2 = $db->get_results("SELECT * FROM asap_leads.billing_queue WHERE client_id='".$db->clean($res[0]->rid)."' AND auth_response_num=2 ORDER BY id DESC LIMIT 1");
if(!empty($bres2)) {
$db->query("INSERT INTO asap_leads.billing_queue (payment_number,client_id,order_id,payment_info_id,payment_type,auth_amount,bill_amount,date_to_bill)
VALUES (
'".$db->clean($bres2[0]->payment_number)."',
'".$db->clean($bres2[0]->client_id)."',
'".$db->clean($bres2[0]->order_id)."',
'".$db->clean($bres2[0]->payment_info_id)."',
'".$db->clean($bres2[0]->payment_type)."',
'".$db->clean($next_amount)."',
'".$db->clean($next_amount)."',
'".$db->clean($next_bill_date)."'
)");
$bres = $db->get_results("SELECT id,auth_amount FROM asap_leads.billing_queue WHERE client_id='".$db->clean($res[0]->rid)."' AND auth_date='0000-00-00 00:00:00' ORDER BY id DESC LIMIT 1");
}
}
}
if(empty($siteCode)) {
$siteCode = 'asap'; //default to asap if they just show up here.
}
?>
<!doctype html>
<html>
<head>
<title>PCI Compliant Credit Card Form</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
.container {
width:500px;
max-width:100%;
margin:0px auto;
text-align:center;
font-size:16px;
background:white;
}
.header {
text-align:center;
}
.header img {
width:100%;
}
.main_area {
text-align:left;
padding:10px;
}
.big_line {
margin:20px 0px;
}
.big_text {
font-size:28px;
color:#1e3891;
padding-bottom:10px;
}
.pci_logo {
float:right;
}
input[type=text],input[type=tel],select {
padding:10px 20px;
width:90%;
margin:0px auto;
font-size:20px;
}
#submit_button {
background:#dfedd6;
color:black;
border:1px solid black;
border-radius:5px;
cursor:pointer;
text-align:center;
padding:20px 0px;
font-size:20px;
width:90%;
}
</style>
<script type="text/javascript" src="/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="/js/jquery.formatter.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('input[name=cc_num]').formatter({
'pattern': '{{9999}}-{{9999}}-{{9999}}-{{9999}}',
'persistent': false
});
$('input[name=cc_num]').formatter({
'pattern': '{{9999}}-{{9999}}-{{9999}}-{{9999}}',
'persistent': false
});
$('input[name=phone_1]').formatter({
'pattern': '({{999}}) {{999}}-{{9999}}',
'persistent': false
});
});
function change_cc_type() {
if($('[name=cc_type]:checked').val()=='amex') {
$('input[name=cc_num]').formatter().resetPattern('{{9999}}-{{999999}}-{{99999}}');
$('input[name=cc_cvv]').formatter().resetPattern('{{9999}}');
$('.cvv_info_not_amex').hide();
$('.cvv_info_amex').show();
} else {
$('input[name=cc_num]').formatter().resetPattern('{{9999}}-{{9999}}-{{9999}}-{{9999}}');
$('input[name=cc_cvv]').formatter().resetPattern('{{999}}');
$('.cvv_info_not_amex').show();
$('.cvv_info_amex').hide();
}
}
function save_cc_info(frm) {
$('#loading_please_wait').show();
var str="action=save_cc_info";
$(frm).find('input,select,textarea').each(function() {
if(this.type=='checkbox' || this.type=='radio') {
if($(this).is(':checked')) {
str += "&" + encodeURIComponent(this.name) + '=' + encodeURIComponent($(this).val());
}
} else {
str += "&" + encodeURIComponent(this.name) + '=' + encodeURIComponent($(this).val());
}
});
$.ajax({
url:"/update_asap.php",
cache: false,
type: "POST",
data: str,
success: function(results) {
$('#loading_please_wait').hide();
if(results!='') {
alert(results);
} else {
$(frm)[0].outerHTML = '<p>Thank you for submitting your payment information.</p>';
}
},
error: function(jqXHR, textStatus, errorThrown) {
}
});
}
</script>
</head>
<body>
<div class="container">
<div class="main_area">
<div class="big_line">
<div class="pci_logo"><img src="/images/pci_logo.png" /></div>
<div class="big_text">PCI Compliant Secure Form</div>
<div style="clear:both;"></div>
</div>
<?php if(empty($res)) { ?>
<p>Our goal is to ensure that best practice guidelines are distributed to create a more robust security environment for all organizations. We partner with companies to help them maintain PCI compliance standards.</p>
<p>PCI compliance refers to the set of security standards developed by the Payment Card Industry Security Standards Council (PCI SSC) to protect credit card data and prevent fraud. The standards apply to all organizations that accept credit card payments, including merchants, payment processors, and service providers.</p>
<p>PCI compliance is important for users because it helps ensure that their credit card information is protected when they make purchases online. By complying with PCI standards, businesses demonstrate their commitment to protecting customer data, which can increase consumer trust and confidence in their brand.</p>
<?php } else {
function convert_offset_to_timezone($offset,$dst) {
$tz = timezone_name_from_abbr(null, $offset * 3600, $dst);
return timezone_abbr_from_name($tz);
}
function timezone_abbr_from_name($timezone_name){
$dateTime = new DateTime();
$dateTime->setTimeZone(new DateTimeZone($timezone_name));
return $dateTime->format('T');
}
$expires_time = date('g:i a',strtotime($res[0]->expires)).' MST';
if(!empty($res[0]->zip)) {
$ares = $db->get_results("SELECT city,state,zip,IF(-8 - CAST(REPLACE(TIMEDIFF(NOW(), UTC_TIMESTAMP()), ':00:00', '') AS SIGNED)=1,timezone+dst,timezone) as timezone, (-8 - CAST(REPLACE(TIMEDIFF(NOW(), UTC_TIMESTAMP()), ':00:00', '') AS SIGNED)=1) as isDst FROM geo.zip_codes WHERE zip='{$res[0]->zip}'");
if(!empty($ares)) {
$arow = $ares[0];
$time_offset = $arow->timezone + 7;
$expires = strtotime($res[0]->expires) + ($time_offset*3600);
if($arow->state=='HI') {
$expires_time = date('g:i a',$expires).' HST';
} else {
$expires_time = date('g:i a',$expires).' '.convert_offset_to_timezone($arow->timezone,$arow->isDst);
}
} else {
$ares = $db->get_results("SELECT state_short,IF(-8 - CAST(REPLACE(TIMEDIFF(NOW(), UTC_TIMESTAMP()), ':00:00', '') AS SIGNED)=1,timezone_offset,timezone_offset) as timezone, (-8 - CAST(REPLACE(TIMEDIFF(NOW(), UTC_TIMESTAMP()), ':00:00', '') AS SIGNED)=1) as isDst FROM geo.states WHERE state_short='{$res[0]->state}'");
if(!empty($ares)) {
$arow = $ares[0];
$time_offset = $arow->timezone + 7;
$expires = strtotime($res[0]->expires) + ($time_offset*3600);
$expires_time = date('g:i a',$expires).' '.convert_offset_to_timezone($arow->timezone,$arow->isDst);
} else {
$expires_time = date('g:i a',strtotime($res[0]->expires)).' MST';
}
}
} else {
$area_code = substr($res[0]->phone_1,0,3);
$ares = $db->get_results("SELECT state,IF(-8 - CAST(REPLACE(TIMEDIFF(NOW(), UTC_TIMESTAMP()), ':00:00', '') AS SIGNED)=1,timezone_offset,timezone_offset) as timezone, (-8 - CAST(REPLACE(TIMEDIFF(NOW(), UTC_TIMESTAMP()), ':00:00', '') AS SIGNED)=1) as isDst FROM geo.area_codes WHERE area_code='{$area_code}'");
if(!empty($ares)) {
$arow = $ares[0];
$time_offset = $arow->timezone + 7;
$expires = strtotime($res[0]->expires) + ($time_offset*3600);
if($arow->state=='Hawaii') {
$expires_time = date('g:i a',$expires).' HST';
} else {
$expires_time = date('g:i a',$expires).' '.convert_offset_to_timezone($arow->timezone,$arow->isDst);
}
} else {
$ares = $db->get_results("SELECT state_short,IF(-8 - CAST(REPLACE(TIMEDIFF(NOW(), UTC_TIMESTAMP()), ':00:00', '') AS SIGNED)=1,timezone_offset,timezone_offset) as timezone, (-8 - CAST(REPLACE(TIMEDIFF(NOW(), UTC_TIMESTAMP()), ':00:00', '') AS SIGNED)=1) as isDst FROM geo.states WHERE state_short='{$res[0]->state}'");
if(!empty($ares)) {
$arow = $ares[0];
$time_offset = $arow->timezone + 7;
$expires = strtotime($res[0]->expires) + ($time_offset*3600);
$expires_time = date('g:i a',$expires).' '.convert_offset_to_timezone($arow->timezone,$arow->isDst);
} else {
$expires_time = date('g:i a',strtotime($res[0]->expires)).' MST';
}
}
}
$is_dst = date('I')*1;
if($is_dst) {
$original_appointment_time = $expires;
$expires_time = str_replace('ST','DT',$expires_time);
if(!empty($arow)) {
if($arow->state=='AZ') {
$expires_time = $original_appointment_time;
}
}
}
?>
<div><i>Secure Payment Form Expires at <strong id="expire_timer"><?= $expires_time;?></strong></i></div>
<form onsubmit="save_cc_info(this); return false;">
<input type="hidden" name="cid" value="<?= $res[0]->id;?>" />
<input type="hidden" name="rid" value="<?= $res[0]->rid;?>" />
<input type="hidden" name="site_code" value="<?= $siteCode;?>" />
<input type="hidden" name="customer_vault_id" value="<?= $res[0]->customer_vault_id;?>" />
<input type="hidden" name="action" value="save_cc_info" />
<div class="big_line">
<div class="big_text">
Client Information
<a href="#" onclick="$('.real_client_address,.display_client_address').toggle(); return false;" style="font-size:12px;">Edit</a>
</div>
<div style="padding-left:30px;font-size:18px;" class="display_client_address">
<div><?= $res[0]->first.' '.$res[0]->last;?></div>
<div><?= $res[0]->address1;?></div>
<div><?= $res[0]->city.', '.$res[0]->state.' '.$res[0]->zip;?></div>
<div><?= pretty_phone($res[0]->phone);?></div>
<div><?= $res[0]->email;?></div>
</div>
<div style="padding-left:30px;display:none;" class="real_client_address">
<div>
<label>First Name<br />
<input type="text" name="first" value="<?= $res[0]->first;?>" />
</label>
</div>
<div>
<label>Last Name<br />
<input type="text" name="last" value="<?= $res[0]->last;?>" />
</label>
</div>
<div>
<label>Street Address<br />
<input type="text" name="street_address" value="<?= $res[0]->address1;?>" />
</label>
</div>
<div>
<label>City<br />
<input type="text" name="city" value="<?= $res[0]->city;?>" />
</label>
</div>
<div>
<label>State<br />
<input type="text" name="state" value="<?= $res[0]->state;?>" />
</label>
</div>
<div>
<label>Zip<br />
<input type="tel" name="zip" value="<?= $res[0]->zip;?>" />
</label>
</div>
<div>
<label>Phone<br />
<input type="tel" name="phone_1" value="<?= pretty_phone($res[0]->phone);?>" />
</label>
</div>
<div>
<label>Email<br />
<input type="text" name="email" value="<?= $res[0]->email;?>" />
</label>
</div>
</div>
</div>
<div class="big_line">
<div class="big_text">Card Type</div>
<div class="credit_cards">
<label><input type="radio" name="cc_type" value="visa" onclick="change_cc_type();" required style="vertical-align:middle;width:20px;height:20px;" /> <img src="/images/visa.png" style="vertical-align:middle;" /></label>
<label><input type="radio" name="cc_type" value="mast" onclick="change_cc_type();" required style="vertical-align:middle;width:20px;height:20px;" /> <img src="/images/mast.png" style="vertical-align:middle;" /></label>
<label><input type="radio" name="cc_type" value="disc" onclick="change_cc_type();" required style="vertical-align:middle;width:20px;height:20px;" /> <img src="/images/disc.png" style="vertical-align:middle;" /></label>
<label><input type="radio" name="cc_type" value="amex" onclick="change_cc_type();" required style="vertical-align:middle;width:20px;height:20px;" /> <img src="/images/amex.png" style="vertical-align:middle;" /></label>
</div>
</div>
<div class="big_line">
<input type="tel" id="cc_num" name="cc_num" placeholder="Credit Card Number" required />
</div>
<div class="big_line">
<div style="display:inline-block;vertical-align:middle;">
<div style="display:inline-block;width:70px;">Expires</div>
<select name="cc_exp_month" style="width:100px;padding:10px 0px;" required>
<option value="">MM</option>
<?php for($i=1;$i<=12;$i++) {?>
<option value="<?= str_pad($i,2,'0',STR_PAD_LEFT);?>"><?= str_pad($i,2,'0',STR_PAD_LEFT);?></option>
<?php } ?>
</select> /
<select name="cc_exp_year" style="width:150px;padding:10px 0px;" required>
<option value="">YYYY</option>
<?php $this_year = date('Y');
$end_year = $this_year*1 + 10;
for($i=$this_year;$i<=$end_year;$i++) { ?>
<option value="<?= $i;?>"><?= $i;?></option>
<?php } ?>
</select>
</div>
<div style="margin-top:10px;">
<div style="display:inline-block;vertical-align:middle;">
<div style="display:inline-block;width:70px;">CVV</div>
<input type="tel" name="cc_cvv" placeholder="333" style="width:100px;" required />
</div>
</div>
<div class="cvv_info_not_amex" style="display:none;"><i style="font-size:14px;">* The CVV is a 3 digit number on the back of your card.</i></div>
<div class="cvv_info_amex" style="display:none;"><i style="font-size:14px;">* The CVV is a 4 digit number on the front of your card.</i></div>
</div>
<?php if(!empty($bres)) { ?>
<div class="big_line">
<input type="hidden" name="bq_id" value="<?= $bres[0]->id;?>" />
Amount to charge today: $<?= number_format($bres[0]->auth_amount,2);?>
</div>
<?php } ?>
<div class="big_line">
<center><input type="submit" value="Submit" id="submit_button" /></center>
</div>
<div id="loading_please_wait" style="display:none;"><img src="/images/ajax-loader.gif" /> Saving your information. Please wait...</div>
</form>
<div class="big_line">
<center><img src="/images/ssl_logo.png" /></center>
</div>
<?php } ?>
</div>
</div>
</body>
</html>