<?



### 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");

//if($test_logging == true) test("_SESSION['template']['company']",$_SESSION['template']['company']);
//if($test_logging == true) test("0_SESSION['support_action']",$_SESSION['support_action']);
//if($test_logging == true) test("_GET['password']",$_GET['password']);
//if($test_logging == true) test("_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";
include($_SESSION['template']['company']['file_path'] . "shared/start_verified_session.shared");
#
#
#
//log_traffic_stats();

$test_logging = false;  // set to true or false
$test_emailing = true;
$test_datetime_status = false; // set to false for LIVE



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


if($test_logging == true) test("












########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
########################################################################################
### NEW SESSION:  [" . $_SERVER['SCRIPT_NAME'] . "]
########################################################################################


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


########################################################

### TEST TIMING // UNCOMMENT TO TURN OFF:
if($test_logging == true) test("test_datetime_status",$test_datetime_status);

$test_accounts_array = "";

if($test_datetime_status == true) {

	$test_time_current = time();
	if($test_logging == true) test("test_time_current",$test_time_current);
 
	$test_datetime_current = date("Y-m-d H:i:s");
	if($test_logging == true) test("test_datetime_current",$test_datetime_current);
 
	$test_time_in_the_future_days = 0; // test false
	//$test_time_in_the_future_days = 1; //test 24 hours
	//$test_time_in_the_future_days = 4;
	//$test_time_in_the_future_days = 10;
	//$test_time_in_the_future_days = 30;
	//$test_time_future = strtotime("+". $test_time_in_the_future_days ." days");
	
	if($test_logging == true) test("test_time_future",$test_time_future);
	
	$future_in_house = $test_time_in_the_future_days * 24;
	$test_time_future = strtotime($test_datetime_current . "+ ". $future_in_house . " hours");
	$test_datetime_future = date("Y-m-d H:i:s",$test_time_future);
	if($test_logging == true) test("test_datetime_future",$test_datetime_future);
	
	$test_accounts_array = "";
	$test_accounts_array = array();
	
	///////// emailtesta@corp.nsdb.com
	///$test_accounts_array[0]['accountid'] = "11833"; // <-- set the accountid to test
	////$test_accounts_array[0]['creator_memberid'] = "8345";  // <-- set the creator_memberid to test
	
	
	$use_this_member_emailaddress = $use_this_emailaddress = "shea@s.bangk.net";
	
	if($use_this_emailaddress) {
	 
	 $tmp_sql = "SELECT memberid FROM members WHERE emailaddress = '". $use_this_emailaddress ."';";
	 if($test_logging == true) test("tmp_sql",$tmp_sql);
	 $test_memberid = getTHECASHIER($tmp_sql);
	 if($test_logging == true) test("test_memberid",$test_memberid);
	 
	 
	 $tmp_sql = "SELECT accountid FROM accounts 
	    WHERE accounttype = 'BUSINESS'
	    AND creator_memberid = '$test_memberid';";
	    if($test_logging == true) test("tmp_sql",$tmp_sql);
	 $test_memberid_accountid = getTHECASHIER($tmp_sql);
	 if($test_logging == true) test("test_memberid_accountid",$test_memberid_accountid);
	 
	 $tmp_sql = "SELECT * FROM accounts WHERE accountid = '". $test_memberid_accountid ."';";
	 $test_accounts_array[0] = object2array(readTHECASHIER($tmp_sql));
	 
	 if($test_logging == true) test("test_accounts_array",$test_accounts_array);

	}
}


########################################################



//https://gateway.bangk.com/photoBANGK_new_account_followups.gate?cron_password=l3mm3thru

$datetime_start_search = "2016-12-01 00:00:00";
$current_datetime = datetime();
$days_later_followup_1 = 1; // from the last update
$days_later_followup_2 = 3; // from the last update
$days_later_followup_3 = 6; // from the last update
$days_later_followup_4 = 20; // from the last update

$campign_name = $_SESSION['template']['company']['name'];
$campign_number_of_cycles = $_SESSION['template']['company']['name'];



// set test credentials if available:
if($test_logging == true) test("test_accounts_array",$test_accounts_array);
if(!$test_accounts_array) {

 	//get the mmbers
 	$tmp_sql = "SELECT *
 	   FROM accounts 
 	   WHERE accounttype = 'BUSINESS' 
 	   AND ( PAYYAP_application_status = '' OR PAYYAP_application_status = 'INCOMPLETE' OR PAYYAP_application_status = 'DETAILS REQUESTED' )
 	   AND created > '". $datetime_start_search ."'
 	   ORDER BY created ASC
 	   ;";
 	if($test_logging == true) test("tmp_sql",$tmp_sql);
 	$accounts_array = readarrayTHECASHIER($tmp_sql);
 	//if($test_logging == true) test("1_accounts_array",$accounts_array);
 	//exit;

} else {

	if($test_accounts_array) $accounts_array = $test_accounts_array;
	//if($test_logging == true) test("2_accounts_array",$accounts_array);

}



//if($test_logging == true) test("000 accounts_array",$accounts_array);

// now check to see if the members have a "ACTIVE" email address:


foreach($accounts_array as $key => $tmp_account_details) {
	
	

	##################################################################
	##################################################################
	### START: WHITELABEL ACCOUNT DETAILS (RE: DYNAMIC LOGOS TO USE)
	
	if(!empty($tmp_account_details['whitelabel_business_account_hash'])) {
		
		$tmp_sql = "SELECT * FROM accounts WHERE hash = '". $tmp_account_details['whitelabel_business_account_hash'] ."';";
		$whitelabel_business_account_details_array = object_to_array_v2(readTHECASHIER($tmp_sql));
	}
		
	//// whitelabel from name
	$insert_email_from_name = $_SESSION['template']['company']['domain'];
	if($whitelabel_business_account_details_array['accountname']) $insert_email_from_name = $whitelabel_business_account_details_array['accountname'];
	logger3("emailpage(): insert_email_from_name",$insert_email_from_name);
	
	//// whitelabel from emailaddress
	$insert_email_from_email = $_SESSION['template']['company']['emailaddress_support'];
	if($whitelabel_business_account_details_array['emailaddress']) $insert_email_from_email = $whitelabel_business_account_details_array['emailaddress'];
	logger3("emailpage(): insert_email_from_email",$insert_email_from_email);
	
	//// whitelabel from logo
	$insert_email_from_logo = $_SESSION['template']['company']['logo_topleft'];
	logger3("emailpage(): whitelabel_business_account_details_array['url_to_whitelabel_banner_2048X475']",$whitelabel_business_account_details_array['url_to_whitelabel_banner_2048X475']);
	if($whitelabel_business_account_details_array['url_to_whitelabel_banner_2048X475']) $insert_email_from_logo = $whitelabel_business_account_details_array['url_to_whitelabel_banner_2048X475'];
	logger3("emailpage(): insert_email_from_logo",$insert_email_from_logo);
	
	//// whitelabel URL
	$insert_email_from_url = "https://".$_SESSION['template']['company']['domain'];
	if($whitelabel_business_account_details_array['url']) $insert_email_from_url = $whitelabel_business_account_details_array['url'];
	logger3("emailpage(): insert_email_from_url",$insert_email_from_url);
		
	
	
	### END: WHITELABEL ACCOUNT DETAILS (RE: DYNAMIC LOGOS TO USE)
	##################################################################
	##################################################################





	//$test_logging = true;
	
	sleep(5); // create a buffer for tube-to-text to offer service
	
 if($test_logging == true) test("key",$key);
 if($test_logging == true) test("tmp_account_details",$tmp_account_details);
 $tmp_member_details = member($tmp_account_details['creator_memberid']);
 
 
 $email_subject = "";
 $email_message = "";
 $updated_followup_email_ID_last_sent = false; // defines when email has been set so as to not overwrite.
 $account_followup_status_details = "";
 $tmp_member_hash = "";
 
 $send_the_followup_to_this_emailaddress = "";
 $tmp_email_to_memberid = "";
 $tmp_sql = "SELECT emailaddress FROM members WHERE memberid = '". $tmp_account_details['creator_memberid'] ."';";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $send_the_followup_to_this_emailaddress = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("send_the_followup_to_this_emailaddress",$send_the_followup_to_this_emailaddress);
 //exit;
 
 /// figure out what email to send
 
 $tmp_sql = "SELECT * 
    FROM followup_emails 
    WHERE accountid = '". $tmp_account_details['accountid'] ."'
    AND accountid != ''
    AND accountid != '0'
    AND accountid IS NOT NULL
    ;";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 
 $account_followup_status_details = readTHECASHIER($tmp_sql);
 if($test_logging == true) test("account_followup_status_details",$account_followup_status_details);
 
 if($test_logging == true) test("account_followup_status_details->followup_emails_id",$account_followup_status_details->followup_emails_id);
 //exit;
 
 $tmp_sql = "SELECT hash FROM members WHERE memberid = '". $tmp_account_details['creator_memberid'] ."';";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $tmp_member_hash = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("tmp_member_hash",$tmp_member_hash);
 
 
 
 if($test_logging == true) test("tmp_account_details['hash']",$tmp_account_details['hash']);
 
  
 if(!$account_followup_status_details->followup_emails_id) {
  
  /// create a followup_emails record for this member:
  $_XXXXX_followup_emails_id = "";
  $_XXXXX_memberid = $tmp_account_details['creator_memberid'];
  $_XXXXX_accountid = $tmp_account_details['accountid'];
  $_XXXXX_member_hash = $tmp_member_hash;
  $_XXXXX_account_hash = $tmp_account_details['hash'];
  $_XXXXX_campaign_name = $campign_name;
  $followup_email_ID_last_sent = "0";
  $_XXXXX_datetime_created = datetime();
  $_XXXXX_datetime_updated = $_XXXXX_datetime_created;
  
  $tmp_sql = "INSERT INTO `followup_emails` (
  `followup_emails_id`
  , `memberid`
  , `accountid`
  , `member_hash`
  , `account_hash`
  , `campaign_name`
  , `followup_email_ID_last_sent`
  , `datetime_created`
  , `datetime_updated`
  ) VALUES (
  '". $_XXXXX_followup_emails_id ."'
  ,'". $_XXXXX_memberid ."'
  ,'". $_XXXXX_accountid ."'
  ,'". $_XXXXX_member_hash ."'
  ,'". $_XXXXX_account_hash ."'
  ,'". $_XXXXX_campaign_name ."'
  ,'". $followup_email_ID_last_sent ."'
  ,'". $_XXXXX_datetime_created ."'
  ,'". $_XXXXX_datetime_updated ."'
  );";
  if($test_logging == true) test("tmp_sql",$tmp_sql);
  $followup_emails_id = "";
  $followup_emails_id = insertTHECASHIER($tmp_sql);
  if($test_logging == true) test("followup_emails_id",$followup_emails_id);
  
  $tmp_sql = "SELECT * FROM followup_emails WHERE followup_emails_id = '". $followup_emails_id ."';";
  if($test_logging == true) test("tmp_sql",$tmp_sql);
  
  $account_followup_status_details = "";
  $account_followup_status_details = readTHECASHIER($tmp_sql);
  if($test_logging == true) test("account_followup_status_details",$account_followup_status_details);
  
  //exit;

  
 }


//exit;
 

 



 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### REGISTERED BUT NOT VERIFIED EMAIL

 
 /// check if the member has a verified email address:
 if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
 //exit;
 
 $registered_member_verified_emailaddress = false;
 $tmp_sql = "SELECT emailaddress 
    FROM email_addresses 
    WHERE memberid = '". $tmp_account_details['creator_memberid'] ."' 
    AND status = 'ACTIVE'
    ;";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $registered_member_verified_emailaddress = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("registered_member_verified_emailaddress",$registered_member_verified_emailaddress);
 
 //exit;
 
 if( 
  ($account_followup_status_details->followup_email_ID_last_sent <= 4)
 ) {
  
  
  /// check if the member has a verified email address:
  
  
  
  //exit;
  if($registered_member_verified_emailaddress == false) {
  
    
   $tmp_sql = "SELECT emailaddress FROM email_addresses WHERE memberid = '". $tmp_account_details['creator_memberid'] ."' ORDER BY datetime_updated DESC LIMIT 1;";
   if($test_logging == true) test("tmp_sql",$tmp_sql);
   $registered_member_emailaddress = "";
   $registered_member_emailaddress = getTHECASHIER($tmp_sql);
   if($test_logging == true) test("01_registered_member_emailaddress",$registered_member_emailaddress);
   
  
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = "";
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   if($test_logging == true) test("current_datetime",$current_datetime);
   
   
   if($test_logging == true) test("account_followup_status_details->datetime_updated",$account_followup_status_details->datetime_updated);
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   
   
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "0") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
  
    /// START: send first email (#1) /////////////////////////////////////////
    
    
    $email_subject = "Getting Started with $insert_email_from_name !";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    
    
    
    
    $email_message = '<b>Greetings!</b>

Thank you for downloading/installing, '. $insert_email_from_name .'.

<u>Taking credit and debit card payments has never been so easy!</u>

To begin, we just need you to <b>register and validate your email address.</b>

Simply open the '. $insert_email_from_name .' app on your mobile device and (in the text-box), type your preferred email address.

Then ---> "Click to Continue..."!

You will be prompted to check your inbox, (or SPAM folder) where you will find an email from '. $insert_email_from_name .' containing your Validation Link/Button. -- Click on that link/button!

And follow the 2-step instructions.

Once back in the app, you will be able to <b>configure & activate your '. $insert_email_from_name .' account via our quick, easy and free, activation process!</b>

It\'s really not as hard as it sounds! Go ahead and give it a shot!

If you have any questions, please do not hesitate to ask our courteous customer support staff.

Or, visit our FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>We look forward to helping you get paid!</b>

Sincerely, 

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>

';
    
    
    //if($test_logging == true) test("email_message",$email_message);
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '1'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
   
   
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "1") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 2nd email (#2) /////////////////////////////////////////
    
    $email_subject = "Register Your Account Now!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = '<b>Greetings!</b>

If you are anything like us, time is a precious commodity!

It is for this reason that we designed '. $insert_email_from_name .' to be the quickest and easiest (app-driven) payments solution available!

<u>No "Squares", no "Dongles", NO HASSLE!</u>

First, we just need you to <b>register and validate your email address.</b>

Simply open the '. $insert_email_from_name .' app on your mobile device and (in the text-box), type your preferred email address.

Then "Click to Continue..."!

You will be prompted to check your inbox, (or SPAM folder) where you will find an email from '. $insert_email_from_name .' containing your Validation Link/Button. -- Click on that link/button!

And follow the 2-step instructions.

Once back in the app, you will be able to <b>configure & activate your '. $insert_email_from_name .' account.</b>

This activation process is quick, easy and free!

For further information be sure to visit our FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

Or please do not hesitate to contact our courteous customer support staff with any questions you may have.

<b>We are here to help you!</b>

Sincerely, 

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '2'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "2") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#3) /////////////////////////////////////////
    
    $email_subject = "Get Paid Quickly, Easily and Safely!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    
    $email_message = '<b>Greetings!</b>

Did you know that '. $insert_email_from_name .' is ready and able to help you get paid - quickly, easily and safely?

Yes! It\'s true! <u>'. $insert_email_from_name .' is 100% safe, 100% secure, and 100% PCI/DSS compliant.</u>

However, we noticed that you haven\'t yet <b>registered and validated your email address.</b>

Simply open the '. $insert_email_from_name .' app on your mobile device and (in the text-box), type your preferred email address.

Then "Click to Continue..."!

You will be prompted to check your inbox, (or SPAM folder) where you will find an email from '. $insert_email_from_name .' containing your Validation Link/Button. -- Click on that link/button! And follow the 2-step instructions.

Once back in the app, you can <b>configure & activate your '. $insert_email_from_name .' account via our quick, easy and free, activation process!</b>

For further assistance, please contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Taking payments has never been so easy!</b>

Sincerely, 

'. $insert_email_from_name .' Support Staff
<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '3'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "3") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#4) /////////////////////////////////////////
    
    $email_subject = "Let Us Help You Grow Your Business!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    
    $email_message = '<b>Greetings!</b>

Did you know that '. $insert_email_from_name .' can help grow your business, by improving your daily cash flow?

To get paid, all you need to do is <u>enter your customer\'s name, telephone number and amount owed; and '. $insert_email_from_name .' will take care of the rest!</u>

What are you waiting for? <b>Register your account today!</b>

Simply open the '. $insert_email_from_name .' app on your mobile device and (in the text-box), type your preferred email address.

Then "Click to Continue..."!

You will be prompted to check your inbox, (or SPAM folder) where you will find an email from '. $insert_email_from_name .' containing your Validation Link/Button. -- Click on that link/button! And follow the 2-step instructions.

Once back in the app, you will be able to <b>configure & activate your '. $insert_email_from_name .' account.</b>

This activation process is quick, and free!

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>We know you will succeed with '. $insert_email_from_name .'!</b>

Sincerely,  

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
        SET followup_email_ID_last_sent = '4'
        ,datetime_updated = '". $updated_datetime ."' 
        WHERE 
        followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
        if($test_logging == true) test("tmp_sql",$tmp_sql);
        $update_results = updateTHECASHIER($tmp_sql);
        if($test_logging == true) test("update_results",$update_results);
        $updated_followup_email_ID_last_sent = true;
     
    
    
    /// END: send first email /////////////////////////////////////////
    
    
    
   }  

  }
     
 }
 
 
 
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### was: SUBMITTED BUT NOT ACTIVATE
 ### now: APPROVED BUT NOT CONFIGURED
 
 
 $account_part_1_completed = false;
 if($test_logging == true) test("account_configuration",$account_configuration);
 
 //$tmp_sql = "SELECT birthdate FROM members WHERE memberid = '". $tmp_account_details['creator_memberid'] ."';";
 //if($test_logging == true) test("tmp_sql",$tmp_sql);
 //$member_birthdate = getTHECASHIER($tmp_sql);
 //if($test_logging == true) test("member_birthdate",$member_birthdate);
 
 
 #if(
 # ($member_birthdate)
 # && ($member_birthdate != "0000-00-00")
 #) {
 # $account_activation_submitted = true;
 # if($test_logging == true) test("2_account_activation_submitted",$account_activation_submitted);
 #}
 #
 
 
 if(
    ($tmp_account_details['years_in_business'])
 ) {
    $account_part_1_completed = true;
    if($test_logging == true) test("account_part_1_completed",$account_part_1_completed);
 } 
 
 
 //exit;
 if($test_logging == true) test("registered_member_verified_emailaddress",$registered_member_verified_emailaddress);
 if($test_logging == true) test("7_account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 8)
 ) {
  
 

  
  
  if($test_logging == true) test("3_account_activation_submitted",$account_activation_submitted);
  if($account_part_1_completed == false) {
  
   if($test_logging == true) test("account_activation_submitted",$account_activation_submitted);
   //exit;
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
  
   if($test_logging == true) test("updated_followup_email_ID_last_sent",$updated_followup_email_ID_last_sent);
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "4") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
  
    /// START: send first email (#5) /////////////////////////////////////////
    
    $email_subject = "Taking the Next Steps with $insert_email_from_name !";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    
    $email_message = '<b>Greetings!</b>

Are you ready to take the next steps with '. $insert_email_from_name .'?

We can see that you have registered and validated your email address. -- That\'s fantastic! But why stop there?

Now, it\'s time to <u>configure & activate your '. $insert_email_from_name .' account via our quick, easy and free, activation process!</u>

Simply open the '. $insert_email_from_name .' app on your mobile device and <b>"Select Your Account" to <i>Configure & Activate.</i></b>

You will then be instructed to provide basic (but important) information, about yourself and your business.

Once your account is activated, you will be able to <b>start accepting credit (or debit) card payments from anyone; any-time, anywhere!</b>

Please let us know if you have any questions; we are happy to assist!

Or, you may also visit our FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Get paid with '. $insert_email_from_name .' and live the life you\'ve always wanted!</b>

Sincerely, 

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '5'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "5") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    /// START: send 2nd email (#6) /////////////////////////////////////////
    
    $email_subject = "Activate Your Account Today!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    
    $email_message = '<b>Greetings!</b>

If you are anything like us, ease of use is essential!

It is for this reason that we designed '. $insert_email_from_name .' to be <u>the quickest and easiest (app-driven) payments solution available!</u>

To configure & activate your '. $insert_email_from_name .' account via our quick, easy and free, activation process, simply open the '. $insert_email_from_name .' app (on your mobile device) and <b>"Select Your

Account" to <i>Configure & Activate.</i></b>

You will then be instructed to provide basic (but important) information, about yourself and your business.

Go ahead... Do it now! Configure and Activate your account!

With '. $insert_email_from_name .' you can <b><i>watch your customer pay you in real-time!</i> No "Squares", no "Dongles", NO HASSLE!</b>

For further information be sure to visit our FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

Or please do not hesitate to contact our courteous customer support staff with any questions you may have.

<b>Be your own boss with '. $insert_email_from_name .'</b>

Sincerely, 


'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '6'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "6") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 3rd email (#7) /////////////////////////////////////////
    
    $email_subject = "Safe and Secure Payments!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = '<b>Greetings!</b>
    
We noticed you haven\'t Activated your '. $insert_email_from_name .' account yet!

Would you like to do it now?

Simply open the '. $insert_email_from_name .' app on your mobile device and <b>"Select Your Account" to <i>Configure & Activate.</i></b>

You will then be instructed to provide basic (but important) information, about yourself and your business.

Once your Account Configuration is complete you can click: "Confirm and ACTIVATE"!

<u>It\'s super easy!</u>

And in case you were wondering... <b>'. $insert_email_from_name .' is 100% safe, 100% secure, and

100% PCI/DSS-compliant.</b>

All Account Information is held with the utmost security, privacy and respect.

If you have any questions, please let us know. We are happy to assist!

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Grow your business with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '7'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "7") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    /// START: send 4th email (#8) /////////////////////////////////////////
    
    $email_subject = "Improve Your Daily Cash Flow!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = '<b>Greetings!</b>

Did you know that to get paid using PAYYAP, all you need to do is enter your customer\'s name, telephone number and amount owed; and '. $insert_email_from_name .' will take care of the rest?!

Yes, it\'s really that awesome!

But first we need you to configure & activate your '. $insert_email_from_name .' account. 

<u>It\'s super easy, quick and free!</u>

Simply open the '. $insert_email_from_name .' app on your mobile device and <b>"Select Your Account" to <i>Configure & Activate.</i></b>

You will then be instructed to provide basic (but important) information, about yourself and your business.

What are you waiting for?

Activate your account today, and <b>let '. $insert_email_from_name .' help you grow your business by improving your daily cash flow!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Thank you for your continued interest in '. $insert_email_from_name .'.</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
   
     
     
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '8'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }
  



 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### CONFIGURED BUT NO SS#
 
 /*
  
 $active_account_tranactions = false;
 $tmp_sql = "SELECT transactionid FROM transactions 
    WHERE accountid = '". $tmp_account_details['accountid'] ."'
    AND accountid != ''
    AND accountid != '0'
    AND accountid IS NOT NULL
    AND description = 'INCOMING' 
    AND status = 'APPROVED'
    ;";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $active_account_tranactions = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("active_account_tranactions",$active_account_tranactions);
 
 
 if($test_logging == true) test("registered_member_verified_emailaddress",$registered_member_verified_emailaddress); 
 if($test_logging == true) test("account_activation_submitted",$account_activation_submitted);
 if($test_logging == true) test("11_account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
 
 $tmp_sql = "SELECT firstname FROM members WHERE memberid = '".  $tmp_account_details['creator_memberid'] ."';";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $FirstName = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("FirstName",$FirstName);
 */
 
 
 
 
 $FirstName = $tmp_member_details['firstname'];
 
 
 if($FirstName) {
  $greetings_string = "<b>Dear ". $FirstName .",</b>";
 } else {
  $greetings_string = "<b>Greetings!</b>";
 }
 
 
 
 
 $account_part_2_completed = false;
 if($tmp_member_details['social_security_number']) {
  $account_part_2_completed = true;
 }
 
 
 

 
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_part_1_completed)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 12)
 ) {
  
 
  
  /// check if any transactions yet ?:
  
 
  
  
  if($account_part_2_completed == false) {
  
    
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "8") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
  
    /// START: send first email (#9) /////////////////////////////////////////
    
    $email_subject = "You are well on your way!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

Congratulations! You are well on your way!

<i>We can see that you have Configured Your Profile, but have not yet finished providing all of the information required for your '. $insert_email_from_name .' Account to be Activated.</i>

Do you want to finish now? It\'s quick and easy!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 2/4 ("Personal Identity").</b>

Fill-in the required fields, associated with your "Personal Identity"...

Please note: Your Personal Social Security Number is required <u>only for the purpose of Identity Validation.</u>

When you are finished, simply click the green button that says: <i>SAVE and Continue...</i>

You will then be presented with STEP 3/4 ("Business Identity").

Again, fill-in the required fields; this time, associated with your "Business Identity"...

And when you are finished, click the green button that says: <i>SAVE and Continue...</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just moments away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Achieve the success you deserve!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '9'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "9") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 2nd email (#10) /////////////////////////////////////////
    
    $email_subject = "Don't panic! It is actually kind of fun!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

Do you need a little help?

<i>We can see that you have Configured Your Profile, but have not yet finished providing all of the information required for your '. $insert_email_from_name .' Account to be Activated.</i>

Don\'t panic! It is actually kind of fun! :)

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 2/4 ("Personal Identity").</b>

Fill-in the required fields, associated with your "Personal Identity"...

Please note: Your Personal Social Security Number is required <u>only for the purpose of Identity Validation.</u>

Also please keep in mind that '. $insert_email_from_name .' is a:

&nbsp;&nbsp;&bull;&nbsp; 100% secure, 

&nbsp;&nbsp;&bull;&nbsp; PCI Compliant,

&nbsp;&nbsp;&bull;&nbsp; Security-Metrics Validated,

&nbsp;&nbsp;&bull;&nbsp; Payments Service Provider. 

<b>All Account Information is held with the utmost security, privacy and respect.</b>

When you are finished, simply click the green button that says: <i>SAVE and Continue...</i>

You will then be presented with STEP 3/4 ("Business Identity").

Again, fill-in the required fields, this time, associated with your "Business Identity"...

And when you are finished, click the green button that says: <i>SAVE and Continue...</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just moments away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Make your dreams a reality with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '10'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "10") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#11) /////////////////////////////////////////
    
    $email_subject = "You can do it!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
We understand that providing personal information (especially as it relates to your identity), can be a little intimidating!

Rest assured, '. $insert_email_from_name .' securely holds your personal information with the utmost privacy and respect.

<i>We invite you to continue with your Account Configuration process...</i>

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 2/4 ("Personal Identity").</b>

Fill-in the required fields, associated with your "Personal Identity"...

When you are finished, simply click the green button that says: <i>SAVE and Continue...</i>

You will then be presented with STEP 3/4 ("Business Identity").

Again, fill-in the required fields, this time, associated with your "Business Identity"...

And when you are finished, click the green button that says: <i>SAVE and Continue...</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just moments away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Do what you love and get paid for it, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '11'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "11") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#12) /////////////////////////////////////////
    
    $email_subject = "We are here to help you";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
How are you coming along with your '. $insert_email_from_name .' Account Configuration?

<i>We can see that you have Configured Your Profile, but have not yet finished providing all of the information required for your '. $insert_email_from_name .' Account to be Activated.</i>

It\'s actually not as hard as you might imagine...

Go ahead and try it now!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 2/4 ("Personal Identity").</b>

Fill-in the required fields, associated with your "Personal Identity"...

Please note: Your Personal Social Security Number is required <u>only for the purpose of Identity Validation.</u>

Also please keep in mind that '. $insert_email_from_name .' is a:

&nbsp;&nbsp;&bull;&nbsp; 100% secure, 

&nbsp;&nbsp;&bull;&nbsp; PCI Compliant,

&nbsp;&nbsp;&bull;&nbsp; Security-Metrics Validated,

&nbsp;&nbsp;&bull;&nbsp; Payments Service Provider. 

<b>All Account Information is held with the utmost security, privacy and respect.</b>

When you are finished, simply click the green button that says: <i>SAVE and Continue...</i>

You will then be presented with STEP 3/4 ("Business Identity").

Again, fill-in the required fields, this time, associated with your "Business Identity"...

And when you are finished, click the green button that says: <i>SAVE and Continue...</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just moments away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>We know you will have great success with '. $insert_email_from_name .'.</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>   
    
    ';
    
    
    
    /// END: send first email /////////////////////////////////////////
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '12'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }



 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### SS# BUT NO TAX ID
 
 /*
  
 $active_account_tranactions = false;
 $tmp_sql = "SELECT transactionid FROM transactions 
    WHERE accountid = '". $tmp_account_details['accountid'] ."'
    AND accountid != ''
    AND accountid != '0'
    AND accountid IS NOT NULL
    AND description = 'INCOMING' 
    AND status = 'APPROVED'
    ;";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $active_account_tranactions = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("active_account_tranactions",$active_account_tranactions);
 
 
 if($test_logging == true) test("registered_member_verified_emailaddress",$registered_member_verified_emailaddress); 
 if($test_logging == true) test("account_activation_submitted",$account_activation_submitted);
 if($test_logging == true) test("11_account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
 
 $tmp_sql = "SELECT firstname FROM members WHERE memberid = '".  $tmp_account_details['creator_memberid'] ."';";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $FirstName = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("FirstName",$FirstName);
 */
 

 
 
 $account_part_3_completed = false;
 if($tmp_account_details['tax_id']) {
  $account_part_3_completed = true;
 }
 
 
 

 
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_part_1_completed)
  && ($account_part_2_completed)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 16)
 ) {
  
 
  
  /// check if any transactions yet ?:
  
 
  
  
  if($account_part_3_completed == false) {
  
  
   /// send up to 4 emails...
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "12") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
  
    /// START: send first email (#13) /////////////////////////////////////////
    
    $email_subject = "Be your own boss!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

You are doing great!

<b>We can see that you are at the stage in the Account Configuration process where you are being asked to provide your Business Tax ID; also known as an EIN.</b>

If you are like many other '. $insert_email_from_name .' users, a Business Tax (EIN) ID is not something you have!

Not to worry!  Getting your EIN is super easy!

<i>In fact, we have created a visual STEP-BY-STEP Instructional PDF (using actual screenshots) showing the Online EIN Application process; from start to finish.</i>

Simply click this link: <a href="http://library.payyap.network/How to get your EIN in 5 minutes or less!.pdf" target="_PAYYAP_EIN_INSTRUCTIONS"><b>How to get your EIN in 5 minutes or less!.pdf</b></a>

And follow the simple instructions. 

Alternatively, you can (of course) apply for your EIN yourself by clicking <a href="https://www.irs.gov/businesses/small-businesses-self-employed/apply-for-an-employer-identification-number-ein-online" target="_EIN_APPLICATION">HERE</a>.

<u>Whether you choose to use our PDF guide, or choose to do it on your own, the online application process is the same -- it is very straight forward, and easy for anyone to complete.</u>

<b>The application process literally takes 5 minutes or less, and you are issued an EIN immediately!</b>

IMPORTANT NOTE: Once you have your EIN, be sure to DOWNLOAD and SAVE your EIN Confirmation Letter.

<b>With your saved (or printed) EIN Confirmation Letter you will be able to complete your '. $insert_email_from_name .' Account Configuration and Activation!</b>

Please note the EIN Online Application can only be processed during Hours of Operation: Monday - Friday 7 a.m. to 10 p.m. Eastern Time.

For additional information, regarding the Business Tax (EIN) ID, <A HREF="https://support.payyap.network/FAQ_EIN.nsdb" TARGET="_PAYYAP_EIN_FAQ">please visit our EIN FAQ</A>.

As always, if you have any further questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the General FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Be your own boss with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
<hr>

    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '13'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "13") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 2nd email (#14) /////////////////////////////////////////
    
    $email_subject = "Make your dreams come true!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

How are you coming along with your '. $insert_email_from_name .' Account Configuration?

<b>Are you still unsure about this whole EIN business?</b>

Let\'s see if we can clear up some questions for you...

An EIN is your "Employer Identification Number" <a href="https://www.irsvideos.gov/SmallBusinessTaxpayer/virtualworkshop/Lesson1?seg=976" target="_IRS_EIN_VIDEO">[EIN Video]</a>

Even if you have no plans to hire anyone, the EIN is simply a tax ID that the IRS issues to every business.

Further, our banking partner requires an EIN from every '. $insert_email_from_name .' Account Holder in order to process credit card and debit card payments.

<b>So... would you like to get your EIN right now? -- Let\'s do it!</b> 

Simply click this link: <a href="http://library.payyap.network/How to get your EIN in 5 minutes or less!.pdf" target="_PAYYAP_EIN_INSTRUCTIONS"><b>How to get your EIN in 5 minutes or less!.pdf</b></a>

And follow our STEP-BY-STEP Instructional Guide (using actual screenshots from the Online EIN Application process).

<b>The application process literally takes 5 minutes or less, and you are issued an EIN immediately!</b>

You can alternatively (of course) apply for your EIN yourself by clicking <a href="https://www.irs.gov/businesses/small-businesses-self-employed/apply-for-an-employer-identification-number-ein-online" target="_EIN_APPLICATION">HERE</a>.

<u>Whether you choose to use our PDF guide, or choose to do it on your own, the online application process is the same -- <i>it is very straight forward, and easy for anyone to complete.</i></u>

IMPORTANT NOTE: Once you have your EIN, be sure to DOWNLOAD and SAVE your EIN Confirmation Letter.

<b>With your saved (or printed) EIN Confirmation Letter you will be able to complete your '. $insert_email_from_name .' Account Configuration and Activation!</b>

Please note the EIN Online Application can only be processed during Hours of Operation: Monday - Friday 7 a.m. to 10 p.m. Eastern Time.

For additional information, regarding the Business Tax (EIN) ID, <A HREF="https://support.payyap.network/FAQ_EIN.nsdb" TARGET="_PAYYAP_EIN_FAQ">please visit our EIN FAQ</A>.

As always, if you have any further questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the General FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Create your dream job and get paid with '. $insert_email_from_name .'!</b>

Sincerely,


'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '14'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "14") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#15) /////////////////////////////////////////
    
    $email_subject = "Why stop now?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
Your Activated and LIVE '. $insert_email_from_name .' Account is just moments away!

<b>We can see that you are at the stage in the Account Configuration process where you are being asked to provide your Business Tax ID; also known as an EIN.</b>

Why Stop now?  Getting your EIN is super easy!

<i>In fact, we have created a visual STEP-BY-STEP Instructional PDF (using actual screenshots) showing the Online EIN Application process; from start to finish.</i>

Simply click this link: <a href="http://library.payyap.network/How to get your EIN in 5 minutes or less!.pdf" target="_PAYYAP_EIN_INSTRUCTIONS"><b>How to get your EIN in 5 minutes or less!.pdf</b></a>

And follow the simple instructions. 

Alternatively, you can (of course) apply for your EIN yourself by clicking <a href="https://www.irs.gov/businesses/small-businesses-self-employed/apply-for-an-employer-identification-number-ein-online" target="_EIN_APPLICATION">HERE</a>.

<u>Whether you choose to use our PDF guide, or choose to do it on your own, the online application process is the same -- it is very straight forward, and easy for anyone to complete.</u>

<b>The application process literally takes 5 minutes or less, and you are issued an EIN immediately!</b>

IMPORTANT NOTE: Once you have your EIN, be sure to DOWNLOAD and SAVE your EIN Confirmation Letter.

<b>With your saved (or printed) EIN Confirmation Letter you will be able to complete your '. $insert_email_from_name .' Account Configuration and Activation!</b>

Please note the EIN Online Application can only be processed during Hours of Operation: Monday - Friday 7 a.m. to 10 p.m. Eastern Time.

For additional information, regarding the Business Tax (EIN) ID, <A HREF="https://support.payyap.network/FAQ_EIN.nsdb" TARGET="_PAYYAP_EIN_FAQ">please visit our EIN FAQ</A>.

As always, if you have any further questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the General FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>We know you are going to have great success with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '15'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "15") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#16) /////////////////////////////////////////
    
    $email_subject = "Are you stuck?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
How are you coming along with your '. $insert_email_from_name .' Account Configuration?

<b>We have a feeling you might be stuck at the part where you are being asked to provide your Business Tax ID; also known as an EIN.</b>

If you are like many other '. $insert_email_from_name .' users, a Business Tax (EIN) ID is not something you have, nor are familiar with!

Let\'s see if we can clear up some questions for you...

An EIN is your "Employer Identification Number" <a href="https://www.irsvideos.gov/SmallBusinessTaxpayer/virtualworkshop/Lesson1?seg=976" target="_IRS_EIN_VIDEO">[EIN Video]</a>

Even if you have no plans to hire anyone, the EIN is simply a tax ID that the IRS issues to every business.

Further, our banking partner requires an EIN from every '. $insert_email_from_name .' Account Holder in order to process credit card and debit card payments.

<b>So... let\'s get "unstuck" and get your EIN right now? -- Ready?</b> 

Simply click this link: <a href="http://library.payyap.network/How to get your EIN in 5 minutes or less!.pdf" target="_PAYYAP_EIN_INSTRUCTIONS"><b>How to get your EIN in 5 minutes or less!.pdf</b></a>

And follow our STEP-BY-STEP Instructional Guide (using actual screenshots from the Online EIN Application process).

<b>The application process literally takes 5 minutes or less, and you are issued an EIN immediately!</b>

You can alternatively (of course) apply for your EIN yourself by clicking <a href="https://www.irs.gov/businesses/small-businesses-self-employed/apply-for-an-employer-identification-number-ein-online" target="_EIN_APPLICATION">HERE</a>.

<u>Whether you choose to use our PDF guide, or choose to do it on your own, the online application process is the same -- <i>it is very straight forward, and easy for anyone to complete.</i></u>

IMPORTANT NOTE: Once you have your EIN, be sure to DOWNLOAD and SAVE your EIN Confirmation Letter.

<b>With your saved (or printed) EIN Confirmation Letter you will be able to complete your '. $insert_email_from_name .' Account Configuration and Activation!</b>

Please note the EIN Online Application can only be processed during Hours of Operation: Monday - Friday 7 a.m. to 10 p.m. Eastern Time.

For additional information, regarding the Business Tax (EIN) ID, <A HREF="https://support.payyap.network/FAQ_EIN.nsdb" TARGET="_PAYYAP_EIN_FAQ">please visit our EIN FAQ</A>.

As always, if you have any further questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the General FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>We look forward to helping you get paid!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>   
    
    ';
    
    
    
    /// END: send first email /////////////////////////////////////////
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '16'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }







 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### TAX ID BUT... 
 ### NO PERSONAL ID 
 
 
 /*
  
 $active_account_tranactions = false;
 $tmp_sql = "SELECT transactionid FROM transactions 
    WHERE accountid = '". $tmp_account_details['accountid'] ."'
    AND accountid != ''
    AND accountid != '0'
    AND accountid IS NOT NULL
    AND description = 'INCOMING' 
    AND status = 'APPROVED'
    ;";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $active_account_tranactions = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("active_account_tranactions",$active_account_tranactions);
 
 
 if($test_logging == true) test("registered_member_verified_emailaddress",$registered_member_verified_emailaddress); 
 if($test_logging == true) test("account_activation_submitted",$account_activation_submitted);
 if($test_logging == true) test("11_account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
 
 $tmp_sql = "SELECT firstname FROM members WHERE memberid = '".  $tmp_account_details['creator_memberid'] ."';";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $FirstName = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("FirstName",$FirstName);
 */
 
$personal_ids_details = "";
$personal_ids_details = get_ids_personal($memberid='',$accountid='',$account_hash="",$member_hash=$tmp_member_details['hash']);
 

/// show we need both emails
$account_part_4_completed = false;
if(
($tmp_member_details['current']['identity']['document_description'])
	&& ($personal_ids_details['current']['identity']['photo_id_filename'])
	&& (!stristr($personal_ids_details['current']['identity']['status'],"CLEARED"))
) {
	$account_part_4_completed = true;
}
 
 
 

 
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_part_1_completed)
  && ($account_part_2_completed)
  && ($account_part_3_completed)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 20)
 ) {
  
  /// check if any transactions yet ?
  
  if($account_part_4_completed == false) {
  
    
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "16") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
  
    /// START: send first email (#17) /////////////////////////////////////////
    
    $email_subject = "You are one click away!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

Well done!

You are doing a great job providing the information needed for your '. $insert_email_from_name .' Account to be activated!

<i>We can see that you are in the final step -- but have not yet uploaded your "Proof of Personal Identity".</i>

Do you want to do it now? It\'s quick and easy!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Underneath the heading: <i>"Personal Identity Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 3 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Driver\'s License of Business Owner</b>

&nbsp;&nbsp;2. <b>Passport of Business Owner</b>

&nbsp;&nbsp;3. <b>Government-Issued Photo ID of Business Owner</b>

Then use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Identity <u>OR</u> upload a file/scan/or photo (of your Proof of Identity) already "in" your mobile device gallery/storage.

Once the upload is complete, scroll down to the second heading: <i>"Business Identity Upload (from photo, scan or file)"</i>

Click on that second "pull-down-menu" and from the 2 options, select the one that suits you best. 

Again, use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

You\'re nearly finished!

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Do what you love and get paid for it, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '17'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "17") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 2nd email (#18) /////////////////////////////////////////
    
    $email_subject = "The hard part is over!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

You are doing great!

<i>We can see that you are in the final step -- but have not yet uploaded your "Proof of Personal Identity".</i>

Don\'t worry! The hard part is over!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Underneath the heading: <i>"Personal Identity Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 3 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Driver\'s License of Business Owner</b>

&nbsp;&nbsp;2. <b>Passport of Business Owner</b>

&nbsp;&nbsp;3. <b>Government-Issued Photo ID of Business Owner</b>

Then use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Identity <u>OR</u> upload a file/scan/or photo (of your Proof of Identity) already "in" your mobile device gallery/storage.

Once the upload is complete, scroll down to the second heading: <i>"Business Identity Upload (from photo, scan or file)"</i>

Click on that second "pull-down-menu" and from the 2 options, select the one that suits you best. 

Again, use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just a couple clicks away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Achieve financial independence with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '18'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "18") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#19) /////////////////////////////////////////
    
    $email_subject = "Do you need a little help?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
How are you coming along with your '. $insert_email_from_name .' Account Configuration?

<b>We can see that you are in the final step -- but have not yet uploaded your "Proof of Personal Identity"..</b>

It\'s actually not as hard as you might imagine...

We\'re here to help you!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Underneath the heading: <i>"Personal Identity Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 3 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Driver\'s License of Business Owner</b>

&nbsp;&nbsp;2. <b>Passport of Business Owner</b>

&nbsp;&nbsp;3. <b>Government-Issued Photo ID of Business Owner</b>

Then use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Identity <u>OR</u> upload a file/scan/or photo (of your Proof of Identity) already "in" your mobile device gallery/storage.

Once the upload is complete, scroll down to the second heading: <i>"Business Identity Upload (from photo, scan or file)"</i>

Click on that second "pull-down-menu" and from the 2 options, select the one that suits you best. 

Again, use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<b>You are so close to having an activated and LIVE '. $insert_email_from_name .' Account!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Make your dreams come true with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '19'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "19") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#20) /////////////////////////////////////////
    
    $email_subject = "You can do it!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
We understand that providing information (especially as it relates to your identity), can be a little intimidating!

Rest assured '. $insert_email_from_name .' is a one-hundred-percent secure, PCI Compliant and Security-Metrics Validated, Payments Service Provider.  And all Account Information is held with the utmost security, privacy and respect. 

<i>We invite you to go ahead and finish your Account Configuration! We know you can do it!</i>

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Underneath the heading: <i>"Personal Identity Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 3 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Driver\'s License of Business Owner</b>

&nbsp;&nbsp;2. <b>Passport of Business Owner</b>

&nbsp;&nbsp;3. <b>Government-Issued Photo ID of Business Owner</b>

Then use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Identity <u>OR</u> upload a file/scan/or photo (of your Proof of Identity) already "in" your mobile device gallery/storage.

Once the upload is complete, scroll down to the second heading: <i>"Business Identity Upload (from photo, scan or file)"</i>

Click on that second "pull-down-menu" and from the 2 options, select the one that suits you best. 

Again, use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just a couple of clicks away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>We know you will have great success with '. $insert_email_from_name .'.</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>   
    
    ';
    
    
    
    /// END: send first email /////////////////////////////////////////
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '20'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }





 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### PERSONAL ID, BUT STILL NO BUSINESS ID
 
 
 /*
  
 $active_account_tranactions = false;
 $tmp_sql = "SELECT transactionid FROM transactions 
    WHERE accountid = '". $tmp_account_details['accountid'] ."'
    AND accountid != ''
    AND accountid != '0'
    AND accountid IS NOT NULL
    AND description = 'INCOMING' 
    AND status = 'APPROVED'
    ;";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $active_account_tranactions = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("active_account_tranactions",$active_account_tranactions);
 
 
 if($test_logging == true) test("registered_member_verified_emailaddress",$registered_member_verified_emailaddress); 
 if($test_logging == true) test("account_activation_submitted",$account_activation_submitted);
 if($test_logging == true) test("11_account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
 
 $tmp_sql = "SELECT firstname FROM members WHERE memberid = '".  $tmp_account_details['creator_memberid'] ."';";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $FirstName = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("FirstName",$FirstName);
 */
  
 
 
$business_ids_details = "";
$business_ids_details = get_ids_business($memberid='',$accountid='',$account_hash=$tmp_account_details['hash']);
 
 
/// show we need both emails
$account_part_5_completed = false;
if(
($account_part_4_completed == true)
&& ($business_ids_details['current']['identity']['document_description'])
&& ($business_ids_details['current']['identity']['business_certificate_filename'])
&& (!stristr($business_ids_details['current']['identity']['status'],"CLEARED"))
) {
	$account_part_5_completed = true;
}
 
 
 

 
 
 

 
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_part_1_completed)
  && ($account_part_2_completed)
  && ($account_part_3_completed)
  && ($account_part_4_completed)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 24)
 ) {
  
 
  
  /// check if any transactions yet ?:
  
 
  
  
  if($account_part_5_completed == false) {
  
    
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "20") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
  
    /// START: send first email (#21) /////////////////////////////////////////
    
    $email_subject = "Make your dreams a reality!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

Well done!

You are doing a great job providing the information needed for your '. $insert_email_from_name .' Account to be activated!

<i>We can see that you are in the final step -- but have not yet uploaded your "Proof of Business Identity".</i>

Do you want to do it now? It\'s quick and easy!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Be sure that you have successfully uploaded your Proof of Personal Identity, and then scroll down to the second heading: <i>"Business Identity Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 3 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Federal EIN (TAX ID) Registration Receipt</b>

&nbsp;&nbsp;2. <b>State-Issued Sole Proprietor / DBA Certificate</b>

&nbsp;&nbsp;3. <b>State-Issued Incorporation Certificate</b>

Again, (just as you did with your Personal Identity Upload) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Business Identity <u>OR</u> upload a file/scan/or photo (of your Proof of Business Identity) already "in" your mobile device gallery/storage.

Once both uploads are complete, you can scroll down to the third and final upload; "Proof of Banking"</i>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Make your dreams a reality with '. $insert_email_from_name .'.</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '21'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "21") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 2nd email (#22) /////////////////////////////////////////
    
    $email_subject = "Succeed with $insert_email_from_name!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

You are doing great!

<i>We can see that you are in the final step -- but have not yet uploaded your "Proof of Business Identity".</i>

Don\'t worry! The hard part is over!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Be sure that you have successfully uploaded your Proof of Personal Identity, and then scroll down to the second heading: <i>"Business Identity Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 3 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Federal EIN (TAX ID) Registration Receipt</b>

&nbsp;&nbsp;2. <b>State-Issued Sole Proprietor / DBA Certificate</b>

&nbsp;&nbsp;3. <b>State-Issued Incorporation Certificate</b>

Again, (just as you did with your Personal Identity Upload) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Business Identity <u>OR</u> upload a file/scan/or photo (of your Proof of Business Identity) already "in" your mobile device gallery/storage.

Once both uploads are complete, you can scroll down to the third and final upload; "Proof of Banking"</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just moments away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Your success is our number one motivation!</b>

Sincerely,


'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '22'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "22") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#23) /////////////////////////////////////////
    
    $email_subject = "Need a little help?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
How are you coming along with your '. $insert_email_from_name .' Account Configuration?

<b>We can see that you are in the final step -- but have not yet uploaded your "Proof of Business Identity".</b>

It\'s actually not as hard as you might imagine...

We\'re here to help you!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Be sure that you have successfully uploaded your Proof of Personal Identity, and then scroll down to the second heading: <i>"Business Identity Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 3 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Federal EIN (TAX ID) Registration Receipt</b>

&nbsp;&nbsp;2. <b>State-Issued Sole Proprietor / DBA Certificate</b>

&nbsp;&nbsp;3. <b>State-Issued Incorporation Certificate</b>

Again, (just as you did with your Personal Identity Upload) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Business Identity <u>OR</u> upload a file/scan/or photo (of your Proof of Business Identity) already "in" your mobile device gallery/storage.

Once both uploads are complete, you can scroll down to the third and final upload; "Proof of Banking"</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just moments away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>You can do it!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '23'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "23") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#24) ////////////////////////////////////////
    
    $email_subject = "Activate your $insert_email_from_name Account now!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
We understand that providing information (especially as it relates to your identity), can be a little intimidating!

Rest assured '. $insert_email_from_name .' is a one-hundred-percent secure, PCI Compliant and Security-Metrics Validated, Payments Service Provider. And all Account Information is held with the utmost security, privacy and respect. 

<i>We invite you to go ahead and finish your Account Configuration! We know you can do it!</i>

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Be sure that you have successfully uploaded your Proof of Personal Identity, and then scroll down to the second heading: <i>"Business Identity Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 3 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Federal EIN (TAX ID) Registration Receipt</b>

&nbsp;&nbsp;2. <b>State-Issued Sole Proprietor / DBA Certificate</b>

&nbsp;&nbsp;3. <b>State-Issued Incorporation Certificate</b>

Again, (just as you did with your Personal Identity Upload) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Business Identity <u>OR</u> upload a file/scan/or photo (of your Proof of Business Identity) already "in" your mobile device gallery/storage.

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>We looking forward to helping you get paid!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>   
    
    ';
    
    
    
    /// END: send first email /////////////////////////////////////////
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '24'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }










 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### BUSINESS ID; BUT NO PROOF OF PRICING
 
 
 /*
  
 $active_account_tranactions = false;
 $tmp_sql = "SELECT transactionid FROM transactions 
    WHERE accountid = '". $tmp_account_details['accountid'] ."'
    AND accountid != ''
    AND accountid != '0'
    AND accountid IS NOT NULL
    AND description = 'INCOMING' 
    AND status = 'APPROVED'
    ;";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $active_account_tranactions = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("active_account_tranactions",$active_account_tranactions);
 
 
 if($test_logging == true) test("registered_member_verified_emailaddress",$registered_member_verified_emailaddress); 
 if($test_logging == true) test("account_activation_submitted",$account_activation_submitted);
 if($test_logging == true) test("11_account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
 
 $tmp_sql = "SELECT firstname FROM members WHERE memberid = '".  $tmp_account_details['creator_memberid'] ."';";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $FirstName = getTHECASHIER($tmp_sql);
 if($test_logging == true) test("FirstName",$FirstName);
 */
  
 

$account_part_6_completed = false;
if(
($account_part_5_completed == true)
&& ($business_ids_details['current']['pricing']['proof_of_pricing_description'])
&& ($business_ids_details['current']['pricing']['proof_of_pricing_filename'])
&& (!stristr($business_ids_details['current']['pricing']['status'],"CLEARED"))
) {
	$account_part_6_completed = true;
}
 
 

 
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_part_1_completed)
  && ($account_part_2_completed)
  && ($account_part_3_completed)
  && ($account_part_4_completed)
  && ($account_part_5_completed)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 28)
 ) {
  
 
  
  /// check if any transactions yet ?:
  
 
  
  
  if($account_part_6_completed == false) {
  
    
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "24") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
  
    /// START: send first email (#25) /////////////////////////////////////////
    
    $email_subject = "You're almost there!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

We can see that you are in the final step of your '. $insert_email_from_name .' Account Configuration process -- but still need to upload your "Proof of Banking".

Let\'s do it now!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Be sure that you have successfully uploaded your Proof of Personal Identity, your Proof of Business Identity, and then scroll down to the third (and final) heading: <i>"Proof of Banking Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 2 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Business Bank Account Invoice / Statement</b>

&nbsp;&nbsp;2. <b>Business Bank Account Voided Check</b>

Again, (just as you did with the previous ID Uploads) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Banking <u>OR</u> upload a file/scan/or photo (of your Proof of Banking) already "in" your mobile device gallery/storage.

Once all three uploads are complete, you can click <i>SAVE and Confirm to ACTIVATE</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just one click away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Create the business you always wanted, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '25'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "25") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 2nd email (#26) /////////////////////////////////////////
    
    $email_subject = "Do you need help?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

We can see that you are in the final step of your '. $insert_email_from_name .' Account Configuration process -- but still need to upload your "Proof of Banking".

<b>Do you need help?</b>  

An important component of starting (or growing) a business is legitimizing it with a business bank account!

The good news is, you already should have gotten your EIN (tax ID number), and taking the next steps to opening a business bank account is really easy!  <i>We found this article <a href="http://www.inc.com/aj-agrawal/how-to-open-a-business-bank-account-for-your-startup.html" target="PAYYAP_HOW_TO_OPEN_A_BUSINESS_BANK_ACCOUNT">How To Open A Business Bank Account For Your Startup</a> -- Hopefully you will find it useful and helpful...</i>

<b>In any event, with just a little bit of time and effort, you can get a bank account for your business!</b>

Not only will your business benefit from this effort, but you will then be able to Upload the final "Proof of Banking" to your '. $insert_email_from_name .' Account!

<b>Once you have your Proof of Banking...</b>

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Be sure that you have successfully uploaded your Proof of Personal Identity, your Proof of Business Identity, and then scroll down to the third (and final) heading: <i>"Proof of Banking Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 2 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Business Bank Account Invoice / Statement</b>

&nbsp;&nbsp;2. <b>Business Bank Account Voided Check</b>

Again, (just as you did with the previous ID Uploads) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo" or 

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Banking <u>OR</u> upload a file/scan/or photo (of your Proof of Banking) already "in" your mobile device gallery/storage.

Once all three uploads are complete, you can click <i>SAVE and Confirm to ACTIVATE</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just one click away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Add value to your skills, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '26'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "26") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#27) /////////////////////////////////////////
    
    $email_subject = "Are you stuck?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
An important component of starting (or growing) a business is legitimizing it with a business bank account!

The good news is, opening a business bank account is really easy!

And chances are, you already have all the paperwork needed… 

Not only will your business benefit from this effort, but you will then be able to Upload the final "Proof of Banking" to your '. $insert_email_from_name .' Account!

<i>We found this article <a href="www.inc.com/aj-agrawal/how-to-open-a-business-bank-account-for-your-startup.html" target="PAYYAP_HOW_TO_OPEN_A_BUSINESS_BANK_ACCOUNT">How To Open A Business Bank Account For Your Startup</a> -- Hopefully you will find it useful and helpful...</i>

<b>Once you have your Proof of Banking...</b>

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP 4/4 ("Proof of Identity").</b>

Be sure that you have successfully uploaded your Proof of Personal Identity, your Proof of Business Identity, and then scroll down to the third (and final) heading: <i>"Proof of Banking Upload (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 2 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Business Bank Account Invoice / Statement</b>

&nbsp;&nbsp;2. <b>Business Bank Account Voided Check</b>

Again, (just as you did with the previous ID Uploads) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull; "Take a Photo" or 

&nbsp;&nbsp;&bull; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Banking <u>OR</u> upload a file/scan/or photo (of your Proof of Banking) already "in" your mobile device gallery/storage.

Once all three uploads are complete, you can click <i>SAVE and Confirm to ACTIVATE</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just one click away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Get unstuck, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '27'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "27") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#28) /////////////////////////////////////////
    
    $email_subject = "You've come so far...!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
You\'ve come so far with your '. $insert_email_from_name .' Account Configuration, please don\'t stop now!

We can see that you are in the final step of your '. $insert_email_from_name .' Account Configuration process -- but still need to upload your "Proof of Banking".

<b>With just a little bit of time and effort, it is really easy to open a business bank account.</b>

<i>We found this article <a href="www.inc.com/aj-agrawal/how-to-open-a-business-bank-account-for-your-startup.html" target="PAYYAP_HOW_TO_OPEN_A_BUSINESS_BANK_ACCOUNT">How To Open A Business Bank Account For Your Startup</a> -- Hopefully you will find it useful and helpful...</i>

Not only will this serve to legitimize your business, but you will also be able to Upload your final "Proof of Identity" to your '. $insert_email_from_name .' Account!

We know you can do it...!

<b>Once you have obtained (and taken a photo of) your Proof of Banking...</b>

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" and navigate your way to <b>STEP4/4 ("Proof of Identity").</b>

Be sure that you have successfully uploaded your Proof of Personal Identity, your Proof of Business Identity, and then scroll down to the third (and final) heading: <i>"Proof of Banking (from photo, scan or file)"</i>

Click on the "pull-down-menu" and from the 2 options, select the one that suits you best:

&nbsp;&nbsp;1. <b>Business Bank Account Invoice / Statement</b>

&nbsp;&nbsp;2. <b>Business Bank Account Voided Check</b>

Again, (just as you did with the previous ID Uploads) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either: 

&nbsp;&nbsp;&bull; "Take a Photo" or 

&nbsp;&nbsp;&bull; "Upload a File".

<u>TO BE CLEAR:</u> You can either "Take a Photo" of your Proof of Banking <u>OR</u> upload a file/scan/or photo (of your Proof of Banking) already "in" your mobile device gallery/storage.

Once all three uploads are complete, you can click <i>SAVE and Confirm to ACTIVATE</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just one click away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Thank you for your continued interest in '. $insert_email_from_name .'.</b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>   
    
    ';
    
    
    
    /// END: send first email /////////////////////////////////////////
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '28'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }









 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### PROOF OF PRICING; BUT NO PROOF OF BUSINESS #3 (ADMIN: DETAILS REQUESTED)
 
 
 $tmp_sql = "SELECT serialized_pulldown_options FROM KYC_additional_documents_options 
			WHERE account_hash = '". $tmp_account_details['hash'] ."'
			ORDER BY datetime_created DESC
			LIMIT 1
			;";
$existing_additional_documents_options = getTHECASHIER($tmp_sql);
$existing_additional_documents_options_array = unserialize($existing_additional_documents_options);
 
 
$account_part_7_completed = false;
if(
(stristr($tmp_account_details['business_document_3'],"REQUESTED"))
&& (stristr($existing_additional_documents_options_array['additional_business_document_3_required'],"TRUE"))
&& ($account_part_6_completed == true)
&& ($business_ids_details['current']['proof_of_business_3']['proof_of_business_3_description'])
&& ($business_ids_details['current']['proof_of_business_3']['proof_of_business_3_filename'])
&& (!stristr($business_ids_details['current']['proof_of_business_3']['status'],"CLEARED"))
) {
	$account_part_7_completed = true;
}
 
 

 
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_part_1_completed)
  && ($account_part_2_completed)
  && ($account_part_3_completed)
  && ($account_part_4_completed)
  && ($account_part_5_completed)
  && ($account_part_6_completed)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 32)
 ) {
  
 
  
  /// check if any transactions yet ?:
  
 
  
  
  if($account_part_7_completed == false) {
  
    
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "28") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    	
    
    
  
		/// START: send first email (#25) /////////////////////////////////////////
		
		$email_subject = "Your $insert_email_from_name Account needs your attention!";
		if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
		
		$email_message = $greetings_string . '

The bank has requested additional "Proof of Business" documents -- but don\'t worry!  This is common for businesses in your industry....

Let\'s do it now!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" to complete this request for additional proof of business.</b>

Click on the "pull-down-menu" and from the options, select the one that suits you best:

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[0] .'</b>';

if($activate_business_document_3_pulldown_option[1]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[1] .'</b>';
}

if($activate_business_document_3_pulldown_option[2]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[2] .'</b>';
}

if($activate_business_document_3_pulldown_option[3]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[3] .'</b>';
}

if($activate_business_document_3_pulldown_option[4]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[4] .'</b>';
}

if($activate_business_document_3_pulldown_option[5]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[5] .'</b>';
}


$email_message .='

Again, (just as you did with the previous ID Uploads) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either:

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo"

-- OR --

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

Once this request for additional proof of business has been completed, you can click <i>SAVE and Complete...</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just one click away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Create the business you always wanted, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff
'. $_SESSION['template']['company']['TEL_USA_TOLLFREE'] .' (US TOLL FREE)
'. $_SESSION['template']['company']['TEL_USA'] .' (US)
<a href="mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'..." target="_PAYYAP_HOMEPAGE">'. $insert_email_from_emailaddress .'</a>
<a href="'. $insert_email_from_url .'" target="_PAYYAP_HOMEPAGE">'. $insert_email_from_url .'</a>

';
    	
    	
    	/// END: send first email /////////////////////////////////////////
    	
    	$updated_datetime = datetime();
    	$tmp_sql = "UPDATE followup_emails 
    	   SET followup_email_ID_last_sent = '29'
    	   ,datetime_updated = '". $updated_datetime ."' 
    	   WHERE 
    	   followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    	if($test_logging == true) test("tmp_sql",$tmp_sql);
    	$update_results = updateTHECASHIER($tmp_sql);
    	if($test_logging == true) test("update_results",$update_results);
    	$updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "29") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 2nd email (#30) /////////////////////////////////////////
    
    $email_subject = "Do you need help making a price list?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

The bank has requested additional "Proof of Business" documents -- but don\'t worry!  This is common for businesses in your industry....

Let\'s do it now!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" to complete this request for additional proof of business.</b>

Click on the "pull-down-menu" and from the options, select the one that suits you best:

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[0] .'</b>';

if($activate_business_document_3_pulldown_option[1]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[1] .'</b>';
}

if($activate_business_document_3_pulldown_option[2]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[2] .'</b>';
}

if($activate_business_document_3_pulldown_option[3]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[3] .'</b>';
}

if($activate_business_document_3_pulldown_option[4]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[4] .'</b>';
}

if($activate_business_document_3_pulldown_option[5]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[5] .'</b>';
}


$email_message .='

Again, (just as you did with the previous ID Uploads) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either:

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo"

-- OR --

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

Once this request for additional proof of business has been completed, you can click <i>SAVE and Complete...</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just one click away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Create the business you always wanted, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff
'. $_SESSION['template']['company']['TEL_USA_TOLLFREE'] .' (US TOLL FREE)
'. $_SESSION['template']['company']['TEL_USA'] .' (US)
<a href="mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'..." target="_PAYYAP_HOMEPAGE">'. $insert_email_from_emailaddress .'</a>
<a href="'. $insert_email_from_url .'" target="_PAYYAP_HOMEPAGE">'. $insert_email_from_url .'</a>

';  
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '30'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "30") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#31) /////////////////////////////////////////
    
    $email_subject = "Are you stuck?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

The bank has requested additional "Proof of Business" documents -- but don\'t worry!  This is common for businesses in your industry....

Let\'s do it now!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" to complete this request for additional proof of business.</b>

Click on the "pull-down-menu" and from the options, select the one that suits you best:

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[0] .'</b>';

if($activate_business_document_3_pulldown_option[1]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[1] .'</b>';
}

if($activate_business_document_3_pulldown_option[2]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[2] .'</b>';
}

if($activate_business_document_3_pulldown_option[3]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[3] .'</b>';
}

if($activate_business_document_3_pulldown_option[4]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[4] .'</b>';
}

if($activate_business_document_3_pulldown_option[5]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[5] .'</b>';
}


$email_message .='

Again, (just as you did with the previous ID Uploads) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either:

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo"

-- OR --

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

Once this request for additional proof of business has been completed, you can click <i>SAVE and Complete...</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just one click away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Create the business you always wanted, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff
'. $_SESSION['template']['company']['TEL_USA_TOLLFREE'] .' (US TOLL FREE)
'. $_SESSION['template']['company']['TEL_USA'] .' (US)
<a href="mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'..." target="_PAYYAP_HOMEPAGE">'. $insert_email_from_emailaddress .'</a>
<a href="'. $insert_email_from_url .'" target="_PAYYAP_HOMEPAGE">'. $insert_email_from_url .'</a>

';  
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '31'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "31") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#32) /////////////////////////////////////////
    
    $email_subject = "You've come so far...!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

The bank has requested additional "Proof of Business" documents -- but don\'t worry!  This is common for businesses in your industry....

Let\'s do it now!

Simply open the '. $insert_email_from_name .' App on your mobile device, "Select Your Account" to complete this request for additional proof of business.</b>

Click on the "pull-down-menu" and from the options, select the one that suits you best:

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[0] .'</b>';

if($activate_business_document_3_pulldown_option[1]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[1] .'</b>';
}

if($activate_business_document_3_pulldown_option[2]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[2] .'</b>';
}

if($activate_business_document_3_pulldown_option[3]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[3] .'</b>';
}

if($activate_business_document_3_pulldown_option[4]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[4] .'</b>';
}

if($activate_business_document_3_pulldown_option[5]) {
	$email_message .='

&nbsp;&nbsp;&bull; <b>'. $activate_business_document_3_pulldown_option[5] .'</b>';
}


$email_message .='

Again, (just as you did with the previous ID Uploads) use the built-in '. $insert_email_from_name .' Camera/Uploader, to either:

&nbsp;&nbsp;&bull;&nbsp; "Take a Photo"

-- OR --

&nbsp;&nbsp;&bull;&nbsp; "Upload a File".

Once this request for additional proof of business has been completed, you can click <i>SAVE and Complete...</i>

<b>Your Activated and LIVE '. $insert_email_from_name .' Account is just one click away!</b>

If you have any questions, please do not hesitate to contact our courteous customer support staff.

Or, visit the FAQs page at: <a href="https://support.payyap.network" target="_PAYYAP_SUPPORT">https://SUPPORT.PAYYAP.network</a>.

<b>Create the business you always wanted, with '. $insert_email_from_name .'!</b>

Sincerely,

'. $insert_email_from_name .' Support Staff
'. $_SESSION['template']['company']['TEL_USA_TOLLFREE'] .' (US TOLL FREE)
'. $_SESSION['template']['company']['TEL_USA'] .' (US)
<a href="mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'..." target="_PAYYAP_HOMEPAGE">'. $insert_email_from_emailaddress .'</a>
<a href="'. $insert_email_from_url .'" target="_PAYYAP_HOMEPAGE">'. $insert_email_from_url .'</a>

';
    
    /// END: send first email /////////////////////////////////////////
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '32'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }













 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### ACTIVE ACCOUNT, BUT NO PROCESSING
 
 
 $tmp_sql = "SELECT transactionid FROM transactions 
 WHERE accountid = '". $tmp_account_details['accountid'] ."'
 AND accountid != ''
 AND accountid != '0'
 AND description = 'INCOMING'
 AND status = 'APPROVED'
 ";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $approved_transactions_array = arrayTHECASHIER($tmp_sql);
 if($test_logging == true) test("approved_transactions_array",$approved_transactions_array);
 $number_of_approved_transactions = count($approved_transactions_array);
 if($test_logging == true) test("number_of_approved_transactions",$number_of_approved_transactions);


 $account_part_7_completed = false;
 if(
  ($number_of_approved_transactions >= 1)
 ) {
  $account_part_7_completed = true;
 }
 
 
 

 
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_part_1_completed)
  && ($account_part_2_completed)
  && ($account_part_3_completed)
  && ($account_part_4_completed)
  && ($account_part_5_completed)
  && ($account_part_6_completed)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 32)
  && ($tmp_account_details->status_payments == "ON")
 ) {
  
 
  
  /// check if any transactions yet ?:
  
 
  
  
  if($account_part_7_completed == false) {
  
    
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "28") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
  
    /// START: send first email (#29) /////////////////////////////////////////
    
    
    
    $email_subject = "Initiating a Payment Request!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

<b>Dear,'. $tmp_member_details['firstname'] .' '. $tmp_member_details['lastname'] .'!</b>

We appreciate you taking the time to configure, and activate your '. $insert_email_from_name .' account!

<b>Now comes the fun part! — Getting paid!</b>

Simply open the '. $insert_email_from_name .' app on your mobile device and <i>"Select Your Account".</i>

<b>Once your account is "selected", you will be given two options:</b>

START NEW: <u>Real-Time Telephone Payment</u> <i> (or)</i>

SEND NEW: <u>Email Invoice</u>

Select the option that suits you best! — Either way, a Payment Request is initiated!

However... If you want to (literally) watch your customer/client pay you in "Real-Time", be sure to select <i>Real-Time Telephone Payment</i>

It\'s very cool!

Also, if you haven\'t already, <b>be sure to check out the '. $insert_email_from_name .' Service Demonstration Video -- in your app, or <a href="https://www.youtube.com/watch?v=OHqgkOZbXTA" target="PAYYAP_PAYMENTS_APP_DEMO_VIDEO">HERE!</a></b>

<u>Final note: Following the success of your first approved payment, we will send you an email containing clear instructions on how to give ProPay (our banking partner), your banking details,</u> so that your acquired funds (and all subsequent funds) will be automatically transferred to your business bank account.

<b>We know you are going to love getting paid with '. $insert_email_from_name .'.</b>

For further assistance, please note the following Support Options:

<b>ProPay <u>Banking Support Options:</u></b>

&nbsp;&nbsp;&bull; ONLINE CHAT LINK: <a href="https://home-c8.incontact.com/inContact/ChatClient/ChatClientPatron.aspx?poc=642ac145-5e15-4c3e-9882-de92231f08e4&bu=4593646" target="_PROPAY_CHAT">ProPay Online CHAT Support</a>

&nbsp;&nbsp;&bull; ONLINE FORM SUPPORT: <a href="https://www.propay.com/propay-company/contact-propay/" target="_PROPAY_FORM">ProPay Online FORM Support</a>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:customerservice@propay.com?subject=re: MERCHANT ID #  '. $tmp_account_details['TSYS_merchant_account_id'] .'" target="_PROPAY_EMAIL">customerservice@propay.com</a>

<b>'. $insert_email_from_name .' <u>Technical ("App") Support Options:</u></b>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

&nbsp;&nbsp;&bull; FAQ SUPPORT: <a href="https://SUPPORT.PAYYAP.network/" target="_PAYYAP_FAQ">'. $insert_email_from_name .' FAQ</a>

Thank you for choosing '. $insert_email_from_name .'!!

<b>Go ahead and give it a try!<b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

<a href="'. $insert_email_from_url .'" target="_PAYYAP_HOMEPAGE">'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '29'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "29") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 2nd email (#30) /////////////////////////////////////////
    
    $email_subject = "YOUR ACCOUNT IS LIVE: Accept Credit or Debit Cards with $insert_email_from_name!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

<b>Dear,'. $tmp_member_details['firstname'] .'!</b>

Did you know that using '. $insert_email_from_name .' is the easiest way to take an AMEX/MC/Visa (credit or debit) payment <i>from anyone in the world, in realtime?</i>

And guess what else?

&nbsp;&nbsp;1. Your customer or client does <u>not need</u> to have the '. $insert_email_from_name .' app.

&nbsp;&nbsp;2. Your customer or client does <u>not need</u> the internet.

&nbsp;&nbsp;3. Your customer or client does <u>not need</u> a computer, laptop, or mobile device.

Then... What does my customer or client need? (you might be asking??)

Your customer or client <u>only needs a telephone.</u> <i>Any phone</i> will do! --

What are you waiting for?

You\'ve already taken the time to register, and activate your '. $insert_email_from_name .' account.

<b>Now it\'s time to get paid for your work!</b>

Simply open the '. $insert_email_from_name .' app on your mobile device and <i>"Select Your Account".</i>

<b>Once your account is "selected", you will be given two options for getting paid:</b>

&nbsp;&nbsp;1.	START NEW: <u>Real-Time Telephone Payment</u> (or)

&nbsp;&nbsp;2.	SEND NEW: <u>Email Invoice</u>

Select the option that suits you best!

Getting paid has never been so easy!

Also, if you haven\'t already, <b>be sure to check out the '. $insert_email_from_name .' Service Demonstration Video -- in your app, or <a href="https://www.youtube.com/watch?v=OHqgkOZbXTA" target="PAYYAP_PAYMENTS_APP_DEMO_VIDEO">HERE!</a></b>

For further assistance, please note the following Support Options:

<b>ProPay <u>Banking Support Options:</u></b>

&nbsp;&nbsp;&bull; ONLINE CHAT LINK: <a href="https://home-c8.incontact.com/inContact/ChatClient/ChatClientPatron.aspx?poc=642ac145-5e15-4c3e-9882-de92231f08e4&bu=4593646" target="_PROPAY_CHAT">ProPay Online CHAT Support</a>

&nbsp;&nbsp;&bull; ONLINE FORM SUPPORT: <a href="https://www.propay.com/propay-company/contact-propay/" target="_PROPAY_FORM">ProPay Online FORM Support</a>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:customerservice@propay.com?subject=re: MERCHANT ID # '. $tmp_account_details['TSYS_merchant_account_id'] .'" target="_PROPAY_EMAIL">customerservice@propay.com</a>

<b>'. $insert_email_from_name .' <u>Technical ("App") Support Options:</u></b>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

&nbsp;&nbsp;&bull; FAQ SUPPORT: <a href="https://SUPPORT.PAYYAP.network/" target="_PAYYAP_FAQ">'. $insert_email_from_name .' FAQ</a>

Thank you for choosing '. $insert_email_from_name .'!!

<b>We know you will have great success with '. $insert_email_from_name .'!<b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

<a href="'. $insert_email_from_url .'" target="_PAYYAP_HOMEPAGE">'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '30'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "30") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#31) /////////////////////////////////////////
    
    $email_subject = "LIVE : $insert_email_from_name gets you paid today!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
<b>Greetings,'. $tmp_member_details['firstname'] .'!</b>

Have you just completed a service or have a great product to sell, but are unsure how you are going to get paid for it?

Well, guess what??!!

<b>Your '. $insert_email_from_name .' account is now active - ready for you to begin taking AMEX™ / MasterCard™ / VISA™ payments!</b>

Simply open the '. $insert_email_from_name .' app on your mobile device and <i>"Select Your Account".</i>

<b>Once your account is "selected", you will be given two options:</b>

&nbsp;&nbsp;1.	START NEW: <u>Real-Time Telephone Payment</u> (or)

&nbsp;&nbsp;2.	SEND NEW: <u>Email Invoice</u>

Select the option that suits you best!

But... If you want to watch your customer/client pay you in “Real-Time" (literally), be sure to select <i>Real-Time Telephone Payment!</i>

Give it a go!  We know you\'ll love it!

As always, if you have any questions, we\'re here to help.  Please do not hesitate to contact us.

Please note the following Support Options:

<b>ProPay <u>Banking Support Options:</u></b>

&nbsp;&nbsp;&bull; ONLINE CHAT LINK: <a href="https://home-c8.incontact.com/inContact/ChatClient/ChatClientPatron.aspx?poc=642ac145-5e15-4c3e-9882-de92231f08e4&bu=4593646" target="_PROPAY_CHAT">ProPay Online CHAT Support</a>

&nbsp;&nbsp;&bull; ONLINE FORM SUPPORT: <a href="https://www.propay.com/propay-company/contact-propay/" target="_PROPAY_FORM">ProPay Online FORM Support</a>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:customerservice@propay.com?subject=re: MERCHANT ID # '. $tmp_account_details['TSYS_merchant_account_id'] .'" target="_PROPAY_EMAIL">customerservice@propay.com</a>

<b>'. $insert_email_from_name .' <u>Technical ("App") Support Options:</u></b>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

&nbsp;&nbsp;&bull; FAQ SUPPORT: <a href="https://SUPPORT.PAYYAP.network/" target="_PAYYAP_FAQ">'. $insert_email_from_name .' FAQ</a>

Thank you for choosing '. $insert_email_from_name .'!!

<b>Your success is our motivation!<b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

<a href="'. $insert_email_from_url .'" target="_PAYYAP_HOMEPAGE">'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '31'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "31") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#28) /////////////////////////////////////////
    
    $email_subject = "LIVE $insert_email_from_name : Don't Be Shy, You Deserve It!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
<b>Hello,'. $tmp_member_details['firstname'] .'!</b>

It\'s been awhile since we last saw you!

Have you forgotten that <u>your '. $insert_email_from_name .' account is already configured, activated and ready for use?</u>

<b>Don\'t be shy!  You deserve to be paid for your work!</b>

Simply open the '. $insert_email_from_name .' app on your mobile device and <i>"Select Your Account".</i>

<b>Once your account is "selected", you will be given two options:</b>

&nbsp;&nbsp;1.	START NEW: <u>Real-Time Telephone Payment</u> (or)

&nbsp;&nbsp;2.	SEND NEW: <u>Email Invoice</u>

Select the option that suits you best!

Taking AMEX&trade; / MasterCard&trade; / VISA&trade; payments has never been so easy!

Give it a go! We know you, and your customers will love it!

Also, if you haven\'t already, <b>be sure to check out the '. $insert_email_from_name .' Service Demonstration Video -- in your app, or <a href="https://www.youtube.com/watch?v=OHqgkOZbXTA" target="PAYYAP_PAYMENTS_APP_DEMO_VIDEO">HERE!</a></b>

Do not hesitate to contact us with any questions... We are always happy to assist you.

Please note the following Support Options:

<b>ProPay <u>Banking Support Options:</u></b>

&nbsp;&nbsp;&bull; ONLINE CHAT LINK: <a href="https://home-c8.incontact.com/inContact/ChatClient/ChatClientPatron.aspx?poc=642ac145-5e15-4c3e-9882-de92231f08e4&bu=4593646" target="_PROPAY_CHAT">ProPay Online CHAT Support</a>

&nbsp;&nbsp;&bull; ONLINE FORM SUPPORT: <a href="https://www.propay.com/propay-company/contact-propay/" target="_PROPAY_FORM">ProPay Online FORM Support</a>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:customerservice@propay.com?subject=re: MERCHANT ID # '. $tmp_account_details['TSYS_merchant_account_id'] .'" target="_PROPAY_EMAIL">customerservice@propay.com</a>

<b>'. $insert_email_from_name .' <u>Technical ("App") Support Options:</u></b>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

&nbsp;&nbsp;&bull; FAQ SUPPORT: <a href="https://SUPPORT.PAYYAP.network/" target="_PAYYAP_FAQ">'. $insert_email_from_name .' FAQ</a>

Thank you for choosing '. $insert_email_from_name .'!!

<b>You deserve to get paid for doing what you love!<b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

<a href="'. $insert_email_from_url .'" target="_PAYYAP_HOMEPAGE">'. $insert_email_from_url .'</a>  
    
    ';
    
    
    
    /// END: send first email /////////////////////////////////////////
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '32'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }










 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### POST-PROCESSING INSTRUCTIONS / FOLLOW-UP
 
 
 $account_part_8_completed = false;  // never satisfied ??  maybe maybe some date ??
 //if($_XXXXX_) {
 // $account_part_8_completed = true; 
 //}

 
 
 if( 
  ($registered_member_verified_emailaddress)
  && ($account_part_1_completed)
  && ($account_part_2_completed)
  && ($account_part_3_completed)
  && ($account_part_4_completed)
  && ($account_part_5_completed)
  && ($account_part_6_completed)
  && ($account_part_7_completed)
  && ($account_followup_status_details->followup_email_ID_last_sent <= 36)
  && ($tmp_account_details->status_payments == "ON")
 ) {
  
 
  
  /// check if any transactions yet ?:
  
 
  
  
  if($account_part_8_completed == false) {
  
    
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_1",$days_later_followup_1);
   $hours_later = 24 * $days_later_followup_1;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent <= "32") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
  
    /// START: send first email (#29) /////////////////////////////////////////
    
    $email_subject = "How is everything?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

How is everything going for you?

Have you had a chance to provide ProPay (our banking partner) with your bank account details?

In order for your funds to be automatically transferred to your personal (or business) bank account,<b>you must log-in to your ProPay Merchant Account and provide them with your bank account details.</b>

If you have previously logged-into your ProPay Merchant Account and already personalized your login information, then of course be sure to use that (personalized) login information.

However, if this is your first time logging-into your ProPay Merchant Account, please use the USERNAME and PASSWORD below:

&nbsp;&nbsp;&bull; ProPay LOGIN LINK: <a href="https://epay.ProPay.com/login/" target="_PROPAY_LOGIN"><span style="color:#CC0000;">https://epay.ProPay.com/login/</span></a>

&nbsp;&nbsp;&bull; <span style="color:#CC0000;">YOUR "ProPay USERNAME":</span>  <b>'. $tmp_member_details['emailaddress'] .'</b>

&nbsp;&nbsp;&bull; <span style="color:#CC0000;">YOUR "ProPay PASSWORD":</span>  <b>'. $tmp_account_details['TSYS_temporary_password'] .'</b>

NOTE: Passwords are <u>cAsE sEnSiTiVe</u> !

<b>ONCE YOU ARE LOGGED-INTO YOUR ProPay ACCOUNT:</b>

&nbsp;&nbsp;1. Click on <b>"Add Bank Account"</b> (located: in the red box on the right side of your account).

&nbsp;&nbsp;2. Enter your banking details and click, "Continue".

&nbsp;&nbsp;3. You should see <b>Bank Account Success!</b>

&nbsp;&nbsp;4. Click <b>"Transfer Funds To My Bank Account"</b>

<i>This first (manual) Transfer of Funds will activate the <b>automatic transfer process.</b> 

TO BE CLEAR: <u>All of your subsequent available funds</u>, will be <i>automatically transferred</i> to your designated bank account <b>after 72 hours of each approved transaction that you process, using '. $insert_email_from_name .'!</b>

For further assistance, please note the following Support Options:

<b>ProPay <u>Payment Support Options:</u></b>

&nbsp;&nbsp;&bull; ONLINE CHAT LINK: <a href="https://home-c8.incontact.com/inContact/ChatClient/ChatClientPatron.aspx?poc=642ac145-5e15-4c3e-9882-de92231f08e4&bu=4593646" target="_PROPAY_CHAT">ProPay Online CHAT Support</a>

&nbsp;&nbsp;&bull; ONLINE FORM SUPPORT: <a href="https://www.propay.com/propay-company/contact-propay/" target="_PROPAY_FORM">ProPay Online FORM Support</a>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:customerservice@propay.com?subject=re: MERCHANT ID # '. $tmp_account_details['TSYS_merchant_account_id'] .'" target="_PROPAY_EMAIL">customerservice@propay.com</a>

<b>'. $insert_email_from_name .' <u>Technical ("App") Support Options:</u></b>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

&nbsp;&nbsp;&bull; FAQ SUPPORT: <a href="https://SUPPORT.PAYYAP.network/" target="_PAYYAP_FAQ">'. $insert_email_from_name .' FAQ</a>

Thank you for choosing '. $insert_email_from_name .'!!

<b>We look forward to your continued success!<b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '33'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_2",$days_later_followup_2);
   $hours_later = 24 * $days_later_followup_2;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "33") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    
    
    
    
    
    /// START: send 2nd email (#30) /////////////////////////////////////////
    
    $email_subject = "Has your money been sent?";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '

According to our records, it has been 72 hours since the success of your first approved transaction, using '. $insert_email_from_name .'!

As such, your available funds will be automatically transferred to your designated bank account!

However, <b>in order for this automated transfer process to be in effect, you must first provide ProPay (our banking partner) with your bank account details, and <i>manually submit the first transfer!</i></b> 

If you have already done this... FANTASTIC!! -- As long as it has been 72 hours since you manually requested this initial transfer, then you should have received an email from ProPay announcing that a transfer of your funds has been initiated!

<i>If you haven\'t had a chance to provide ProPay with your necessary banking details, <u>please follow the instructions below:</u></i>

Click on this ProPay LOGIN LINK: <a href="https://epay.ProPay.com/login/" target="_PROPAY_LOGIN"><span style="color:#CC0000;">https://epay.ProPay.com/login/</span></a>

If you have previously logged-into your ProPay Merchant Account and already personalized your login information, then of course be sure to use that new (personalized) login information.

However, if this is your first time logging-into your ProPay Merchant Account, please use the USERNAME and PASSWORD below:

&nbsp;&nbsp;&bull; <span style="color:#CC0000;">YOUR "ProPay USERNAME":</span>  <b>'. $tmp_member_details['emailaddress'] .'</b>

&nbsp;&nbsp;&bull; <span style="color:#CC0000;">YOUR "ProPay PASSWORD":</span>  <b>'. $tmp_account_details['TSYS_temporary_password'] .'</b>

NOTE: Passwords are <u>cAsE sEnSiTiVe</u> !

<b>ONCE YOU ARE LOGGED-INTO YOUR ProPay ACCOUNT:</b>

&nbsp;&nbsp;1. Click on <b>"Add Bank Account"</b> (located: in the red box on the right side of your account).

&nbsp;&nbsp;2. Enter your banking details and click, "Continue".

&nbsp;&nbsp;3. You should see <b>Bank Account Success!</b>

&nbsp;&nbsp;4. Click <b>"Transfer Funds To My Bank Account"</b>

<i>This first (manual) Transfer of Funds will activate the <b>automatic transfer process.</b> 

TO BE CLEAR: <u>All of your subsequent available funds</u>, will be <i>automatically transferred</i> to your designated bank account <b>after 72 hours of each approved transaction that you process, using '. $insert_email_from_name .'!</b>

For further assistance, please note the following Support Options:

<b>ProPay <u>Payment Support Options:</u></b>

&nbsp;&nbsp;&bull; ONLINE CHAT LINK: <a href="https://home-c8.incontact.com/inContact/ChatClient/ChatClientPatron.aspx?poc=642ac145-5e15-4c3e-9882-de92231f08e4&bu=4593646" target="_PROPAY_CHAT">ProPay Online CHAT Support</a>

&nbsp;&nbsp;&bull; ONLINE FORM SUPPORT: <a href="https://www.propay.com/propay-company/contact-propay/" target="_PROPAY_FORM">ProPay Online FORM Support</a>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:customerservice@propay.com?subject=re: MERCHANT ID # '. $tmp_account_details['TSYS_merchant_account_id'] .'" target="_PROPAY_EMAIL">customerservice@propay.com</a>

<b>'. $insert_email_from_name .' <u>Technical ("App") Support Options:</u></b>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

&nbsp;&nbsp;&bull; FAQ SUPPORT: <a href="https://SUPPORT.PAYYAP.network/" target="_PAYYAP_FAQ">'. $insert_email_from_name .' FAQ</a>

Thank you for choosing '. $insert_email_from_name .'!!

<b>We look forward to your continued success!<b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '34'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_3",$days_later_followup_3);
   $hours_later = 24 * $days_later_followup_3;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "34") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 3rd email (#31) /////////////////////////////////////////
    
    $email_subject = "Growing your business!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
At this point, you should have successfully provided your banking details to ProPay, and your initial available funds should have been deposited into your designated bank account!

FANTASTIC!!

<b>We know you work hard... hopefully doing what you love, and doing what you do best...!</b>

So, what are you waiting for?

Why not initiate another payment request?

<u>Simply, enter your customer\'s name, telephone number and amount owed... and let '. $insert_email_from_name .' take care of the rest!</u>

No "Squares"... No "Dongles"... NO HASSLE!

100% safe, 100% secure, and 100% PCI/DSS-compliant, (for you and your customers/clients).

<b>We truly want to help you grow your business!</b>

Please let us know if we can assist you with any questions.

Note the following Support Options:

&nbsp;&nbsp;&bull; ONLINE CHAT LINK: <a href="https://home-c8.incontact.com/inContact/ChatClient/ChatClientPatron.aspx?poc=642ac145-5e15-4c3e-9882-de92231f08e4&bu=4593646" target="_PROPAY_CHAT">ProPay Online CHAT Support</a>

&nbsp;&nbsp;&bull; ONLINE FORM SUPPORT: <a href="https://www.propay.com/propay-company/contact-propay/" target="_PROPAY_FORM">ProPay Online FORM Support</a>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:customerservice@propay.com?subject=re: MERCHANT ID # '. $tmp_account_details['TSYS_merchant_account_id'] .'" target="_PROPAY_EMAIL">customerservice@propay.com</a>

<b>'. $insert_email_from_name .' <u>Technical ("App") Support Options:</u></b>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

&nbsp;&nbsp;&bull; FAQ SUPPORT: <a href="https://SUPPORT.PAYYAP.network/" target="_PAYYAP_FAQ">'. $insert_email_from_name .' FAQ</a>

Thank you for choosing '. $insert_email_from_name .'!!

<b>We look forward to your continued success!<b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>
    
    
    ';
    
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '35'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   
   if($test_logging == true) test("days_later_followup_4",$days_later_followup_4);
   $hours_later = 24 * $days_later_followup_4;
   if($test_logging == true) test("hours_later",$hours_later);
  
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   if($test_datetime_future) $current_datetime = $test_datetime_future;
   
   if($test_logging == true) test("test_datetime_future",$test_datetime_future);
   
   $last_updated_datetime = $account_followup_status_details->datetime_updated;
   if($test_logging == true) test("last_updated_datetime",$last_updated_datetime);
   
   
   $last_updated_time = strtotime($last_updated_datetime);
   if($test_logging == true) test("last_updated_time",$last_updated_time);
   
   
   $last_updated_time_to_test = strtotime("+ ". $hours_later ." hours",$last_updated_time);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_time_to_test);
   
   $last_updated_datetime_to_test = date("Y-m-d H:i:s",$last_updated_time_to_test);
   if($test_logging == true) test("last_updated_datetime_to_test",$last_updated_datetime_to_test);
   
   if($test_logging == true) test("(current_datetime > last_updated_datetime_to_test)","($current_datetime > $last_updated_datetime_to_test)");
   
   if($test_logging == true) test("account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
   
  
   
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($account_followup_status_details->followup_email_ID_last_sent == "35") 
    && ($current_datetime > $last_updated_datetime_to_test) 
   ) {
    
    
    
    /// START: send 4th email (#28) /////////////////////////////////////////
    
    $email_subject = "Cheers to your continued success!";
    if($test_logging == true) test("SETTING THE EMAIL!!!",$email_subject);
    
    $email_message = $greetings_string . '
    
How is everything going for you and your business?

It has been awhile since you last got paid!

<b>We know you work hard...!</b>

Why not initiate another payment request?

Simply open the '. $insert_email_from_name .' app on your mobile device and <i>"Select Your Account".</i> (ie, click on the blue square.)

<b>Once your account has been "selected", you will be given two options:</b> 

START NEW: <u>Real-Time Telephone Payment</u> <i>)(or)</i>

SEND NEW: <u>Email Invoice</u>

Choose the option that suits you best, and let '. $insert_email_from_name .' -The Payments App&trade; take care of the rest!

Should you have any questions, please note the following support options:

<b>ProPay <u>Payment Support Options:</u></b>

&nbsp;&nbsp;&bull; ONLINE CHAT LINK: <a href="https://home-c8.incontact.com/inContact/ChatClient/ChatClientPatron.aspx?poc=642ac145-5e15-4c3e-9882-de92231f08e4&bu=4593646" target="_PROPAY_CHAT">ProPay Online CHAT Support</a>

&nbsp;&nbsp;&bull; ONLINE FORM SUPPORT: <a href="https://www.propay.com/propay-company/contact-propay/" target="_PROPAY_FORM">ProPay Online FORM Support</a>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:customerservice@propay.com?subject=re: MERCHANT ID # '. $tmp_account_details['TSYS_merchant_account_id'] .'" target="_PROPAY_EMAIL">customerservice@propay.com</a>

<b>'. $insert_email_from_name .' <u>Technical ("App") Support Options:</u></b>

&nbsp;&nbsp;&bull; EMAIL SUPPORT: <a href="mailto:'. $insert_email_from_emailaddress .'?subject=re: I have a question about an incoming transaction." target="_PAYYAP_EMAIL">'. $insert_email_from_emailaddress .'</a>

&nbsp;&nbsp;&bull; FAQ SUPPORT: <a href="https://SUPPORT.PAYYAP.network/" target="_PAYYAP_FAQ">'. $insert_email_from_name .' FAQ</a>

Thank you for choosing '. $insert_email_from_name .'!!

<b>We look forward to your continued success!<b>

Sincerely,

'. $insert_email_from_name .' Support Staff

<a href=\'mailto:'. $insert_email_from_emailaddress .'?subject=I have a question about '. $insert_email_from_name .'...\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_emailaddress .'</a>
<a href=\''. $insert_email_from_url .'\' target=\'_PAYYAP_HOMEPAGE\'>'. $insert_email_from_url .'</a>   
    
    ';
    
    
    
    /// END: send first email /////////////////////////////////////////
    $updated_datetime = datetime();
    $tmp_sql = "UPDATE followup_emails 
       SET followup_email_ID_last_sent = '36'
       ,datetime_updated = '". $updated_datetime ."' 
       WHERE 
       followup_emails_id = '". $account_followup_status_details->followup_emails_id ."';";
    if($test_logging == true) test("tmp_sql",$tmp_sql);
    $update_results = updateTHECASHIER($tmp_sql);
    if($test_logging == true) test("update_results",$update_results);
    $updated_followup_email_ID_last_sent = true;
    
    
   }  

  }
 
 }
 
 
 
 
 
 
 
 
 
 





 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ###################################################################################################
 ### PROCESSING NOW....
 
 
 if($test_logging == true) test("15_account_followup_status_details->followup_email_ID_last_sent",$account_followup_status_details->followup_email_ID_last_sent);
/*  // if payment processing has begun:
 
 if( 
  ($account_followup_status_details->followup_email_ID_last_sent <= 16)
 ) {
  
  
  
  /// check if any transactions yet ?:
  
  $active_account_tranactions = false;
  $tmp_sql = "SELECT transactions....";
  $active_account_tranactions = getTHECASHIER($tmp_sql);
  
  
  if($active_account_tranactions) {
  
    
   ///send up to 4 emails:
   
   
   
   
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   $hours_later = 24 * $days_later_followup_1;
   $tmp_time = strtotime("-". $hours_later ." hours");
   $datetime_in_the_past = date("Y-m-d H:i:s",$tmp_time);
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($member_followup_status_details->followup_email_ID_last_sent <= "12") 
    && ($datetime_in_the_past > $member_followup_status_details->datetime_updated) 
   ) {
  
    /// START: send first email (#_XXXXX_) /////////////////////////////////////
    
    $email_subject = "_XXXXX_";
    $email_message = `
    
    
    `;
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_followup_email_ID_last_sent = true;
    
   } 
   
  
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   $hours_later = 24 * $days_later_followup_2;
   $tmp_time = strtotime("-". $hours_later ." hours");
   $datetime_in_the_past = date("Y-m-d H:i:s",$tmp_time);
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($member_followup_status_details->followup_email_ID_last_sent == "13") 
    && ($datetime_in_the_past > $member_followup_status_details->datetime_updated) 
   ) {
    
    
    
    /// START: send 2nd email (#_XXXXX_) /////////////////////////////////////////
    
    $email_subject = "_XXXXX_";
    $email_message = `
    
    
    `;
    
    
    
    /// END: send first email /////////////////////////////////////////
    
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   $hours_later = 24 * $days_later_followup_3;
   $tmp_time = strtotime("-". $hours_later ." hours");
   $datetime_in_the_past = date("Y-m-d H:i:s",$tmp_time);
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($member_followup_status_details->followup_email_ID_last_sent == "14") 
    && ($datetime_in_the_past > $member_followup_status_details->datetime_updated) 
   ) {
    
    
    
    /// START: send 3rd email (#_XXXXX_) /////////////////////////////////////////
    
    $email_subject = "_XXXXX_";
    $email_message = `
    
    
    `;
    
    
    
    /// END: send first email (#_XXXXX_) /////////////////////////////////////////
    
    $updated_followup_email_ID_last_sent = true;
    
   }
   
   
   /// now figure out which email to send:
   $tmp_time = "";
   $hours_later = "";
   $tmp_datetime = "";
   $hours_later = 24 * $days_later_followup_4;
   $tmp_time = strtotime("-". $hours_later ." hours");
   $datetime_in_the_past = date("Y-m-d H:i:s",$tmp_time);
   if(
    ($updated_followup_email_ID_last_sent == false)
    && ($member_followup_status_details->followup_email_ID_last_sent == "15") 
    && ($datetime_in_the_past > $member_followup_status_details->datetime_updated) 
   ) {
    
    
    
    /// START: send 4th email (#_XXXXX_) /////////////////////////////////////////
    
    $email_subject = "_XXXXX_";
    $email_message = `
    
    
    `;
    
    
    
    /// END: send first email (#_XXXXX_) /////////////////////////////////////////
    
    $updated_followup_email_ID_last_sent = true;
    
   }  

  }
 
 }

*/ // end after processing has begun


 
 $to = $send_the_followup_to_this_emailaddress;
 
 
 
 

 ### ADD UNSUBSCRIBE:
 $message .= "
  
  <hr><span style='font-size:14px;'><a href='https://UNSUBSCRIBE.payyap.network/?emailaddress=". $to ."' target='_PAYYAP_UNSUBSCRIBE' >Click here to UNSUBSCRIBE<a/> from these ". $insert_email_from_name ." hints & reminders.</span>
  
  ";




 if($test_logging == true) test("to",$to);
 if($test_logging == true) test("email_subject",$email_subject);
 if($test_logging == true) test("email_message",$email_message);
 
 
 //exit;
 ### TEST FOR UNSUBSCRIBE: (could be placed before all the calculations to save CPU)
 
 $unsubscribed = false;
 $tmp_sql = "SELECT emailaddress FROM unsubscribe WHERE emailaddress = '". $to ."';";
 if($test_logging == true) test("tmp_sql",$tmp_sql);
 $unsubscribed = getTHECASHIER($tmp_sql,"ad_campaigns");
 if($test_logging == true) test("is_unsubscribed",$is_unsubscribedto);
 
 
 
 
 ### SEND THE EMAIL:
 if(
 	($to)
 	&& ($email_subject)
 	&& ($email_message)
 	&& (!$unsubscribed)
 ) {
	 
 	if($test_emailing == true) test("SENDING EMAIL...","");
 	
 	if($test_emailing == true) test("to",$to);
 	if($test_emailing == true) test("email_subject",$email_subject);
 	
 	quick_mailer($to,$email_subject,$email_message,$activate_unsubscribe=true);
 }
 
 
 
 
 if($test_logging == true) test("END ONE ACCOUNT CYCLE","");
 //exit;
 
 
  
 
}





if($test_logging == true) test("10 end",$x);





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

?>