FALSE, 'errors' => array()); // first check to see if all fields are present foreach($field_list as $field){ if(!isset($trimmed_post[$field])){ $result['fatal_error'] = TRUE; $result['errors'][] = "Missing form field: {$field}"; } } if($result['fatal_error'] === TRUE){ // fatal, get out now! return $result; } $non_required_fields = array('DBA', 'Business_fax_number', 'Website_address', 'Name_of_processor', 'Terminal', 'Imprint', 'Mail-phone-fax_order', 'Internet', '0-7_days', '8-14_days', '15-30_days', 'Over_30_days'); // validate email if(!filter_var($trimmed_post['Email_address'], FILTER_VALIDATE_EMAIL)) { $result['errors'][] = 'Email_address'; } $num_fields = array('Estimated_average_individual_credit_card_transaction_size','Estimated_highest_credit_card_sale_amount', 'Terminal','Imprint','Mail-phone-fax_order','Internet','0-7_days','8-14_days','15-30_days','Over_30_days', 'Number_of_employees','Ownership_%','DOB_Month','DOB_Day','DOB_Year','DL_Month','DL_Day','DL_Year', 'Estimated_monthly_credit_card_sales_volume','Month_formed','Year_formed','Estimated_monthly_credit_card_sales_volume'); foreach($num_fields as $field){ if(strlen($trimmed_post[$field]) > 0 && filter_var($trimmed_post[$field], FILTER_VALIDATE_FLOAT) === FALSE) { $result['errors'][] = $field; } } $phone_fields = array('Business_phone_number','Business_fax_number','Home_phone'); foreach($phone_fields as $field){ if(!in_array($field, $non_required_fields) || strlen($trimmed_post[$field]) > 0){ $stripped_phone = preg_replace("/[^0-9]/", '', $trimmed_post[$field]); if($stripped_phone[0] == '1'){ // remove leading 1 $stripped_phone = substr($stripped_phone, 1); } if(strlen($stripped_phone) != 10){ $result['errors'][] = $field; } } } $nine_digit_fields = array('Bank_Routing_Number','Federal_Tax_ID_Number', 'Social_Security_Number'); foreach($nine_digit_fields as $field){ if(!in_array($field, $non_required_fields) || strlen($trimmed_post[$field]) > 0){ $stripped_field = preg_replace("/[^0-9]/", '', $trimmed_post[$field]); if(strlen($stripped_field) != 9){ $result['errors'][] = $field; } } } $zip_fields = array('Business_zip','Home_zip'); foreach($zip_fields as $field){ if(!preg_match('/(^\d{5}$)|(^\d{5}-\d{4}$)/', $trimmed_post[$field])){ $result['errors'][] = $field; } } $required_text_fields = array('Legal_business_name','Business_street_address','Business_city','Business_state', 'Business_location','First_name','Last_name','Title','State_issued','Home_address', 'Home_city','Home_state','Describe_products_and_services_sold_in_detail', 'Refund_Policy','Business_Structure','Bank_Name','Bank_Account_Number'); foreach($required_text_fields as $field){ if(strlen($trimmed_post[$field]) < 1){ $result['errors'][] = $field; } } return $result; } $stArr = array (''=>'—Select—', 'AL'=>'Alabama','AK'=>'Alaska', 'AZ'=>'Arizona','AR'=>'Arkansas', 'CA'=>'California','CO'=>'Colorado', 'CT'=>'Connecticut','DE'=>'Delaware', 'DC'=>'District of Columbia','FL'=>'Florida', 'GA'=>'Georgia','HI'=>'Hawaii','ID'=>'Idaho', 'IL'=>'Illinois','IN'=>'Indiana','IA'=>'Iowa', 'KS'=>'Kansas','KY'=>'Kentucky','LA'=>'Louisiana', 'ME'=>'Maine','MD'=>'Maryland','MA'=>'Massachusetts', 'MI'=>'Michigan','MN'=>'Minnesota','MS'=>'Mississippi', 'MO'=>'Missouri','MT'=>'Montana','NE'=>'Nebraska', 'NV'=>'Nevada','NH'=>'New Hampshire','NJ'=>'New Jersey', 'NM'=>'New Mexico','NY'=>'New York','NC'=>'North Carolina', 'ND'=>'North Dakota','OH'=>'Ohio','OK'=>'Oklahoma', 'OR'=>'Oregon','PA'=>'Pennsylvania','RI'=>'Rhode Island', 'SC'=>'South Carolina','SD'=>'South Dakota','TN'=>'Tennessee', 'TX'=>'Texas','UT'=>'Utah','VT'=>'Vermont','VA'=>'Virginia', 'WA'=>'Washington','WV'=>'West Virginia','WI'=>'Wisconsin','WY'=>'Wyoming'); if ($_POST) { array_pop ($_POST); $validation_result = validate_post(); if($validation_result['fatal_error'] === TRUE){ say("Fatal error: ".print_r($validation_result['errors'], TRUE)); exit; } if(empty($validation_result['errors'])){ $_POST['Submitted_from'] = $_SERVER['REMOTE_ADDR']; foreach ($_POST as $k => $v) { $sanatized_key = filter_var($k, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES); $sanatized_value = filter_var($v, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES); $bg = ($i%2)?'#ccc':'#fff'; $body[] = "".str_replace ("_", " ", $sanatized_key).": {$sanatized_value}"; $i++; } $html = "\n".implode ("\n", $body)."
\n"; require_once ('/home/chargec/includes/Emailing/EmailService.php'); $mail = new EmailService(); try { $mail->AddReplyTo($_POST['Email_address'], 'CSI Application'); $mail->SetFrom($_POST['Email_address'], 'CSI Application'); $mail->AddAddress('webdr@charge.com', 'Web Dr'); $mail->AddAddress('gdanzig@charge.com', 'Greg Danzig'); $mail->Subject = 'CSI Application'; $mail->MsgHTML($html); $mail->Send(); $success = true; } catch (phpmailerException $e) { say($e->errorMessage()); //Pretty error messages from PHPMailer } catch (Exception $e) { say($e->getMessage()); //Boring error messages from anything else! } }else{ // failed server side validation say("Server side validation errors: ".print_r($validation_result['errors'], TRUE)); $validation_result_js = "'; $mail = new EmailService(); try { $mail->AddReplyTo('webdr@charge.com', 'Web Dr'); $mail->SetFrom('webdr@charge.com', 'Web Dr'); $mail->AddAddress('webdr@charge.com', 'Web Dr'); $mail->Subject = 'CSI Application - Failed Server Side Validation'; $mail->Body = "Server side valication failed\r\n\r\n".print_r($validation_result['errors'], TRUE); $mail->Send(); } catch (phpmailerException $e) { say($e->errorMessage()); //Pretty error messages from PHPMailer } catch (Exception $e) { say($e->getMessage()); //Boring error messages from anything else! } } } $first_name = ''; $last_name = ''; $phone_business = ''; $company = ''; $email = ''; if ($_SERVER['QUERY_STRING']) { $hash = filter_var($_SERVER['QUERY_STRING'], FILTER_SANITIZE_STRING); $sql = ''; $escaped_hash = mysqli_real_escape_string ($GLOBALS['mysqli_link'],$hash); if(strlen($hash) === 20){ $sql = "SELECT * FROM `apps` WHERE `hash` = '{$escaped_hash}' LIMIT 1"; }else if(strlen($hash) >= 20) { $sql = "SELECT * FROM `apps` WHERE `csi_mid` = '{$escaped_hash}' LIMIT 1"; } if($sql !== '') { $row = mysqli_wrap ($sql); $id = $row[0]; if (!empty ($id)) { $first_name = $row['first_name']; $last_name = $row['last_name']; $phone_business = $row['phone_business']; $company = $row['company']; $email = $row['email']; } } } if(!empty($hash)) { $post_url = "fdapp.html?{$hash}"; } else { $post_url = "fdapp.html"; } ?> Free Charge.com Signup
Charge.com Accept Credit Cards

Dear ,

Thank you for choosing Charge.com for your credit card processing needs. We will contact you shortly regarding the status of your account.

We look forward to serving you and your business.

Warm regards,

The Charge.com Support Team
©Charge.com Payment Solutions, Inc., 2009.
Charge.com Payment Solutions Inc., is a registered ISO/MSP.
American Express requires separate approval.
Privacy Policy
 

New Account Activation

Congratulations! You are on your way to increasing your sales and profits by accepting credit cards for your business.

For your privacy and security, your account information is kept safe with the highest grade of commercially available encryption. Your information will be kept completely confidential and will not be shared with anyone.

In order to complete the setup and activation process and start accepting credit cards from your customers, please provide us with the information requested below.

Required items are marked with (*)

Merchant Information
*Legal Business Name
*Doing Business As (DBA) (if applicable)
*Email Address
*Business Phone Number
*Business Fax Number (optional)
*Business Street Address (No PO Boxes)
*Business City
*Business State
*Business Zip
*Website Address (if applicable)
*Number of Employees
*Business Location
Owner Information
*First Name
*Last Name
*Title
*Ownership Percentage %
*Date of Birth / /
*Social Security Number
*Drivers License Number
*State Issued
*Expiration Date/ /
*Home Phone
*Home Address
*Home City
*Home State
*Home Zip
Business Information
*Describe Products and Services Sold in Detail
*
 $
Total Monthly Credit Card Sales (estimated)
*
 $
Average Individual Credit Card Sale Amount (estimated)
*
 $
Highest Individual Credit Card Sale Amount (estimated)
*What Is Your Refund Policy?
*Business Structure:
*Month and Year Business Formed /
*Are you now processing or have you ever 
*processed credit cards for this business?
Yes No
*Do you wish to accept American Express?Yes No
*Please provide expected percentages for each method of accepting credit cards.
*The percentages you enter must total 100%
*Card swipe through a terminal %
*Imprint of card with signature without swipe %
*Mail/phone/fax order %
*Internet %
*Total: %
*What is the timeframe from the credit card transaction to delivery of the product/service?
*The percentages you enter must total 100
*0-7 days %
*8-14 days %
*15-30 days %
*Over 30 days %
*Total: %
*Federal Tax ID Number
*Sample check
*Bank Name
*Bank Account Number
*Bank Routing Number
 
©Charge.com Payment Solutions, Inc., 2009.
Charge.com Payment Solutions Inc., is a registered ISO/MSP.
American Express requires separate approval.
Privacy Policy