<?
header("Access-Control-Allow-Origin: *");

### DO THIS FIRST:
require_once("/BANGK!/master_config.php");
require_once($master_config_root_path . "shared/functions.shared");
$active_user_session_timeout = "OFF"; // no session timeout on this page
require_once($master_config_root_path . "shared/session.shared");
include_once($master_config_root_path . "/shared/TSYS_functions.shared");

//logger3("_SESSION['template']['company']",$_SESSION['template']['company']);
//logger3("0_SESSION['support_action']",$_SESSION['support_action']);
//logger3("_GET['password']",$_GET['password']);
//logger3("_SESSION['template']['company']['file_path']",$_SESSION['template']['company']['file_path']);

### START SESSION VERIFICATION (ALWAYS LAST B4 REST OF PAGES):
$verified_member = "no";
$verified_business = "no";
$verified_transaction = "no";
$verified_banned = "no";
$verified_acccess = "no";
$secured_server = "no"; //force https
include($_SESSION['template']['company']['file_path'] . "shared/start_verified_session.shared");
#
#
#
log_traffic_stats();


$incoming_vars = "";
$incoming_vars = array();
if($_POST) $incoming_vars = $_POST;
if(empty($incoming_vars)) $incoming_vars = $_GET;


logger3("















########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
### NEW_SESSION :  [" . $_SERVER['SCRIPT_NAME'] . "]
########################################################################################
########################################################################################

",$incoming_vars);
#
#
#
### START: SESSIONS & STUFF:

///gate_key = NSDBECP
if(!stristr($incoming_vars['gate_key'],"NSDBECP")) {
	echo "Invalid Key";
	exit;
}


if($incoming_vars['member_hash']) {
	
	
	$creator_memberid = $incoming_vars['member_hash'];
	
	
	
} else {
	
	
	$tmp_sql = "SELECT creator_memberid FROM accounts WHERE hash = '". $incoming_vars['account_hash'] ."';"; // $incoming_vars['account_hash']);
	//logger3("tmp_sql",$tmp_sql);

	$creator_memberid = getTHECASHIER($tmp_sql);
	//logger3("creator_memberid",$creator_memberid);
	
}



if(!$creator_memberid) {
	echo "Invalid Member";
	exit;
}







//logger3("creator_memberid",$creator_memberid);

$existing_member = member($creator_memberid);
logger3("existing_member",$existing_member);

///update IP record
insert_ip_record($member_hash=$existing_member['hash']);


//update APP VERSION
if($existing_member['app_version'] =! $incoming_vars['PAYYAP_version']) {
	
	$tmp_sql = "UPDATE members 
				SET app_version = '". $incoming_vars['PAYYAP_version'] ."'
				WHERE hash = '". $existing_member['hash'] ."';
				";
	$update_results = updateTHECASHIER($tmp_sql);
}




if($incoming_vars['action']=='get_emailaddress'){
	//$tmp_account = account($incoming_vars['account_hash']);
	$output = [];
	if(!empty($existing_member['emailaddress'])){
		$output['emailaddress'] = $existing_member['emailaddress'];
	}
	echo json_encode($output);
	exit;
}



foreach($existing_member['accounts']['business'] as $key => $business_accountid) {

	//logger3("business_accountid",$business_accountid);
	$tmp_account = account($business_accountid);
	
	//logger3("tmp_account",$tmp_account);
	
	
	$tmp_ids_personal = get_ids_personal($memberid=$tmp_account['creator_memberid'],$accountid='',$account_hash="",$member_hash="");
	$tmp_ids_business = get_ids_business($memberid='',$accountid='',$account_hash=$tmp_account['hash']);
	
	
	//logger3("tmp_account",$tmp_account);
	
	//echo "<hr>";
	
	//merchant_telephone_number	
	//$accounts_menu_array[$key]['merchant_telephone_number'] = '+8801714066603';
	$merchant_telephone_number = trim($existing_member['mobilephone']);
	if(!$merchant_telephone_number) $merchant_telephone_number = trim($existing_member['dayphone']);
	$merchant_telephone_number = str_ireplace("/", "", $merchant_telephone_number);
	
	$accounts_menu_array[$key]['merchant_telephone_number'] =  $merchant_telephone_number;
	
	
	$accounts_menu_array[$key]['account_hash'] = $tmp_account['hash'];
	logger3("accounts_menu_array[$key]['account_hash']",$accounts_menu_array[$key]['account_hash']);
	
	//logger3("tmp_account['accountname']",$tmp_account['accountname']);
	$accounts_menu_array[$key]['account_name'] = $tmp_account['accountname'];
	
	//logger3("tmp_account_['current']['identity']['status']",$tmp_account['current']['identity']['status']);
	//if(!$tmp_account['current']['identity']['status']) $tmp_account['current']['identity']['status'] = "(verification required)";
	//$accounts_menu_array[$key]['account_status'] = $tmp_account['current']['identity']['status'];
	
	//logger3("tmp_account['PAYYAP_application_status",$tmp_account['PAYYAP_application_status']);
	
	/// SET APP ACCOUNT STATUS:
	//default:
	$accounts_menu_array[$key]['account_status'] = "(verification required)";
	// submitted:
	if(
		(stristr($tmp_account['PAYYAP_application_status'],"SUBMITTED"))
		|| (stristr($tmp_account['PAYYAP_application_status'],"PENDING"))  
	) {
		logger3(1,1);
		$accounts_menu_array[$key]['account_status'] = "SUBMITTED";	
	}
	
	// approved + HOLD (we need to make an orange "on hold")
	if(
		(
		(stristr($tmp_account['PAYYAP_application_status'],"APPROVED"))
		&& (!stristr($tmp_account['status_payments'],"ON"))
		)
	) {
		logger3(2,2);
		$accounts_menu_array[$key]['account_status'] = "SUBMITTED";
	}
	
	logger3("accounts_menu_array[key]['account_status']",$accounts_menu_array[$key]['account_status']);
	//exit;
	
	// approved + LIVE
	if(
		(stristr($tmp_account['PAYYAP_application_status'],"APPROVED"))
		&& (stristr($tmp_account['status_payments'],"ON"))
	) {
		logger3(3,3);
		$accounts_menu_array[$key]['account_status'] = "Verified";
	}
	
	
	// approved + HOLD (we need to make an orange "on hold")
	if(
		(
		(stristr($tmp_account['PAYYAP_application_status'],"APPROVED"))
		&& ($incoming_vars['whitelabel_business_account_hash'])
		)
	) {
		logger3(2,2);
		$accounts_menu_array[$key]['account_status'] = "APPROVED";
		$accounts_menu_array[$key]['account_status_background_color'] = "#0000CC";
	}
	
	
	///testing:
	//$tmp_account['PAYYAP_application_status'] = "SUBMITTED";
	
	
	
	if(!$incoming_vars['whitelabel_business_account_hash']) {
		
		//logger3("business_accountid",$business_accountid);
		$tmp_balance = balance($business_accountid);
		//logger3("tmp_balance",$tmp_balance);
		
		//logger3("tmp_balance['account_balance']",$tmp_balance['balance']['account_balance']);
		$accounts_menu_array[$key]['account_balance'] = $tmp_balance['balance']['account_balance'];
	}
	
	
	
	$accounts_menu_array[$key]['member_hash'] = $existing_member['hash'];
	
	
	//SET POSTFIX FORM FROM ONBOARDING PREFERENCES START
	if(!empty($incoming_vars['whitelabel_business_account_hash'])) {
		$tmp_sql = "SELECT * FROM onboarding_preferences WHERE business_account_hash = '". $incoming_vars['whitelabel_business_account_hash'] ."';";
		$whitelabel_business_account_details = object_to_array_v2(readTHECASHIER($tmp_sql,"intelitruth"));
	
		if(!$whitelabel_business_account_details['onboarding_verification_region']) {
			$onboarding_preferences['intelitruth_postfix'] = "required";		
		} else {
			$onboarding_preferences['intelitruth_postfix'] = $whitelabel_business_account_details['intelitruth_postfix'];
		}
	}
	$accounts_menu_array[$key]['INTELITRUTH_POSTFIX_SET'] = 'true';
	if($onboarding_preferences['intelitruth_postfix']=='do_not_display') $accounts_menu_array[$key]['INTELITRUTH_POSTFIX_SET'] = 'false';
	//SET POSTFIX FORM FROM ONBOARDING PREFERENCES END






	
if($incoming_vars['whitelabel_business_account_hash'] == "2a31b58f2a89687254ba451be3114008") {	

	
	//SELFIE
	$accounts_menu_array[$key]['KYC_option_text_selfie_title'] = "Personal Selfie Upload (from photo):";
	$accounts_menu_array[$key]['KYC_option_text_selfie_descriptive_paragraph'] = "Smile! Take a Selfie!";
	
	/// PROOF OF PERSON
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person_title'] = "Personal Identity Upload (from photo, scan or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Personal Identity — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Personal Identity) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][0] = "Driver's License of Business Owner";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_person'][0] = "
	
	Help us help you - please be sure:
	
	• Full Photo ID (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][1] = "Passport of Business Owner";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_person'][1] = "
	
	Help us help you - please be sure:
	 
	• Full Passport Photo Page (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][2] = "Government-Issued Photo ID of Business Owner";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_person'][2] = "
	
	Help us help you - please be sure:
	
	• Full Photo ID (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	
	
	
	
	/// PROOF OF RESIDENCE
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence_title'] = "Proof of Personal Residence Upload (from photo, scan or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Personal Residence — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Personal Residence) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][0] = "Electricity Bill (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][0] = "
	
	Help us help you - please be sure:
	
	• Full Electricity Bill (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][1] = "Personal Bank Statement (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][1] = "
	
	Help us help you - please be sure:
	
	• Full Bank Statement (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][2] = "Telephone Bill (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][2] = "
	
	Help us help you - please be sure:
	
	• Full Telephone Bill (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][3] = "Cable / Internet Bill (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][3] = "
	
	Help us help you - please be sure:
	
	• Full Cable / Internet (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][4] = "Apartment / Home Rental Bill (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][4] = "
	
	Help us help you - please be sure:
	
	• Full Apartment / Home Rental Bill (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";





	
	/////// MORE PERSONAL DOCUMENTS:
	$loop_personal = 1;
	$loop_key = 0;
	while($loop_personal <= 10) {
		unset($additional_document);
		$additional_document = [];
		$additional_document['title'] = $loop_personal . ": TEST NEW PERSONAL DOCUMENT TITLE:";	
		
		$additional_document['options'][] = "Please select one...";
		$additional_document['options'][] = "Test New Personal Option ". $loop_personal;
		$additional_document['options'][] = "Test New Personal Option ". $loop_personal;
		$additional_document['options'][] = "Test New Personal Option ". $loop_personal;
		$additional_document['description_text'] = "This is the description text # ". $loop_personal;
		$additional_document['alert_text'] = "This is the confirmation text # ". $loop_personal;
		$accounts_menu_array[$key]['additional_document']['personal'][$loop_key] = $additional_document;
		$loop_key++;
		$loop_personal++;
		
	}
	
	
	
	# $additional_document = [];
	# $additional_document['title'] = "2: TEST NEW PERSONAL DOCUMENT TITLE:";
	# $additional_document['options'][] = "Please select one...";
	# $additional_document['options'][] = "Test New Personal Option 1";
	# $additional_document['options'][] = "Test New Personal Option 2";
	# $additional_document['options'][] = "Test New Personal Option 3";
	# $additional_document['description_text'] = "This is the description text # 2.";
	# $additional_document['alert_text'] = "This is the confirmation text # 2.";	
	# $accounts_menu_array[$key]['additional_document']['personal'][] = $additional_document;
	# 
	# $additional_document = [];
	# $additional_document['title'] = "3: TEST NEW PERSONAL DOCUMENT TITLE:";
	# $additional_document['options'][] = "Please select one...";
	# $additional_document['options'][] = "Test New Personal Option 1";
	# $additional_document['options'][] = "Test New Personal Option 2";
	# $additional_document['options'][] = "Test New Personal Option 3";
	# $additional_document['description_text'] = "This is the description text # 3.";
	# $additional_document['alert_text'] = "This is the confirmation text # 3.";	
	# $accounts_menu_array[$key]['additional_document']['personal'][] = $additional_document;		
	
	
	
	#####################################################################################################
		
	/// PROOF OF BUSINESS
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_business'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_title'] = "UPLOAD Articles of Incorporation (from photo, scan or file):";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business'][] = "State-Issued Sole Proprietor / DBA Certificate";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business'][] = "
 
	Help us help you - please be sure:
	
	• Full DBA Certificate (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your authority to take payments as a formal business.  Thank you for your assistance.
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business'][] = "State-Issued Incorporation Certificate";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business'][] = "
	
	Help us help you - please be sure:
	
	• Full Incorporation Certificate (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your authority to take payments as a formal business.  Thank you for your assistance.
	";
	
	
	
	/// PROOF OF BANKING:
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing_title'] = "UPLOAD Proof of Business Banking (photo or file):";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Business Banking — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Business Banking) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][] = "Letter of Good Standing from Bank";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_pricing'][] = "
	
	ALERT! (1): Your business name **MUST** be clearly visible on your banking document;

	ALERT!! (2): The business name that is displayed on your Business Bank Account Statement **MUST** match the business name displayed on (at least one) other uploaded Proof of Business Document(s).

	SOLUTIONS: If your business name does not match the business name on at least one other uploaded Proof of Business Document, please upload new business documents to match your existing Bank Statement, or open a new business bank account -- one with the same name of your noted registered business.
	
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][] = "Business Bank Account Voided Check";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_pricing'][] = "
	
	ALERT! (1): No temporary checks.
	
	ALERT! (2)  Your business name **MUST** be clearly visible on your Voided Check;

	ALERT!! (2): The business name that is displayed on your Voided Check **MUST** match the business name displayed on (at least one) other uploaded Proof of Business Document(s).

	SOLUTIONS: If your business name does not match the business name on at least one other uploaded Proof of Business Document, please upload new business documents to match your existing Voided Check, or open a new business bank account -- one with the same name of your noted registered business.

	";
	
	
	
	/// PROOF OF TAX RETURNS:
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	//KYC_confirmation_text_proof_of_business_tax_returns
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns_title'] = "Proof of Business Tax Returns Upload (photo or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Business Tax Returns — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Business Tax Returns) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns'][0] = "New Business / No Previous Tax Returns (0 YEARS)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business_tax_returns'][0] = "
	
	ALERT!
	
	(1) As a new business, you have chosen to provide 0 YEARS of Tax Returns;
	
	(2) While it is not required... your ultimate processing fee may be significantly lower if you are able to provide 1 YEAR, 2 YEARS or even 3 YEARS of Tax Returns.
	
	(3) Please make sure that each page that up photo-capture / upload is clear (not blurry) and that each document fills the screen (easy to read)

	
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns'][1] = "1 YEAR of Tax Returns";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business_tax_returns'][1] = "
	
	ALERT!
	
	(1) You have chosen to provide 1 YEAR of Tax Returns;
	
	(2) While it is not required... your ultimate processing fee may be significantly lower if you are able to provide 2 YEARS or even 3 YEARS of Tax Returns.
	
	(3) Please make sure that each page that up photo-capture / upload is clear (not blurry) and that each document fills the screen (easy to read)

	
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns'][2] = "2 YEARS of Tax Returns";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business_tax_returns'][2] = "
	
	ALERT!
	
	(1) You have chosen to provide 2 YEARS of Tax Returns;
	
	(2) While it is not required... your ultimate processing fee may be significantly lower if you are able to provide 3 YEARS of Tax Returns.
	
	(3) Please make sure that each page that up photo-capture / upload is clear (not blurry) and that each document fills the screen (easy to read)

	
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns'][3] = "3 YEARS of Tax Returns";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business_tax_returns'][3] = "
	
	ALERT!
	
	(1) You have chosen to provide 3 YEARS of Tax Returns;
	
	(2) Please make sure that each page that up photo-capture / upload is clear (not blurry) and that each document fills the screen (easy to read)

	
	";
	
	
	
	
	
	
	/// PROOF OF PREVIOUS PROCESSING:
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing_title'] = "Proof of Previous Processing Upload (photo or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Previous Processing — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Previous Processing) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][0] = "No Previous Processing (0 Months)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][0] = "
	
	ALERT!
	
	(1) You have chosen to provide only 0 MONTHS of previous processing;
	
	(2) While it is not required... your ultimate processing fee may be significantly lower if you are able to provide 4 MONTHS, 6 MONTHS or even 12 MONTHS of processing.

	
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][1] = "1 MONTH of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][1] = "
	
	ALERT!
	
	(1) You have chosen to provide only 1 MONTH of previous processing history.  This is helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 4 MONTHS, 6 MONTHS or even 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";
	
	
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][2] = "2 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][2] = "
	
	ALERT!
	
	(1) You have chosen to provide only 2 MONTHS of previous processing history.  This is helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 4 MONTHS, 6 MONTHS or even 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][3] = "3 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][3] = "
	
	ALERT!
	
	(1) You have chosen to provide only 3 MONTHS of previous processing history.  This is helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 4 MONTHS, 6 MONTHS or even 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";
	
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][4] = "4 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][4] = "
	
	ALERT!
	
	(1) You have chosen to provide 4 MONTHS of previous processing history.  This is very helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 5 MONTHS, 6 MONTHS or even 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";	
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][5] = "5 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][5] = "
	
	ALERT!
	
	(1) You have chosen to provide 5 MONTHS of previous processing history.  This is very helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 6 MONTHS or even 12 MONTHS of processing.

	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";	
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][6] = "6 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][6] = "
	
	ALERT!
	
	(1) You have chosen to provide only 1 MONTH of previous processing history.  This is helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";	
		
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][7] = "12 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][7] = "
	
	ALERT!
	
	(1) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(2): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";
	
	
	
	/////// MORE BUSINESS DOCUMENTS:
	$additional_document = [];
	$additional_document['title'] = "1: TEST NEW BUSINESS DOCUMENT TITLE:";
	$additional_document['options'][] = "Please select one...";
	$additional_document['options'][] = "Test New Business Option 1";
	$additional_document['options'][] = "Test New Business Option 2";
	$additional_document['options'][] = "Test New Business Option 3";
	$additional_document['description_text'] = "This is the Business description text # 1.";
	$additional_document['alert_text'] = "This is the Business confirmation text # 1.";	
	$accounts_menu_array[$key]['additional_document']['business'][] = $additional_document;	
	
	$additional_document = [];
	$additional_document['title'] = "2: TEST NEW BUSINESS DOCUMENT TITLE:";
	$additional_document['options'][] = "Please select one...";
	$additional_document['options'][] = "Test New Business Option 1";
	$additional_document['options'][] = "Test New Business Option 2";
	$additional_document['options'][] = "Test New Business Option 3";
	$additional_document['description_text'] = "This is the Business description text # 2.";
	$additional_document['alert_text'] = "This is the Business confirmation text # 2.";	
	$accounts_menu_array[$key]['additional_document']['business'][] = $additional_document;
	
	$additional_document = [];
	$additional_document['title'] = "3: TEST NEW BUSINESS DOCUMENT TITLE:";
	$additional_document['options'][] = "Please select one...";
	$additional_document['options'][] = "Test New Business Option 1";
	$additional_document['options'][] = "Test New Business Option 2";
	$additional_document['options'][] = "Test New Business Option 3";
	$additional_document['description_text'] = "This is the Business description text # 3.";
	$additional_document['alert_text'] = "This is the Business confirmation text # 3.";	
	$accounts_menu_array[$key]['additional_document']['business'][] = $additional_document;




} else { /// DEFAULT //////////////////////////////////
	
	

	
	//SELFIE
	$accounts_menu_array[$key]['KYC_option_text_selfie_title'] = "Personal Selfie Upload (from photo):";
	$accounts_menu_array[$key]['KYC_option_text_selfie_descriptive_paragraph'] = "Smile! Take a Selfie!";
	
	/// PROOF OF PERSON
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person_title'] = "Personal Identity Upload (from photo, scan or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Personal Identity — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Personal Identity) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][0] = "Driver's License of Business Owner";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_person'][0] = "
	
	Help us help you - please be sure:
	
	• Full Photo ID (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][1] = "Passport of Business Owner";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_person'][1] = "
	
	Help us help you - please be sure:
	 
	• Full Passport Photo Page (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][2] = "Government-Issued Photo ID of Business Owner";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_person'][2] = "
	
	Help us help you - please be sure:
	
	• Full Photo ID (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	
	
	
	
	/// PROOF OF RESIDENCE
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_person'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence_title'] = "Proof of Personal Residence Upload (from photo, scan or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Personal Residence — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Personal Residence) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][0] = "Electricity Bill (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][0] = "
	
	Help us help you - please be sure:
	
	• Full Electricity Bill (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][1] = "Personal Bank Statement (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][1] = "
	
	Help us help you - please be sure:
	
	• Full Bank Statement (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][2] = "Telephone Bill (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][2] = "
	
	Help us help you - please be sure:
	
	• Full Telephone Bill (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][3] = "Cable / Internet Bill (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][3] = "
	
	Help us help you - please be sure:
	
	• Full Cable / Internet (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";
	
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_personal_residence'][4] = "Apartment / Home Rental Bill (within the last 90 days)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_personal_residence'][4] = "
	
	Help us help you - please be sure:
	
	• Full Apartment / Home Rental Bill (tight in frame)
	
	• Clear, easy to read details MUST show your NAME + STREET ADDRESS
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your identity -- per national Know-Your-Customer (KYC) and Anti-Money Laundering (AML) regulations.  Thank you for your assistance.
	";


	
	/////// START: MORE PERSONAL DOCUMENTS:
	
	$more_documents_loop = 1;
	$more_documents_key = 0;
	while($more_documents_loop <= 10) {
		
		
		
		# $additional_document['title'] = "1: TEST NEW PERSONAL DOCUMENT TITLE:";
		# $additional_document['options'][] = "Please select one...";
		# $additional_document['options'][] = "Test New Personal Option 1";
		# $additional_document['options'][] = "Test New Personal Option 2";
		# $additional_document['options'][] = "Test New Personal Option 3";
		# $additional_document['description_text'] = "This is the description text # 1.";
		# $additional_document['alert_text'] = "This is the confirmation text # 1.";	
		# $accounts_menu_array[$key]['additional_document']['personal'][$key] = $additional_document;
		
		$whitelabel_business_account_hash = $incoming_vars['whitelabel_business_account_hash'];
		logger3(" $more_documents_loop whitelabel_business_account_hash",$whitelabel_business_account_hash);
		
		$pulldown_name = "more_personal_documents_".$more_documents_loop;
		logger3(" $more_documents_loop pulldown_name",$pulldown_name);
		
		$pulldown_version = "DEFAULT";
		logger3(" $more_documents_loop pulldown_version",$pulldown_version);
		
		$additional_document_raw = get_pulldown_options_v2($whitelabel_business_account_hash,$pulldown_name,$pulldown_version);
		logger3(" $more_documents_loop additional_document_raw",$additional_document_raw);
		
		
		unset($tight_option_name_array);
		$tight_option_name_array = array();
		foreach($additional_document_raw['pulldown_data']['option_name'] as $option_name_key => $option) {
			$option_trimmed = trim($option);
			if($option_trimmed) {
				$tight_option_name_array[] = $option_trimmed;
			} else {
				$tight_option_name_array[] = "Configure A New Option Here";
			}
		}
		
		
		
		unset($additional_document);
		$additional_document = array();
		
		$additional_document['title'] = $additional_document_raw['pulldown_data']['title'];
		if(!$additional_document['title']) $additional_document['title'] = "TITLE EXAMPLE # ".$more_documents_loop;
		
		$additional_document['options'] = $tight_option_name_array; // $additional_document_raw['pulldown_data']['option_name'];
		if(!$additional_document['options'][0]) {
			//$additional_document['options'][] = "Please select one...";
			$additional_document['options'][] = "Configure A New Option Here";
		}
		
		

		$additional_document['description_text'] = $additional_document_raw['pulldown_data']['option_description'];
		if(!$additional_document['description_text']) $additional_document['description_text'] = "This is the description text # ". $more_documents_loop;
		
		$additional_document['alert_text'] = "This is the confirmation text # ". $more_documents_loop;
		if(!$additional_document['alert_text']) $additional_document['alert_text'] = "This is the confirmation text # ". $more_documents_loop;
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		logger3(" $more_documents_loop additional_document",$additional_document);
		$accounts_menu_array[$key]['additional_document']['personal'][$more_documents_key] = $additional_document;
		
		//logger3(" $loop accounts_menu_array[$key]['additional_document']['personal'][$key]",$additional_document);
		
		$more_documents_key++;
		$more_documents_loop++;

	}
	
	logger3("accounts_menu_array[$key]['additional_document']",$accounts_menu_array[$key]['additional_document']);
	/////// END: MORE PERSONAL DOCUMENTS.
	
	/*
	
		$additional_document = [];
		
		$additional_document['title'] = "1: TEST NEW PERSONAL DOCUMENT TITLE:";
		$additional_document['options'][] = "Please select one...";
		$additional_document['options'][] = "Test New Personal Option 1";
		$additional_document['options'][] = "Test New Personal Option 2";
		$additional_document['options'][] = "Test New Personal Option 3";
		$additional_document['description_text'] = "This is the description text # 1.";
		$additional_document['alert_text'] = "This is the confirmation text # 1.";	
		$accounts_menu_array[$key]['additional_document']['personal'][] = $additional_document;
		
		$additional_document['title'] = "2: TEST NEW PERSONAL DOCUMENT TITLE:";
		$additional_document['options'][] = "Please select one...";
		$additional_document['options'][] = "Test New Personal Option 1";
		$additional_document['options'][] = "Test New Personal Option 2";
		$additional_document['options'][] = "Test New Personal Option 3";
		$additional_document['description_text'] = "This is the description text # 2.";
		$additional_document['alert_text'] = "This is the confirmation text # 2.";	
		$accounts_menu_array[$key]['additional_document']['personal'][] = $additional_document;
		
		$additional_document = [];
		$additional_document['title'] = "3: TEST NEW PERSONAL DOCUMENT TITLE:";
		$additional_document['options'][] = "Please select one...";
		$additional_document['options'][] = "Test New Personal Option 1";
		$additional_document['options'][] = "Test New Personal Option 2";
		$additional_document['options'][] = "Test New Personal Option 3";
		$additional_document['description_text'] = "This is the description text # 3.";
		$additional_document['alert_text'] = "This is the confirmation text # 3.";	
		$accounts_menu_array[$key]['additional_document']['personal'][] = $additional_document;
	
	*/
	
	
	
	
	
	
	
	
	
	
	
		
	/// PROOF OF BUSINESS
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_business'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_title'] = "Business Identity Upload (from photo, scan or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Business Identity — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Business Identity) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business'][0] = "Federal EIN (TAX ID) Registration Receipt";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business'][0] = "
	
	Help us help you - please be sure:
	
	• Full EIN receipt page (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your authority to take payments as a formal business.  Thank you for your assistance.
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business'][1] = "State-Issued Sole Proprietor / DBA Certificate";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business'][1] = "
 
	Help us help you - please be sure:
	
	• Full DBA Certificate (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your authority to take payments as a formal business.  Thank you for your assistance.
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business'][2] = "State-Issued Incorporation Certificate";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business'][2] = "
	
	Help us help you - please be sure:
	
	• Full Incorporation Certificate (tight in frame)
	
	• Clear, easy to read details
	
	// Cut-off and partial-page screenshots will be rejected
	
	REMEMBER:  You are activating a USD 3000, real-time payment processing account.  This process does not effect your credit profile, but the merchant processing bank does need to verify your authority to take payments as a formal business.  Thank you for your assistance.
	";
	
	
	
	/// PROOF OF BANKING:
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing_title'] = "Proof of Business Banking Upload (photo or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Business Banking — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Business Banking) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "Business Bank Account Invoice / Statement";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_pricing'][0] = "
	
	ALERT! (1): Your business name **MUST** be clearly visible on your banking document;

	ALERT!! (2): The business name that is displayed on your Business Bank Account Statement **MUST** match the business name displayed on (at least one) other uploaded Proof of Business Document(s).

	SOLUTIONS: If your business name does not match the business name on at least one other uploaded Proof of Business Document, please upload new business documents to match your existing Bank Statement, or open a new business bank account -- one with the same name of your noted registered business.
	
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][1] = "Business Bank Account Voided Check";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_pricing'][1] = "
	
	ALERT! (1): Your business name **MUST** be clearly visible on your Voided Check;

	ALERT!! (2): The business name that is displayed on your Voided Check **MUST** match the business name displayed on (at least one) other uploaded Proof of Business Document(s).

	SOLUTIONS: If your business name does not match the business name on at least one other uploaded Proof of Business Document, please upload new business documents to match your existing Voided Check, or open a new business bank account -- one with the same name of your noted registered business.

	";
	
	
	
	/// PROOF OF TAX RETURNS:
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	//KYC_confirmation_text_proof_of_business_tax_returns
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns_title'] = "Proof of Business Tax Returns Upload (photo or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Business Tax Returns — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Business Tax Returns) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns'][0] = "New Business / No Previous Tax Returns (0 YEARS)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business_tax_returns'][0] = "
	
	ALERT!
	
	(1) As a new business, you have chosen to provide 0 YEARS of Tax Returns;
	
	(2) While it is not required... your ultimate processing fee may be significantly lower if you are able to provide 1 YEAR, 2 YEARS or even 3 YEARS of Tax Returns.
	
	(3) Please make sure that each page that up photo-capture / upload is clear (not blurry) and that each document fills the screen (easy to read)

	
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns'][1] = "1 YEAR of Tax Returns";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business_tax_returns'][1] = "
	
	ALERT!
	
	(1) You have chosen to provide 1 YEAR of Tax Returns;
	
	(2) While it is not required... your ultimate processing fee may be significantly lower if you are able to provide 2 YEARS or even 3 YEARS of Tax Returns.
	
	(3) Please make sure that each page that up photo-capture / upload is clear (not blurry) and that each document fills the screen (easy to read)

	
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns'][2] = "2 YEARS of Tax Returns";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business_tax_returns'][2] = "
	
	ALERT!
	
	(1) You have chosen to provide 2 YEARS of Tax Returns;
	
	(2) While it is not required... your ultimate processing fee may be significantly lower if you are able to provide 3 YEARS of Tax Returns.
	
	(3) Please make sure that each page that up photo-capture / upload is clear (not blurry) and that each document fills the screen (easy to read)

	
	";
	
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_business_tax_returns'][3] = "3 YEARS of Tax Returns";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_business_tax_returns'][3] = "
	
	ALERT!
	
	(1) You have chosen to provide 3 YEARS of Tax Returns;
	
	(2) Please make sure that each page that up photo-capture / upload is clear (not blurry) and that each document fills the screen (easy to read)

	
	";
	
	
	
	
	
	
	/// PROOF OF PREVIOUS PROCESSING:
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing_title'] = "Proof of Previous Processing Upload (photo or file):";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing_descriptive_paragraph'] = "With your device camera, you may now please take a photo of your Proof of Previous Processing — Simply click on the button (below): \"Take a Photo\"! — or if you have a file/scan/or photo (of your Previous Processing) already \"in\" your device gallery/storage, then: \"Upload a File\"!";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][0] = "No Previous Processing (0 Months)";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][0] = "
	
	ALERT!
	
	(1) You have chosen to provide only 0 MONTHS of previous processing;
	
	(2) While it is not required... your ultimate processing fee may be significantly lower if you are able to provide 4 MONTHS, 6 MONTHS or even 12 MONTHS of processing.

	
	";
	
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][1] = "1 MONTH of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][1] = "
	
	ALERT!
	
	(1) You have chosen to provide only 1 MONTH of previous processing history.  This is helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 4 MONTHS, 6 MONTHS or even 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";
	
	
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][2] = "2 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][2] = "
	
	ALERT!
	
	(1) You have chosen to provide only 2 MONTHS of previous processing history.  This is helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 4 MONTHS, 6 MONTHS or even 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][3] = "3 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][3] = "
	
	ALERT!
	
	(1) You have chosen to provide only 3 MONTHS of previous processing history.  This is helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 4 MONTHS, 6 MONTHS or even 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";
	
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][4] = "4 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][4] = "
	
	ALERT!
	
	(1) You have chosen to provide 4 MONTHS of previous processing history.  This is very helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 5 MONTHS, 6 MONTHS or even 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";	
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][5] = "5 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][5] = "
	
	ALERT!
	
	(1) You have chosen to provide 5 MONTHS of previous processing history.  This is very helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 6 MONTHS or even 12 MONTHS of processing.

	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";	
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][6] = "6 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][6] = "
	
	ALERT!
	
	(1) You have chosen to provide only 1 MONTH of previous processing history.  This is helpful to determine your ultimate processing rate; however, your ultimate processing rate may be significantly better if you are able to provide 12 MONTHS of processing.
	
	(2) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(3): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";	
		
	
	//$accounts_menu_array[$key]['KYC_option_text_proof_of_pricing'][0] = "";
	$accounts_menu_array[$key]['KYC_option_text_proof_of_processing'][7] = "12 MONTHS of Previous Process Statements";
	$accounts_menu_array[$key]['KYC_confirmation_text_proof_of_processing'][7] = "
	
	ALERT!
	
	(1) Your Business Name **MUST** be clearly visible on your Previous Processing Statements;
	
	(2): Total processing volume and total chargeback rates **MUST** be clearly visible on your Previous Processing Statements;
	
	";	
	
	
	
	
	
	

	
	
	
	
	/////// MORE BUSINESS DOCUMENTS:
	# $additional_document = [];
	# $additional_document['title'] = "1: TEST NEW BUSINESS DOCUMENT TITLE:";
	# $additional_document['options'][] = "Please select one...";
	# $additional_document['options'][] = "Test New Business Option 1";
	# $additional_document['options'][] = "Test New Business Option 2";
	# $additional_document['options'][] = "Test New Business Option 3";
	# $additional_document['description_text'] = "This is the Business description text # 1.";
	# $additional_document['alert_text'] = "This is the Business confirmation text # 1.";	
	# $accounts_menu_array[$key]['additional_document']['business'][] = $additional_document;	
	# 
	# $additional_document = [];
	# $additional_document['title'] = "2: TEST NEW BUSINESS DOCUMENT TITLE:";
	# $additional_document['options'][] = "Please select one...";
	# $additional_document['options'][] = "Test New Business Option 1";
	# $additional_document['options'][] = "Test New Business Option 2";
	# $additional_document['options'][] = "Test New Business Option 3";
	# $additional_document['description_text'] = "This is the Business description text # 2.";
	# $additional_document['alert_text'] = "This is the Business confirmation text # 2.";	
	# $accounts_menu_array[$key]['additional_document']['business'][] = $additional_document;
	# 
	# $additional_document = [];
	# $additional_document['title'] = "3: TEST NEW BUSINESS DOCUMENT TITLE:";
	# $additional_document['options'][] = "Please select one...";
	# $additional_document['options'][] = "Test New Business Option 1";
	# $additional_document['options'][] = "Test New Business Option 2";
	# $additional_document['options'][] = "Test New Business Option 3";
	# $additional_document['description_text'] = "This is the Business description text # 3.";
	# $additional_document['alert_text'] = "This is the Business confirmation text # 3.";	
	# $accounts_menu_array[$key]['additional_document']['business'][] = $additional_document;
	
	/////// MORE PERSONAL DOCUMENTS:
	# $loop_business = 1;
	# $loop_key = 0;
	# while($loop_business <= 10) {
	# 	unset($additional_document);
	# 	$additional_document = [];
	# 	$additional_document['title'] = $loop_business . ": TEST NEW PERSONAL DOCUMENT TITLE:";	
	# 	
	# 	$additional_document['options'][] = "Please select one...";
	# 	$additional_document['options'][] = "Test New Personal Option ". $loop_business;
	# 	$additional_document['options'][] = "Test New Personal Option ". $loop_business;
	# 	$additional_document['options'][] = "Test New Personal Option ". $loop_business;
	# 	$additional_document['description_text'] = "This is the description text # ". $loop_business;
	# 	$additional_document['alert_text'] = "This is the confirmation text # ". $loop_business;
	# 	$accounts_menu_array[$key]['additional_document']['business'][$loop_key] = $additional_document;
	# 	$loop_key++;
	# 	$loop_personal++;
	# 	
	# }
	
	
	
	
	
	
	/////// START: MORE BUSINESS DOCUMENTS:
	/*
	$loop = 1;
	$key = 0;
	while($loop <= 10) {
		
		unset($additional_document);
		$additional_document = array();
		
		# $additional_document['title'] = "1: TEST NEW PERSONAL DOCUMENT TITLE:";
		# $additional_document['options'][] = "Please select one...";
		# $additional_document['options'][] = "Test New Personal Option 1";
		# $additional_document['options'][] = "Test New Personal Option 2";
		# $additional_document['options'][] = "Test New Personal Option 3";
		# $additional_document['description_text'] = "This is the description text # 1.";
		# $additional_document['alert_text'] = "This is the confirmation text # 1.";	
		# $accounts_menu_array[$key]['additional_document']['personal'][$key] = $additional_document;
		
		$whitelabel_business_account_hash = $incoming_vars['whitelabel_business_account_hash'];
		$pulldown_name = "more_business_documents_".$loop;
		$pulldown_version = "DEFAULT";
		$additional_document_raw = get_pulldown_options_v2($whitelabel_business_account_hash,$pulldown_name,$pulldown_version);
		
		
		$additional_document['title'] = $additional_document_raw['pulldown_data']['title'];
		$additional_document['options'] = $additional_document_raw['pulldown_data']['option_name'];
		$additional_document['description_text'] = $additional_document_raw['pulldown_data']['option_description'];
		
		$additional_document['alert_text'] = $additional_document_raw['pulldown_data']['option_alert'][0];
		
		
		$accounts_menu_array[$key]['additional_document']['business'][$key] = $additional_document;
		
		$key++;
		$loop++;

	}
	*/
	/////// END: MORE BUSINESS DOCUMENTS.
	
	
	/////// START: MORE BUSINESS DOCUMENTS:
	
	$more_documents_loop = 1;
	$more_documents_key = 0;
	while($more_documents_loop <= 10) {
		
		
		
		# $additional_document['title'] = "1: TEST NEW PERSONAL DOCUMENT TITLE:";
		# $additional_document['options'][] = "Please select one...";
		# $additional_document['options'][] = "Test New Personal Option 1";
		# $additional_document['options'][] = "Test New Personal Option 2";
		# $additional_document['options'][] = "Test New Personal Option 3";
		# $additional_document['description_text'] = "This is the description text # 1.";
		# $additional_document['alert_text'] = "This is the confirmation text # 1.";	
		# $accounts_menu_array[$key]['additional_document']['personal'][$key] = $additional_document;
		
		$whitelabel_business_account_hash = $incoming_vars['whitelabel_business_account_hash'];
		logger3(" $loop whitelabel_business_account_hash",$whitelabel_business_account_hash);
		
		$pulldown_name = "more_business_documents_".$more_documents_loop;
		logger3(" $loop pulldown_name",$pulldown_name);
		
		$pulldown_version = "DEFAULT";
		logger3(" $loop pulldown_version",$pulldown_version);
		
		$additional_document_raw = get_pulldown_options_v2($whitelabel_business_account_hash,$pulldown_name,$pulldown_version);
		logger3(" $loop additional_document_raw",$additional_document_raw);
		
		
		
		//$additional_document_raw['pulldown_data']['option_name']
		
		unset($tight_option_name_array);
		$tight_option_name_array = array();
		foreach($additional_document_raw['pulldown_data']['option_name'] as $option_name_key => $option) {
			$option_trimmed = trim($option);
			if($option_trimmed) {
				$tight_option_name_array[] = $option_trimmed;
			} else {
				$tight_option_name_array[] = "Configure A New Option Here";
			}
		}
		
		
		
		unset($additional_document);
		$additional_document = array();
		
		$additional_document['title'] = $additional_document_raw['pulldown_data']['title'];
		if(!$additional_document['title']) $additional_document['title'] = "TITLE EXAMPLE # ".$more_documents_loop;
		
		$additional_document['options'] = $tight_option_name_array; // $additional_document_raw['pulldown_data']['option_name'];
		if(!$additional_document['options'][0]) {
			//$additional_document['options'][] = "Please select one...";
			$additional_document['options'][] = "Configure A New Option Here";
		}
		
		

		$additional_document['description_text'] = $additional_document_raw['pulldown_data']['option_description'];
		if(!$additional_document['description_text']) $additional_document['description_text'] = "This is the description text # ". $more_documents_loop;
		
		$additional_document['alert_text'] = "This is the confirmation text # ". $more_documents_loop;
		if(!$additional_document['alert_text']) $additional_document['alert_text'] = "This is the confirmation text # ". $more_documents_loop;
		
		
		
		
		
		# if($additional_document_raw['pulldown_data']['option_alert'][0]) {
		# 	$additional_document['alert_text'] = $additional_document_raw['pulldown_data']['option_alert'][0];
		# } else {
		# 	$additional_document['alert_text'] = $additional_document_raw['pulldown_data']['option_alert'];
		# }
		
		logger3(" $more_documents_loop additional_document",$additional_document);
		$accounts_menu_array[$key]['additional_document']['business'][$more_documents_key] = $additional_document;
		
		//logger3(" $loop accounts_menu_array[$key]['additional_document']['personal'][$key]",$additional_document);
		
		$more_documents_key++;
		$more_documents_loop++;
		
		//if($more_documents_loop == 3) break;

	}
	
	logger3("accounts_menu_array[$key]['additional_document']",$accounts_menu_array[$key]['additional_document']);
	/////// END: MORE BUSINESS DOCUMENTS.
	
	
	
	
	
	
	
	
	
}	/// END DEFAULT ON•BOARDING PULLDOWN OPTIONS , ETC.
	
	
	
	
	
	
	/// START: activate_business_dcoument_3
	$accounts_menu_array[$key]['activate_business_document_3'] = "";
	if(stristr($tmp_account['business_document_3'],"REQUESTED")) {
		$accounts_menu_array[$key]['activate_business_document_3'] = "YES";
		
		/// set document options
		/// GET REQUESTED DOCUMENTS:
		
		
		$requested_docouments_array = ""; // get the list of requested documents from admin (somehow)
		
		//$member_hash = "1ce9f2ec55d7ff529e39fa5639eb6487";
		//$business_account_hash = $tmp_account['hash'];
		
		$tmp_sql = "SELECT * FROM KYC_additional_documents_options 
					WHERE account_hash = '". $tmp_account['hash'] . "'
					ORDER BY datetime_created DESC
					LIMIT 1;";
		$tmp_KYC_additional_documents_options = readTHECASHIER($tmp_sql);
		
		//logger3("KYC_additional_documents_options_details",$KYC_additional_documents_options_details);
		
		$requested_docouments_array = unserialize($tmp_KYC_additional_documents_options->serialized_pulldown_options);
		
		//logger3("unserialized_serialized_pulldown_options",$unserialized_serialized_pulldown_options);
		

		
		
		if(empty($requested_docouments_array)) { // DEFAULT OPTIONS
			
			/* never an event, because admin always sets these:
				
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][0] = "Special License to do Business / Practice";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][1] = "Rental Agreement w/ Business Name Displayed";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][2] = "Invoice from a Supplier w/ Your Business Name Displayed";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][3] = "Your Brochure or Menu w/ Pricing Displayed";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][4] = "";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][5] = "";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][6] = "";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][7] = "";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][8] = "";
			$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][9] = "";	
			
			*/
			
		
		} else { /// SET PERSONALIZED REQUESTS:
			
			

			foreach($requested_docouments_array['activate_business_document_3_pulldown_option'] as $option_key => $requested_docoument_description) {
				$accounts_menu_array[$key]['activate_business_document_3_pulldown_option'][$option_key] = $requested_docoument_description;
				$accounts_menu_array[$key]['additional_business_document_3_required'] = $requested_docouments_array['additional_business_document_3_required'];
				
			}
			
			foreach($requested_docouments_array['activate_business_document_4_pulldown_option'] as $option_key => $requested_docoument_description) {
				$accounts_menu_array[$key]['activate_business_document_4_pulldown_option'][$option_key] = $requested_docoument_description;
				$accounts_menu_array[$key]['additional_business_document_4_required'] = $requested_docouments_array['additional_business_document_4_required'];
				
			}
			
			foreach($requested_docouments_array['activate_business_document_5_pulldown_option'] as $option_key => $requested_docoument_description) {
				$accounts_menu_array[$key]['activate_business_document_5_pulldown_option'][$option_key] = $requested_docoument_description;
				$accounts_menu_array[$key]['additional_business_document_5_required'] = $requested_docouments_array['additional_business_document_5_required'];
				
			}
			
			foreach($requested_docouments_array['activate_business_document_6_pulldown_option'] as $option_key => $requested_docoument_description) {
				$accounts_menu_array[$key]['activate_business_document_6_pulldown_option'][$option_key] = $requested_docoument_description;
				$accounts_menu_array[$key]['additional_business_document_6_required'] = $requested_docouments_array['additional_business_document_6_required'];
				
			}
			
			foreach($requested_docouments_array['activate_business_document_7_pulldown_option'] as $option_key => $requested_docoument_description) {
				$accounts_menu_array[$key]['activate_business_document_7_pulldown_option'][$option_key] = $requested_docoument_description;
				$accounts_menu_array[$key]['additional_business_document_7_required'] = $requested_docouments_array['additional_business_document_7_required'];
				
			}
			
			
		}
		
		
		
		
		
		
		
		
	}
	/// END: activate_business_dcoument_3
	
	
	/// SET URL FIELD REQUIREMENT - per account / client, etc:
	$accounts_menu_array[$key]['KYC_option_request_business_url_required'] = "TRUE"; // "FALSE";
	
	
	/// Business Description Pulldown:
	
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][0] = "Advertising & Marketing";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][1] = "Appliance Repair";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][2] = "Artwork & Crafts";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][3] = "Bitcoin & FX";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][4] = "Cafe & Restaurant";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][5] = "Clothing & Fashion";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][6] = "Cosmetics & Hair";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][7] = "Digital Music & Photography";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][8] = "Education & Tutoring";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][8] = "Electronic Equipment";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][9] = "Fitness & Training";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][10] = "Food & Nutrition";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][11] = "Florist";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][12] = "Graphic Design";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][13] = "Internet & Web Service";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][14] = "Jewelry & Watches";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][15] = "Holistic Healthcare";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][16] = "Handyman & Home Improvement";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][17] = "House & Office Cleaning";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][18] = "HVAC Maintenance & Repair";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][19] = "Interior Design";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][20] = "Lawn & Landscaping";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][21] = "Limousine & Taxi";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][22] = "Legal";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][23] = "Medical & Pharmaceutical";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][24] = "Pet & Kennel Care";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][25] = "Pest Control";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][26] = "Rental & Real Estate";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][27] = "Technical & PC Support";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][28] = "Towing";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][29] = "Trash Removal";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][30] = "Video Editing & Production";
	# 
	# $accounts_menu_array[$key]['KYC_business_description_pulldown_options'][31] = "(other, not listed)";
	
	$accounts_menu_array[$key]['KYC_business_description_pulldown_title'] = "Business Description";
	$accounts_menu_array[$key]['KYC_business_description_pulldown_options'][0] = "E-Commerce (only)";
	$accounts_menu_array[$key]['KYC_business_description_pulldown_options'][1] = "Face-to-Face (only)";
	$accounts_menu_array[$key]['KYC_business_description_pulldown_options'][2] = "E-Commerce & Face-to-Face";
	
	$whitelabel_business_account_hash = $incoming_vars['whitelabel_business_account_hash'];
	logger3("whitelabel_business_account_hash",$whitelabel_business_account_hash);
	
	$pulldown_name = "onboarding_business_description";
	logger3("pulldown_name",$pulldown_name);
	
	$pulldown_version = "DEFAULT";
	logger3("pulldown_version",$pulldown_version);
	
	//$business_description_pulldown_options_array = get_pulldown_options($whitelabel_business_account_hash,$pulldown_name);
	
	logger3("business_description_pulldown_options_array",$business_description_pulldown_options_array);
	
	
	logger3(" ___ whitelabel_business_account_hash",$whitelabel_business_account_hash);
	logger3(" ___ pulldown_name",$pulldown_name);
	logger3(" ___ pulldown_version",$pulldown_version);
	
	$options_array = get_pulldown_options_v2($whitelabel_business_account_hash,$pulldown_name,$pulldown_version);
	logger3("get_pulldown_options_v2 options_array",$options_array);
	
	if(!empty($options_array['pulldown_data']['title'])) {
		
		$accounts_menu_array[$key]['KYC_business_description_pulldown_title'] = $options_array['pulldown_data']['title'];
		unset($accounts_menu_array[$key]['KYC_business_description_pulldown_options']);
		$accounts_menu_array[$key]['KYC_business_description_pulldown_options'] = $options_array['pulldown_data']['option_name'];
		
	}	
	
	logger3("accounts_menu_array[$key]['KYC_business_description_pulldown_options']",$accounts_menu_array[$key]['KYC_business_description_pulldown_options']);
					
					
	/*
	$_XXXXX_whitelabel_business_account_hash = $incoming_vars['whitelabel_business_account_hash'];
	$tmp_sql = "SELECT * 
				FROM pulldown_options
				WHERE whitelabel_business_account_hash = '". $_XXXXX_whitelabel_business_account_hash ."'
				ORDER BY datetime_updatad DESC
				LIMIT 1;";
	//test("tmp_sql",$tmp_sql);
	$pulldown_options_results = readTHECASHIER($tmp_sql,"intelitruth");
	//test("pulldown_options_results",$pulldown_options_results);	
	//test("pulldown_options_results->pulldown_values",$pulldown_options_results->pulldown_values)
	$pulldown_options_results_unserialized = unserialize($pulldown_options_results->pulldown_values);
	//test("pulldown_options_results_unserialized",$pulldown_options_results_unserialized);
	$pulldown_options_results_unserialized_jasondecoded = json_decode($pulldown_options_results_unserialized);
	//test("pulldown_options_results_unserialized_jasondecoded",$pulldown_options_results_unserialized_jasondecoded);
	$pulldown_options_final_array = object_to_array_v2($pulldown_options_results_unserialized_jasondecoded);
	//test("pulldown_options_final_array",$pulldown_options_final_array);
	if(empty($pulldown_options_final_array['business_description'])) {
		
		$accounts_menu_array[$key]['KYC_business_description_pulldown_options'] = $pulldown_options_final_array['business_description'];
		
	}
	*/
	
	
	/// determine if we should display the TELL A FRIEND button for this user:
	
	
	
	
	
	/// LEGAL CONFIRMATION TICKBOXES:
	/*
	$accounts_menu_array[$key]['legal_tickbox_alert_terms_of_service'] = "
	
	ALERT!  
	
	By ticking this box, you are confirming that a link to your TERMS OF SERVICE exists at the BOTTOM of your website's HOME PAGE.
	
	(If a link to your TERMS OF SERVICE does NOT exist at the bottom of your website, your application will be rejected.)
	
	";
	
	$accounts_menu_array[$key]['legal_tickbox_alert_privacy_policy'] = "
	
	ALERT!  
	
	By ticking this box, you are confirming that a link to your PRIVACY POLICY exists at the BOTTOM of your website's HOME PAGE.
	
	(If a link to your PRIVACY POLICY does NOT exist at the bottom of your website, your application will be rejected.)
	
	";
	
	$accounts_menu_array[$key]['legal_tickbox_alert_refund_policy'] = "
	
	ALERT!  
	
	By ticking this box, you are confirming that a link to your REFUND POLICY exists at the BOTTOM of your website's HOME PAGE.
	
	(If a link to your REFUND POLICY does NOT exist at the bottom of your website, your application will be rejected.)
	
	";
	*/
	
	$accounts_menu_array[$key]['legal_tickbox_alert_terms_of_service'] = "";
	
	$accounts_menu_array[$key]['legal_tickbox_alert_privacy_policy'] = "";
	
	$accounts_menu_array[$key]['legal_tickbox_alert_refund_policy'] = "";
	
	
	$accounts_menu_array[$key]['step_4_of_4_proof_of_identity_introduction_text'] = "
	<br>
	Due to requirements placed upon us by the processing bank, every Account Holder must provide 'Proof of Identity'.
	<br>
	<br>We understand that uploading personal information (especially as it relates to your identity) can be a little intimidating.  However, rest assured we are 100% PCI/DSS-compliant, which means all of your data is managed with the highest standards of security, privacy and respect.  We thank you in advance for your understanding in accommodating this final step (uploading Proof of Identity).
	<br>
	<hr>
	From the pull-down menus below, please select the options that best suit you and your business.  Then, using your built-in device Camera / Uploader, please take a photo (or upload the files) as applicable...
	<br>
	";
	
	    
	
	
	
	$accounts_menu_array[$key]['final_confirmation_notes_prior_to_signature_and_submission'] = "
	<br>
	FINAL NOTES:
	<br>
	<br>
	• Once your Account is live, you may begin accepting MasterCard /VISA payments.;
	<br>
	<br>
	• To receive payments into your business bank account, you will need to further register your bank account details with the processing bank;
	<br>
	<br>
	• You may register your business banking details with the processing bank before (or after) you begin taking payments;
	<br>
	<br>
	• Finally, please review and accept our Terms and Conditions by submitting an on-screen signature, below:	
	<br>
	
	";
	$accounts_menu_array[$key]['final_confirmation_notes_prior_to_signature_and_submission'] = "&nbsp;";

	
	
	//business_type_options start
	$accounts_menu_array[$key]['business_type_options']['united_states'] = array("Registered Sole Proprietor", "General Partnership", "LLC", "Corp.", "Inc.", "Other Registered Company"); 
	$accounts_menu_array[$key]['business_type_options']['canada'] = array("Registered Sole Proprietor", "General Partnership", "Ltd.", "Inc.", "Corp.", "Other Registered Company"); 
	$accounts_menu_array[$key]['business_type_options']['european_union'] = array("Registered Sole Proprietor", "General Partnership", "Limited Partnership", "Corp.", "Other Registered Company"); 
	$accounts_menu_array[$key]['business_type_options']['other'] = array("General Partnership", "Limited Partnership", "Inc.", "Ltd.", "Pty. Ltd.", "Other Registered Company"); 
	//business_type_options end
	
	
	
	
	
	
	
	
}







if(
	( (stristr($incoming_vars['PAYYAP_device_type'],"iP")) &&  ($incoming_vars['PAYYAP_version'] >= "5.5") )
	|| ( (!stristr($incoming_vars['PAYYAP_device_type'],"iP")) && ($incoming_vars['PAYYAP_version'] >= "6.5") )
) {
		
		//$output = ['account_menus' => '', 'display_TELL_A_FRIEND' => 'OFF'];  // ON or OFF ("" == OFF)
		
		
		### testing:
		$display_TELL_A_FRIEND_value = "OFF"; // DEFAULT
		logger3("display_TELL_A_FRIEND_value",$display_TELL_A_FRIEND_value);
		
		$previously_told_friend = false;
		$tmp_sql = "SELECT * FROM app_imported_contacts 
					WHERE referring_default_member_hash = '" . $existing_member['hash'] . "'
					AND referral_status = 'SELECTED'
		;";
		logger3("tmp_sql",$tmp_sql);
		$previously_told_friend = readTHECASHIER($tmp_sql);
		logger3("existing_contact_details",$existing_contact_details);
		
		if(!$previously_told_friend) {
			
			
			$display_TELL_A_FRIEND_value = "ON";
			
			/// this is where we need to add a lot more logic about when we display (or not display) the TELL A FRIEND BUTTON.
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
		}
		
		/// shea testing admin
		if(
			(stristr($existing_member['hash'],"b5d7adbe78825491723c3607e0a81b65")) 
			&& (!$previously_told_friend) 
		) {
		  $display_TELL_A_FRIEND_value = "ON"; // shea.writer@nsdb.com
		}
	
		//$YOUTUBE_Services_Video_ID = "PZbaFTYHMCc"; // v3

		//$YOUTUBE_Services_Video_ID = "cy73EeKU15Q"; // v5
		
		//$YOUTUBE_Services_Video_ID = "3Pekx2ICFCI"; // v5
		
		$YOUTUBE_Services_Video_ID = $_SESSION['template']['company']['YOUTUBE_Services_Video_ID']; // v6
		
		
		$output = ['account_menus' => $accounts_menu_array
		,'display_TELL_A_FRIEND' => $display_TELL_A_FRIEND_value
		,'YOUTUBE_Services_Video_ID' => $YOUTUBE_Services_Video_ID
		,'tell_a_friend_button_text' => 'Invite Contacts'
		,'tell_a_friend_info_button' => "Help us spread the word!\r\rBONUS:  We pay you 25% of net processing revenue from all referrals - for life -- directly into your account!\r\rCan you think of any entrepreneurs or small business owners ?? Start earning money more right now: tell your associates (up to 20)!!  :)"
		];
		
		//$output['account_menus'] = $accounts_menu_array;

		// determine if we should display the TELL A FRIEND button for this user:
		//$output['display_TELL_A_FRIEND'] = 'OFF';
		
		
	
		
		
		/// START (POSSIBLE) FORCE UPDATE:
		
		// $output['force_update'] = intelitruth_force_update($device_type=$incoming_vars['PAYYAP_device_type'],$app_version=$incoming_vars['PAYYAP_version']); // YES; NO
		// $tmp_output['force_update'] = intelitruth_force_update($device_type=$incoming_vars['PAYYAP_device_type'],$app_version=$incoming_vars['PAYYAP_version']); // YES; NO
		// $output['force_update'] = $tmp_output['force_update'];
		// $output['itunes_app_store_url'] = $tmp_output['itunes_app_store_url'];
		
		$device_type = $incoming_vars['PAYYAP_device_type'];
		$app_version = $incoming_vars['PAYYAP_version'];
		$whitelabel_business_account_hash = $whitelabel_business_account_hash;
		
		$tmp_output = intelitruth_force_update($device_type,$app_version,$whitelabel_business_account_hash); // YES; NO
		$output['force_update'] = $tmp_output['force_update'];
		$output['itunes_app_store_url'] = $tmp_output['itunes_app_store_url'];
		/// END (POSSIBLE) FORCE UPDATE...!
		
		
		/// enable_high_security_chargeback_protection
		if($tmp_account['enable_high_security_chargeback_protection']) {
			$output['enable_high_security_chargeback_protection'] = $tmp_account['enable_high_security_chargeback_protection'];
		
		} else { // default
			$output['enable_high_security_chargeback_protection'] = "DISABLED";
		
		}
		
		
		
		
		
		/// set KYC OPTIONS & CONFIRMATIION_TEXT
		//$output['KYC_option'] = "DISABLED";
		
		
		
		/// START: BUTTON OPTION ////////////////////////////////////
	
		### FORM 1 (ESSENTIALS) ###
		if(!$output['button_save_and_back_to_edit'][0]) $output['button_save_and_back_to_edit'][0] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		if(!$output['button_save_and_finish_later'][0]) $output['button_save_and_finish_later'][0] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
	
		### FORM 2 (PERSONAL) ###
		if(!$output['button_save_and_back_to_edit'][1]) $output['button_save_and_back_to_edit'][1] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		if(!$output['button_save_and_finish_later'][1]) $output['button_save_and_finish_later'][1] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		
		### FORM 3 (BUSINESS) ###
		if(!$output['button_save_and_back_to_edit'][2]) $output['button_save_and_back_to_edit'][2] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		if(!$output['button_save_and_finish_later'][2]) $output['button_save_and_finish_later'][2] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		
		### FORM 4 (POSTFIX) ###
		if(!$output['button_save_and_back_to_edit'][3]) $output['button_save_and_back_to_edit'][3] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		if(!$output['button_save_and_finish_later'][3]) $output['button_save_and_finish_later'][3] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		
		### FORM 5 (DOCUMENTS) ###
		if(!$output['button_save_and_back_to_edit'][4]) $output['button_save_and_back_to_edit'][4] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		if(!$output['button_save_and_finish_later'][4]) $output['button_save_and_finish_later'][4] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		
		### FORM 6 (SIGNATURE) ###
		if(!$output['button_save_and_back_to_edit'][5]) $output['button_save_and_back_to_edit'][5] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		if(!$output['button_save_and_finish_later'][5]) $output['button_save_and_finish_later'][5] = "DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		if($incoming_vars['whitelabel_business_account_hash'] == "97eba54024aad4f1f60139cb5fd34b43") {
			if(!$output['button_save_and_back_to_edit'][5]) $output['button_save_and_back_to_edit'][5] = "DO_NOT_DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
			if(!$output['button_save_and_finish_later'][5]) $output['button_save_and_finish_later'][5] = "DO_NOT_DISPLAY";  // "DISPLAY" || "DO_NOT_DISPLAY"
		}
			
		/// END: BUTTON OPTION ////////////////////////////////////
		
		
		

		# /// START: LOGIN OPTIONS ////////////////////////////////////
		# $output['login_type'] = "";
		# $output['login_verification'] = "";
		# 
		# 
		# if(strtolower($whitelabel_business_account_details['onboarding_account_registration_process']) == "unverified_email_address") {
		# 	$output['login_type'] = "email_address";
		# 	$output['login_verification'] = "none";
		# }
		# 
		# if(strtolower($whitelabel_business_account_details['onboarding_account_registration_process']) == "verified_email_address") {
		# 	$output['login_type'] = "email_address";
		# 	$output['login_verification'] = "email_address";
		# }
		# 
		# if(strtolower($whitelabel_business_account_details['onboarding_account_registration_process']) == "unverified_telephone") {
		# 	$output['login_type'] = "mobile_number";
		# 	$output['login_verification'] = "none";
		# }
		# 
		# if(strtolower($whitelabel_business_account_details['onboarding_account_registration_process']) == "verified_sms") {
		# 	$output['login_type'] = "mobile_number";
		# 	$output['login_verification'] = "mobile_sms";
		# }
		# 
		# 
		# if(!$output['login_type']) $output['login_type'] = "email_address";  // "email_address" || "mobile_number"
		# if(!$output['login_verification']) $output['login_verification'] = "email_address"; // "none" || "email_address" || "mobile_sms"
		# 
		# 
		# /// END: LOGIN OPTIONS ////////////////////////////////////
		

		
		$output['your_have_already_submitted_your_profile_alert_text'] = "ALERT!  You have already submitted your profile.  Please allow up to 72 hours for administrative review.  Thank you!";
		
		$output['your_profile_is_approved_alert_text'] = "ALERT!  You profile is already approved and active.  You may update your profile by submitting edits.  Edits that are not submitted will not take effect.  Please submit all changes for updates to take effect. Thank you!";
		
		
		
		
		
		
		

} else {
	
	$output = $accounts_menu_array; // legacy
}








$final_output = json_encode($output);
logger3("final_output",$final_output);








echo $final_output;






### END: SESSIONS & STUFF.
#
#
#
include($_SESSION['template']['company']['file_path'] . "shared/end_verified_session.shared");

?>