Example #1
0
function step_3($en_ID, $skipIfComplete = true)
{
    // Step 3
    $access['SerializedData']['Source'] = 'en_info';
    $access['SerializedData']['Data'] = array('Service_List' => array('Processing_Info', 'Service_List'), 'Anti_Fraud_System' => array('Processing_Info', 'Anti_Fraud_System'), 'CS_Program' => array('Processing_Info', 'CS_Program'), 'Refund_Policy' => array('Processing_Info', 'Refund_Policy'), 'Volume_Last_month' => array('Processing_Info', 'Volume_Last_month'), 'Volume_Prev_30Days' => array('Processing_Info', 'Volume_Prev_30Days'), 'Volume_Prev_60Days' => array('Processing_Info', 'Volume_Prev_60Days'), 'Volume_Forcast_1Month' => array('Processing_Info', 'Volume_Forcast_1Month'), 'Volume_Forcast_2Month' => array('Processing_Info', 'Volume_Forcast_2Month'), 'Volume_Forcast_3Month' => array('Processing_Info', 'Volume_Forcast_3Month'), 'Projected_Monthly_Sales' => array('Processing_Info', 'Projected_Monthly_Sales'), 'Chargeback_%' => array('Processing_Info', 'Chargeback_%'), 'Average_Ticket_Price' => array('Processing_Info', 'Average_Ticket_Price'), 'Previous_Processor_Trans_Fee' => array('Processing_Info', 'Previous_Processor_Trans_Fee'), 'Previous_Processor_Disc_Fee' => array('Processing_Info', 'Previous_Processor_Disc_Fee'), 'Previous_Processing' => array('Processing_Info', 'Previous_Processing'), 'Previous_Processor_Reason' => array('Processing_Info', 'Previous_Processor_Reason'), 'Recur_Billing' => array('Processing_Info', 'Recur_Billing'), 'Currently_Processing' => array('Processing_Info', 'Currently_Processing'));
    $access = getAccessInfo("\r\n\t\r\n\tuserId,\r\n\ten_ID,\r\n\ten_info,\r\n\t\r\n\t'Processing Info' as access_header,\r\n\t'' as Service_List,'' as Anti_Fraud_System,'' as CS_Program,'' as Refund_Policy,\r\n\t'' as Volume_Last_month, '' as Volume_Prev_30Days, '' as Volume_Prev_60Days,\r\n\t'' as Volume_Forcast_1Month, '' as Volume_Forcast_2Month, '' as Volume_Forcast_3Month,  '' as Projected_Monthly_Sales,  '' as Average_Ticket_Price,  '' as 'Chargeback_%',\r\n\t'' as Previous_Processor_Trans_Fee, '' as Previous_Processor_Disc_Fee, '' as Previous_Processing, '' as Previous_Processor_Reason, '' as Recur_Billing, '' as Currently_Processing\r\n\t\r\n\t\r\n\t", "cs_entities left join cs_companydetails on en_type='merchant' and en_type_ID = userId", "en_ID = '{$en_ID}'", array('Size' => 30, 'Rows' => 2, 'HideIfEmpty' => true, 'Valid' => 'req'), $access);
    if ($access == -1) {
        dieLog("Invalid Company", "Invalid Company");
    }
    $access['Data']['userId']['Input'] = "hidden";
    $access['Data']['userId']['disable'] = 1;
    $access['Data']['en_ID']['Input'] = "hidden";
    $access['Data']['en_ID']['disable'] = 1;
    $access['Data']['Service_List']['Input'] = 'textarea';
    $access['Data']['Anti_Fraud_System']['Input'] = 'textarea';
    $access['Data']['CS_Program']['Input'] = 'textarea';
    $access['Data']['Refund_Policy']['Input'] = 'textarea';
    $access['Data']['Previous_Processor_Trans_Fee']['DisplayName'] = 'Previous Processor Transaction Fee';
    $access['Data']['Previous_Processor_Disc_Fee']['DisplayName'] = 'Previous Processor Discount Rate';
    $access['Data']['Volume_Last_month']['Input'] = "selectvolume";
    $access['Data']['Volume_Last_month']['DisplayName'] = "Last Month's Volume";
    $access['Data']['Volume_Prev_30Days']['Input'] = "selectvolume";
    $access['Data']['Volume_Prev_30Days']['DisplayName'] = "Volume 2 Months Ago";
    $access['Data']['Volume_Prev_60Days']['Input'] = "selectvolume";
    $access['Data']['Volume_Prev_60Days']['DisplayName'] = "Volume 3 Months Ago";
    $access['Data']['Volume_Forcast_1Month']['Input'] = "selectvolume";
    $access['Data']['Volume_Forcast_1Month']['DisplayName'] = "Forcast Volume This Month";
    $access['Data']['Volume_Forcast_2Month']['Input'] = "selectvolume";
    $access['Data']['Volume_Forcast_2Month']['DisplayName'] = "Forcast Volume Next Month";
    $access['Data']['Volume_Forcast_3Month']['Input'] = "selectvolume";
    $access['Data']['Volume_Forcast_3Month']['DisplayName'] = "Forcast Volume in two Months";
    $access['Data']['Projected_Monthly_Sales']['Input'] = "selectvolume";
    $access['Data']['Projected_Monthly_Sales']['DisplayName'] = "Projected Monthly Sales Volume";
    $access['Data']['Previous_Processor_Trans_Fee']['DisplayName'] = "Previous Processing";
    $access['Data']['Previous_Processing']['DisplayName'] = "Previous Processor";
    $access['Data']['Previous_Processor_Reason']['DisplayName'] = "Reason for Leaving Previous Processor";
    $access['Data']['Previous_Processor_Reason']['Valid'] = '';
    $access['Data']['Recur_Billing']['DisplayName'] = "Recuring Billing";
    $access['Data']['Currently_Processing']['DisplayName'] = "Currently Processing";
    $access['Data']['Average_Ticket_Price']['DisplayName'] = "Average Ticket Price";
    $access['Data']['Chargeback_%']['DisplayName'] = "Chargeback %";
    $access['Data']['Service_List']['DisplayName'] = "Please List Your Products and Services";
    $access['Data']['Anti_Fraud_System']['DisplayName'] = "Describe your Current Anti Fraud System";
    $access['Data']['CS_Program']['DisplayName'] = "Describe your Customer Service Program";
    $access['Data']['Refund_Policy']['DisplayName'] = "Describe your Refund Policy";
    $access['SubmitValue'] = 'Update Information';
    if ($skipIfComplete) {
        $access['SubmitValue'] = 'Complete Merchant Application';
    }
    $access['SubmitName'] = 'submit_step3';
    // Submit
    $showvalidation = false;
    if ($_POST[$access['SubmitName']]) {
        $result = processAccessForm(&$access);
        $showvalidation = true;
    }
    $access['Columns'] = 1;
    // Validate
    $valid = true;
    foreach ($access['Data'] as $key => $data) {
        if (!$data['Value'] && $data['Valid']) {
            $valid = false;
            if ($showvalidation) {
                $access['Data'][$key]['Highlight'] = true;
            }
        }
    }
    if (!$valid || !$skipIfComplete) {
        draw_step_buttons(3, $skipIfComplete);
        $access['HeaderMessage'] = "Please Complete all required fields to continue.";
        beginTable();
        writeAccessForm(&$access);
        endTable("Step #3 - Processing Information", "");
        include "includes/footer.php";
        die;
    }
}
Example #2
0
function step_2($en_ID, $skipIfComplete = true)
{
    global $companyInfo, $etel_routing_types;
    // Step 2
    $access = array();
    $access['SerializedData']['Source'] = 'en_info';
    $access['SerializedData']['Data'] = array('Method' => array('Payment_Data', 'Method'), 'ACH_Bank_Name' => array('Payment_Data', 'ACH', 'Bank_Name'), 'ACH_Bank_Address' => array('Payment_Data', 'ACH', 'Bank_Address'), 'ACH_Bank_ZipCode' => array('Payment_Data', 'ACH', 'Bank_ZipCode'), 'ACH_Bank_City' => array('Payment_Data', 'ACH', 'Bank_City'), 'ACH_Bank_State' => array('Payment_Data', 'ACH', 'Bank_State'), 'ACH_Bank_Country' => array('Payment_Data', 'ACH', 'Bank_Country'), 'ACH_Bank_Phone' => array('Payment_Data', 'ACH', 'Bank_Phone'), 'ACH_Bank_Beneficiary_Name' => array('Payment_Data', 'ACH', 'Bank_Beneficiary_Name'), 'ACH_Bank_Account_Name' => array('Payment_Data', 'ACH', 'Bank_Account_Name'), 'ACH_Bank_Account_Number' => array('Payment_Data', 'ACH', 'Bank_Account_Number'), 'ACH_Bank_Routing_Number' => array('Payment_Data', 'ACH', 'Bank_Routing_Number'), 'ACH_Bank_Additional_Notes' => array('Payment_Data', 'ACH', 'Bank_Additional_Notes'), 'Wire_Bank_Name' => array('Payment_Data', 'Wire', 'Bank_Name'), 'Wire_Bank_Address' => array('Payment_Data', 'Wire', 'Bank_Address'), 'Wire_Bank_ZipCode' => array('Payment_Data', 'Wire', 'Bank_ZipCode'), 'Wire_Bank_City' => array('Payment_Data', 'Wire', 'Bank_City'), 'Wire_Bank_State' => array('Payment_Data', 'Wire', 'Bank_State'), 'Wire_Bank_Country' => array('Payment_Data', 'Wire', 'Bank_Country'), 'Wire_Bank_Phone' => array('Payment_Data', 'Wire', 'Bank_Phone'), 'Wire_Bank_Beneficiary_Name' => array('Payment_Data', 'Wire', 'Bank_Beneficiary_Name'), 'Wire_Bank_Account_Name' => array('Payment_Data', 'Wire', 'Bank_Account_Name'), 'Wire_Bank_Account_Number' => array('Payment_Data', 'Wire', 'Bank_Account_Number'), 'Wire_Bank_Routing_Number' => array('Payment_Data', 'Wire', 'Bank_Routing_Number'), 'Wire_Bank_Routing_Type' => array('Payment_Data', 'Wire', 'Bank_Routing_Type'), 'Wire_Bank_Sort_Code' => array('Payment_Data', 'Wire', 'Bank_Sort_Code'), 'Wire_Bank_VAT_Number' => array('Payment_Data', 'Wire', 'Bank_VAT_Number'), 'Wire_Bank_Registration_Number' => array('Payment_Data', 'Wire', 'Bank_Registration_Number'), 'Wire_Bank_Additional_Notes' => array('Payment_Data', 'Wire', 'Bank_Additional_Notes'), 'Wire_Intermediary_Bank_Routing_Type' => array('Payment_Data', 'Wire', 'Intermediary_Bank_Routing_Type'), 'Wire_Intermediary_Bank_Routing_Number' => array('Payment_Data', 'Wire', 'Intermediary_Bank_Routing_Number'), 'Wire_Intermediary_Bank_Name' => array('Payment_Data', 'Wire', 'Intermediary_Bank_Name'), 'Wire_Intermediary_Bank_City' => array('Payment_Data', 'Wire', 'Intermediary_Bank_City'), 'Wire_Intermediary_Bank_State' => array('Payment_Data', 'Wire', 'Intermediary_Bank_State'));
    //if($companyInfo['cd_bank_routingcode']) $payment['Payment_Data']['Wire']['Bank_Routing_Type'] = $routingTypes[$companyInfo['cd_bank_routingcode']];
    //if($companyInfo['bank_IBRoutingCodeType']) $payment['Payment_Data']['Wire']['Intermediary_Bank_Routing_Type'] = $routingTypes[$companyInfo['bank_IBRoutingCodeType']];
    $access = getAccessInfo("\n\t\n\ten_ID,\n\ten_info,\n\t\n\t'Payment Method' as access_header,\n\t1 as 'Method',\n\t\n\t'ACH Banking Info' as access_header,\n  \t\t1 as 'ACH_Bank_Name', 1 as 'ACH_Bank_Address', 1 as 'ACH_Bank_ZipCode', 1 as 'ACH_Bank_City', 1 as 'ACH_Bank_State', \n  \t\t1 as 'ACH_Bank_Country', 1 as 'ACH_Bank_Phone', 1 as 'ACH_Bank_Beneficiary_Name', 1 as 'ACH_Bank_Account_Name', 1 as 'ACH_Bank_Account_Number', \n  \t\t1 as 'ACH_Bank_Routing_Number', 1 as 'ACH_Bank_Additional_Notes',\n\t\t\n\t'Wire Banking Info' as access_header,\n  \t\t1 as 'Wire_Bank_Name', 1 as 'Wire_Bank_Address', 1 as 'Wire_Bank_ZipCode', 1 as 'Wire_Bank_City', 1 as 'Wire_Bank_State', \n  \t\t1 as 'Wire_Bank_Country', 1 as 'Wire_Bank_Phone', 1 as 'Wire_Bank_Beneficiary_Name', 1 as 'Wire_Bank_Account_Name', 1 as 'Wire_Bank_Account_Number', \n  \t\t1 as 'Wire_Bank_Routing_Number', 1 as 'Wire_Bank_Routing_Type', 1 as 'Wire_Intermediary_Bank_Routing_Number',\n\t\t1 as 'Wire_Intermediary_Bank_Routing_Type',\t1 as 'Wire_Intermediary_Bank_Name', 1 as 'Wire_Intermediary_Bank_City', 1 as 'Wire_Intermediary_Bank_State', \n\t\t1 as 'Wire_Bank_Sort_Code', 1 as 'Wire_Bank_VAT_Number', 1 as 'Wire_Bank_Registration_Number', 1 as 'Wire_Bank_Additional_Notes'\n\t", "cs_entities", "en_ID = '{$en_ID}'", array('Size' => 30, 'Rows' => 2, 'HideIfEmpty' => true, 'Length' => 32, 'Valid' => 'req'), $access);
    if ($access == -1) {
        dieLog("Invalid Company", "Invalid Company");
    }
    $access['Data']['en_ID']['Input'] = "hidden";
    $access['Data']['en_ID']['disable'] = 1;
    $access['Data']['Method']['Input'] = "selectcustomarray";
    $access['Data']['Method']['Input_Custom'] = array('' => 'Please Select a Method', 'Wire' => 'Wire (International)', 'ACH' => 'ACH (US Only)');
    $access['Data']['Method']['InputAdditional'] = 'onchange="this.form.submit()"';
    $access['Data']['ACH_Bank_Additional_Notes']['Valid'] = '';
    $access['Data']['Wire_Bank_Additional_Notes']['Input'] = 'textarea';
    $access['Data']['Wire_Bank_Additional_Notes']['Size'] = '50';
    $access['Data']['Wire_Bank_Additional_Notes']['Rows'] = '6';
    $access['Data']['ACH_Bank_Additional_Notes']['Input'] = 'textarea';
    $access['Data']['ACH_Bank_Additional_Notes']['Size'] = '50';
    $access['Data']['ACH_Bank_Additional_Notes']['Rows'] = '6';
    $access['Data']['Wire_Bank_Sort_Code']['Valid'] = '';
    $access['Data']['Wire_Bank_VAT_Number']['Valid'] = '';
    $access['Data']['Wire_Bank_Registration_Number']['Valid'] = '';
    $access['Data']['Wire_Bank_Additional_Notes']['Valid'] = '';
    $access['Data']['Wire_Bank_Additional_Notes']['RowDisplay'] = 'Wide';
    $access['Data']['ACH_Bank_Additional_Notes']['Valid'] = '';
    $access['Data']['ACH_Bank_Additional_Notes']['RowDisplay'] = 'Wide';
    $access['Data']['Wire_Bank_Country']['Style'] = 'width:205px;';
    $access['Data']['Wire_Bank_Country']['Input'] = 'selectcustom';
    $access['Data']['Wire_Bank_Country']['Input_Custom'] = "Select co_ISO,co_full From cs_country";
    $access['Data']['Wire_Bank_Country']['InputAdditional'] = "onchange='" . "\$(\"Wire_Intermediary_Bank_Routing_Number\").setAttribute(\"valid\",(this.value!=\"US\"?\"req\":\"\"));" . "\$(\"Wire_Intermediary_Bank_Routing_Type\").setAttribute(\"valid\",(this.value!=\"US\"?\"req\":\"\"));" . "\$(\"Wire_Intermediary_Bank_Name\").setAttribute(\"valid\",(this.value!=\"US\"?\"req\":\"\"));" . "\$(\"Wire_Intermediary_Bank_City\").setAttribute(\"valid\",(this.value!=\"US\"?\"req\":\"\"));" . "\$(\"Wire_Intermediary_Bank_State\").setAttribute(\"valid\",(this.value!=\"US\"?\"req\":\"\"));" . "';" . ($access['Data']['Wire_Bank_State']['Input'] = 'selectcustom');
    $access['Data']['Wire_Bank_State']['Style'] = 'width:205px;';
    $access['Data']['Wire_Bank_State']['Input_Custom'] = "Select st_abbrev,st_full From cs_states";
    $access['Data']['ACH_Bank_Country']['Style'] = 'width:205px;';
    $access['Data']['ACH_Bank_Country']['Input'] = 'selectcustom';
    $access['Data']['ACH_Bank_Country']['Input_Custom'] = "Select co_ISO,co_full From cs_country";
    $access['Data']['ACH_Bank_State']['Input'] = 'selectcustom';
    $access['Data']['ACH_Bank_State']['Style'] = 'width:205px;';
    $access['Data']['ACH_Bank_State']['Input_Custom'] = "Select st_abbrev,st_full From cs_states";
    $access['Data']['Wire_Intermediary_Bank_Routing_Type']['Input'] = "selectcustomarray";
    $access['Data']['Wire_Intermediary_Bank_Routing_Type']['Input_Custom'] = $etel_routing_types;
    $access['Data']['Wire_Bank_Routing_Type']['Input'] = "selectcustomarray";
    $access['Data']['Wire_Bank_Routing_Type']['Input_Custom'] = $etel_routing_types;
    $access['SubmitValue'] = 'Update Information';
    if ($skipIfComplete) {
        $access['SubmitValue'] = 'Continue to Step 3';
    }
    $access['SubmitName'] = 'submit_step2';
    // Submit
    $showvalidation = false;
    if ($_POST[$access['SubmitName']] || $_POST['Method']) {
        $result = processAccessForm(&$access);
        $showvalidation = true;
    }
    $access['Columns'] = 1;
    // Display Parsing
    foreach ($access['Data'] as $key => $data) {
        $access['Data'][$key]['DisplayName'] = preg_replace('/Wire |ACH /', '', $access['Data'][$key]['DisplayName']);
        if ($access['Data']['Method']['Value'] != 'Wire') {
            if (strpos($key, 'Wire_') !== false) {
                unset($access['Data'][$key]);
            }
            if ($access['Data'][$key]['Name'] == 'access_header' && $access['Data'][$key]['Value'] == 'Wire Banking Info') {
                unset($access['Data'][$key]);
            }
        }
        if ($access['Data']['Method']['Value'] != 'ACH') {
            if (strpos($key, 'ACH_') !== false) {
                unset($access['Data'][$key]);
            }
            if ($access['Data'][$key]['Name'] == 'access_header' && $access['Data'][$key]['Value'] == 'ACH Banking Info') {
                unset($access['Data'][$key]);
            }
        }
    }
    if ($access['Data']['Wire_Bank_Country']['Value'] == 'US') {
        $access['Data']['Wire_Intermediary_Bank_Routing_Type']['Valid'] = '';
        $access['Data']['Wire_Intermediary_Bank_Routing_Number']['Valid'] = '';
        $access['Data']['Wire_Intermediary_Bank_Name']['Valid'] = '';
        $access['Data']['Wire_Intermediary_Bank_City']['Valid'] = '';
        $access['Data']['Wire_Intermediary_Bank_State']['Valid'] = '';
    }
    // Validate
    $valid = true;
    foreach ($access['Data'] as $key => $data) {
        if (!$data['Value'] && $data['Valid']) {
            $valid = false;
            if ($showvalidation) {
                $access['Data'][$key]['Highlight'] = true;
            }
        }
    }
    if (!$valid || !$skipIfComplete) {
        draw_step_buttons(2, $skipIfComplete);
        $access['HeaderMessage'] = "Please Complete all required fields to continue.";
        beginTable();
        writeAccessForm(&$access);
        endTable("Step #2 - Company Information", "");
        include "includes/footer.php";
        die;
    }
}