function epl_pay_profile_manager_fields($epl_fields)
{
    $epl_fields['_pp_pro_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('PayPal PRO'), 'content' => sprintf(epl__('Accept Credit and Debit Cards without having the customer leave your website. Currently available for US and Canada.
                <br />%sMUST USE SSL FOR PCI COMPLIANCE.  You can enable SSL from Events Planner > Settings > Registration tab.%s'), '<br /><span class="epl_font_red"><strong>', '</strong></span>')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_pp_pro'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  You can use text or embed and image.'), 'class' => 'epl_w300', 'required' => true), '_epl_user' => array('input_type' => 'text', 'input_name' => '_epl_user', 'id' => '', 'label' => epl__('API Username'), 'help_text' => epl__('Ex: some_api1.youremailaddress.com'), 'class' => 'epl_w300', 'required' => true), '_epl_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pwd', 'id' => '', 'label' => epl__('API Password'), 'help_text' => epl__('Ex: SDFE23D5SFD324'), 'class' => '_epl_w300', 'required' => true), '_epl_sig' => array('input_type' => 'password', 'input_name' => '_epl_sig', 'id' => '', 'label' => epl__('Signature'), 'help_text' => epl__('Will be a very long string. Ex. SRl31AbcSd9fIqew......'), 'class' => 'epl_w300', 'required' => true), '_epl_accepted_cards' => array('input_type' => 'checkbox', 'input_name' => '_epl_accepted_cards[]', 'label' => epl__('Accepted Cards'), 'auto_key' => true, 'options' => array('Visa' => 'Visa', 'MasterCard' => 'Master Card', 'Discover' => 'Discover', 'Amex' => 'Amex'), 'help_text' => epl__('For Canada, only MasterCard and Visa are allowable and Interac debit cards are not supported.'), 'default_checked' => 1, 'required' => true), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_pp_pro_fields'] = apply_filters('epl_pp_pro_fields', $epl_fields['_pp_pro_fields']);
    $epl_fields['_pp_payflow_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('PayPal PayFlow PRO'), 'content' => sprintf(epl__('Accept Credit and Debit Cards without having the customer leave your website.
                <br />%sMUST USE SSL FOR PCI COMPLIANCE.  You can enable SSL from Events Planner > Settings > Registration tab.%s'), '<br /><span class="epl_font_red"><strong>', '</strong></span>')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_pp_payflow'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  You can use text or embed and image.'), 'class' => 'epl_w300', 'required' => true), '_epl_partner' => array('input_type' => 'text', 'input_name' => '_epl_partner', 'id' => '', 'label' => epl__('Partner'), 'class' => 'epl_w300', 'required' => true), '_epl_vendor' => array('input_type' => 'text', 'input_name' => '_epl_vendor', 'id' => '', 'label' => epl__('Vendor'), 'class' => 'epl_w300', 'required' => true), '_epl_user' => array('input_type' => 'text', 'input_name' => '_epl_user', 'id' => '', 'label' => epl__('User'), 'class' => 'epl_w300', 'required' => true), '_epl_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pwd', 'id' => '', 'label' => epl__('Password'), 'class' => '_epl_w300', 'required' => true), '_epl_accepted_cards' => array('input_type' => 'checkbox', 'input_name' => '_epl_accepted_cards[]', 'label' => epl__('Accepted Cards'), 'auto_key' => true, 'options' => array('Visa' => 'Visa', 'MasterCard' => 'Master Card', 'Discover' => 'Discover', 'Amex' => 'Amex'), 'help_text' => epl__('For Canada, only MasterCard and Visa are allowable and Interac debit cards are not supported.'), 'default_checked' => 1, 'required' => true), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_pp_payflow_fields'] = apply_filters('epl_pp_payflow_fields', $epl_fields['_pp_payflow_fields']);
    $epl_fields['_auth_net_aim_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('Authorize.net AIM'), 'content' => sprintf(epl__('Accept Credit and Debit Cards without having the customer leave your website. %sMUST USE SSL FOR PCI COMPLIANCE.
                You can enable SSL from Events Planner > Settings > Registration tab.%s'), '<br /><span class="epl_font_red"><strong>', '</strong></span>')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_auth_net_aim'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  Ex. Credit Card.'), 'class' => 'epl_w300', 'required' => true), '_epl_user' => array('input_type' => 'password', 'input_name' => '_epl_user', 'id' => '', 'label' => epl__('API Login ID'), 'help_text' => epl__('This number can be obtained by logging into Authorize.net > Account > API Login ID and Transaction Key'), 'class' => 'epl_w300', 'required' => true), '_epl_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pwd', 'id' => '', 'label' => epl__('API Transactioin Key'), 'class' => 'epl_w300', 'required' => true), '_epl_accepted_cards' => array('input_type' => 'checkbox', 'input_name' => '_epl_accepted_cards[]', 'label' => epl__('Accepted Cards'), 'auto_key' => true, 'options' => array('Visa' => 'Visa', 'MasterCard' => 'Master Card', 'Discover' => 'Discover', 'Amex' => 'Amex'), 'class' => ''), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_auth_net_aim_fields'] = apply_filters('epl_auth_net_aim_fields', $epl_fields['_auth_net_aim_fields']);
    $epl_fields['_auth_net_sim_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('Authorize.net SIM'), 'content' => epl__('Accept credit cards on Authorize.net hosted page.')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_auth_net_sim'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  Ex. Credit Card.'), 'class' => 'epl_w300', 'required' => true), '_epl_user' => array('input_type' => 'password', 'input_name' => '_epl_user', 'id' => '', 'label' => epl__('API Login ID'), 'help_text' => epl__('This number can be obtained by logging into Authorize.net > Account > API Login ID and Transaction Key'), 'class' => 'epl_w300', 'required' => true), '_epl_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pwd', 'id' => '', 'label' => epl__('API Transactioin Key'), 'class' => 'epl_w300', 'required' => true), '_epl_md5_hash' => array('input_type' => 'password', 'input_name' => '_epl_md5_hash', 'id' => '', 'label' => 'MD5 Hash', 'class' => 'epl_w300', 'required' => true, 'help_text' => 'If you entered an MD5 Hash in your authorize.net account admin settings, enter it here also.'), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_auth_net_sim_fields'] = apply_filters('epl_auth_net_sim_fields', $epl_fields['_auth_net_sim_fields']);
    $epl_fields['_qbmc_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('QuickBooks Merc. Serv.'), 'content' => sprintf(epl__('Accept Credit and Debit Cards using QuickBooks Merchant Services. %sMUST USE SSL FOR PCI COMPLIANCE.
                You can enable SSL from Events Planner > Settings > Registration tab.%s'), '<br /><span class="epl_font_red"><strong>', '</strong></span>')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_qbmc'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  Ex. Credit Card.'), 'class' => 'epl_w300', 'required' => true), '_epl_user' => array('input_type' => 'password', 'input_name' => '_epl_user', 'id' => '', 'label' => epl__('Application Login'), 'help_text' => '', 'class' => 'epl_w300', 'required' => true), '_epl_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pwd', 'id' => '', 'label' => epl__('Connection Ticket'), 'class' => 'epl_w300', 'required' => true), '_epl_accepted_cards' => array('input_type' => 'checkbox', 'input_name' => '_epl_accepted_cards[]', 'label' => epl__('Accepted Cards'), 'options' => array('Visa' => 'Visa', 'MasterCard' => 'Master Card', 'Discover' => 'Discover', 'Amex' => 'Amex'), 'class' => ''), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_qbmc_fields'] = apply_filters('epl_qbmc_fields', $epl_fields['_qbmc_fields']);
    $epl_fields['_check_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('Checks/Money Orders'), 'content' => epl__('You can use this to give your customers the ability to pay using a Check.')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_check'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Display Label'), 'help_text' => epl__('What the customer will see as an option.'), 'class' => 'epl_w300'), '_epl_check_payable_to' => array('input_type' => 'text', 'input_name' => '_epl_check_payable_to', 'id' => '_epl_form_label', 'label' => epl__('Make Payable To'), 'help_text' => epl__('Who will get this check?'), 'class' => 'epl_w300', 'required' => true), '_epl_check_address' => array('input_type' => 'textarea', 'input_name' => '_epl_check_address', 'label' => epl__('Send Payment To'), 'help_text' => epl__('The address.'), 'class' => 'epl_w300'), '_epl_instructions' => array('input_type' => 'textarea', 'input_name' => '_epl_instructions', 'id' => '', 'label' => epl__('Instructions'), 'help_text' => epl__('Special Instruction to the customer.'), 'class' => 'epl_w300'), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''), '_epl_pay_discount_amount' => array('input_type' => 'text', 'input_name' => '_epl_pay_discount_amount', 'label' => epl__('Discount for using this payment method'), 'help_text' => epl__('Leave empty if no discount.  Enter in 3.00 or 0.1 format.  Please note that this amount is applied before any other discount.'), 'class' => 'epl_w40'), '_epl_pay_discount_type' => array('input_type' => 'select', 'input_name' => '_epl_pay_discount_type', 'label' => epl__('Discount Type'), 'options' => array(5 => epl__('Fixed'), 10 => epl__('Percent'))), '_epl_pay_discount_label' => array('input_type' => 'text', 'input_name' => '_epl_pay_discount_label', 'label' => epl__('Discount label'), 'class' => 'epl_w300'));
    $epl_fields['_check_fields'] = apply_filters('epl_check_fields', $epl_fields['_check_fields']);
    $epl_fields['_cash_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('Cash'), 'content' => epl__('You can use this to give your customers the ability to pay using Cash.')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_cash'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Display Label'), 'help_text' => epl__('What the customer will see as an option.'), 'class' => 'epl_w300'), '_epl_instructions' => array('input_type' => 'textarea', 'input_name' => '_epl_instructions', 'id' => '', 'label' => epl__('Instructions'), 'help_text' => epl__('Special Instruction to the customer.'), 'class' => 'epl_w300'), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''), '_epl_pay_discount_amount' => array('input_type' => 'text', 'input_name' => '_epl_pay_discount_amount', 'label' => epl__('Discount for using this payment method'), 'help_text' => epl__('Leave empty if no discount.  Enter in 3.00 or 0.1 format.  Please note that this amount is applied before any other discount.'), 'class' => 'epl_w40'), '_epl_pay_discount_type' => array('input_type' => 'select', 'input_name' => '_epl_pay_discount_type', 'label' => epl__('Discount Type'), 'options' => array(5 => epl__('Fixed'), 10 => epl__('Percent'))), '_epl_pay_discount_label' => array('input_type' => 'text', 'input_name' => '_epl_pay_discount_label', 'label' => epl__('Discount label'), 'class' => 'epl_w300'));
    $epl_fields['_cash_fields'] = apply_filters('epl_cash_fields', $epl_fields['_cash_fields']);
    $epl_fields['_payson_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('PAYSON'), 'content' => epl__('Safely and securely accept payments on hosted Payson servers.')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_payson'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  Ex. Credit Card.'), 'class' => 'epl_w300', 'required' => true), '_epl_seller_email' => array('input_type' => 'text', 'input_name' => '_epl_seller_email', 'id' => '', 'label' => epl__('Seller Email'), 'class' => 'epl_w300', 'required' => true), '_epl_user' => array('input_type' => 'password', 'input_name' => '_epl_user', 'id' => '', 'label' => epl__('Agent ID'), 'help_text' => epl__('This number can be obtained by logging into Authorize.net > Account > API Login ID and Transaction Key'), 'class' => 'epl_w300', 'required' => true), '_epl_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pwd', 'id' => '', 'label' => epl__('MD5'), 'class' => 'epl_w300', 'required' => true), '_epl_selected_by_default' => array('input_type' => 'radio', 'input_name' => '_epl_selected_by_default', 'id' => '', 'label' => epl__('Assign by default to new events?'), 'options' => epl_yes_no(), 'display_inline' => true, 'default_value' => 0, 'help_text' => epl__('When you create new events, this paymetn profile will be automatically assigned to that event.'), 'required' => true), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_payson_fields'] = apply_filters('epl_payson_fields', $epl_fields['_payson_fields']);
    $epl_fields['_moneris_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('Moneris Hosted Paypage'), 'content' => epl__('Accept payments using Moneris Hosted Paypage.')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_moneris'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  Ex. Credit Card.'), 'class' => 'epl_w300', 'required' => true), '_epl_moneris_country' => array('input_type' => 'select', 'input_name' => '_epl_moneris_country', 'label' => epl__('Version'), 'options' => array('ca' => epl__('Canada'), 'usa' => epl__('USA')), 'class' => ''), '_epl_user' => array('input_type' => 'password', 'input_name' => '_epl_user', 'id' => '', 'label' => epl__('Store ID') . ', ' . epl__('HHP_id for USA'), 'help_text' => '', 'class' => 'epl_w300', 'required' => true), '_epl_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pwd', 'id' => '', 'label' => epl__('HPP Key'), 'class' => 'epl_w300', 'required' => true), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_pay_urls' => array('input_type' => 'section', 'label' => epl__('Your paypage urls'), 'content' => epl__('Approved URL:') . ' ' . add_query_arg(array('epl_action' => '_moneris_process'), epl_get_sortcode_url()) . '<br />' . epl__('Decline URL:') . ' ' . add_query_arg(array('epl_action' => '_moneris_process'), epl_get_sortcode_url())), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_moneris_fields'] = apply_filters('epl_moneris_fields', $epl_fields['_moneris_fields']);
    $epl_fields['_firstdata_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('Firstdata'), 'content' => sprintf(epl__('Accept Credit and Debit Cards without having the customer leave your website. %sMUST USE SSL FOR PCI COMPLIANCE.
                You can enable SSL from Events Planner > Settings > Registration tab.%s'), '<br /><span class="epl_font_red"><strong>', '</strong></span>')), '_epl_pay_pem_location' => array('input_type' => 'section', 'content' => epl_wrap('<span class="epl_font_red">', '<span>', sprintf(epl__('Please place your .pem file in %s'), epl_upload_dir_path(true) . 'firstdata/'))), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_firstdata'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  Ex. Credit Card.'), 'class' => 'epl_w300', 'required' => true), '_epl_user' => array('input_type' => 'password', 'input_name' => '_epl_user', 'id' => '', 'label' => epl__('Store Number'), 'class' => 'epl_w300', 'required' => true), '_epl_accepted_cards' => array('input_type' => 'checkbox', 'input_name' => '_epl_accepted_cards[]', 'label' => epl__('Accepted Cards'), 'auto_key' => true, 'required' => true, 'options' => array('Visa' => 'Visa', 'MasterCard' => 'Master Card', 'Discover' => 'Discover', 'Amex' => 'Amex'), 'class' => ''), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_firstdata_fields'] = apply_filters('epl_firstdata_fields', $epl_fields['_firstdata_fields']);
    $epl_fields['_usa_epay_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('USA ePay'), 'content' => sprintf(epl__('Accept Credit and Debit Cards without having the customer leave your website. %sMUST USE SSL FOR PCI COMPLIANCE.
                You can enable SSL from Events Planner > Settings > Registration tab.%s'), '<br /><span class="epl_font_red"><strong>', '</strong></span>')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_usa_epay'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  Ex. Credit Card.'), 'class' => 'epl_w300', 'required' => true), '_epl_pwd' => array('input_type' => 'password', 'input_name' => '_epl_pwd', 'id' => '', 'label' => epl__('Merchant Key'), 'class' => 'epl_w300', 'required' => true), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_usa_epay_fields'] = apply_filters('epl_usa_epay_fields', $epl_fields['_usa_epay_fields']);
    $epl_fields['_stripe_fields'] = array('_epl_pay_help' => array('input_type' => 'section', 'label' => epl__('Stripe'), 'content' => sprintf(epl__('Accept Credit and Debit Cards without having the customer leave your website. %sMUST USE SSL FOR PCI COMPLIANCE.
                You can enable SSL from Events Planner > Settings > Registration tab.%s'), '<br /><span class="epl_font_red"><strong>', '</strong></span>')), '_epl_pay_type' => array('input_type' => 'hidden', 'input_name' => '_epl_pay_type', 'default_value' => '_stripe'), '_epl_pay_display' => array('input_type' => 'textarea', 'input_name' => '_epl_pay_display', 'id' => '', 'label' => epl__('Label'), 'help_text' => epl__('What the customer will see as an option.  Ex. Credit Card.'), 'class' => 'epl_w300', 'required' => true), '_epl_secret_key' => array('input_type' => 'password', 'input_name' => '_epl_secret_key', 'id' => '', 'label' => epl__('Secret Key'), 'class' => 'epl_w300', 'required' => true), '_epl_publishable_key' => array('input_type' => 'password', 'input_name' => '_epl_publishable_key', 'id' => '', 'label' => epl__('Publishable Key'), 'class' => 'epl_w300', 'required' => true), '_epl_sandbox' => array('input_type' => 'select', 'input_name' => '_epl_sandbox', 'label' => epl__('Test Mode?'), 'options' => epl_yes_no(), 'help_text' => epl__('If yes, please make sure you use Sandbox credentials above.'), 'class' => ''), '_epl_default_selected' => array('input_type' => 'select', 'input_name' => '_epl_default_selected', 'label' => epl__('Automatically assign to all new events?'), 'options' => epl_yes_no(), 'help_text' => epl__('If this option is set to yes, all future events will have this payment profile automatically selected as a payment choice.'), 'class' => ''));
    $epl_fields['_usa_epay_fields'] = apply_filters('epl_usa_epay_fields', $epl_fields['_usa_epay_fields']);
    return $epl_fields;
}
 function firstdata_process()
 {
     global $event_details, $cart_totals;
     $event_id = $event_details['ID'];
     $regis_id = $this->erm->get_regis_id();
     $post_ID = $this->erm->get_regis_post_id();
     $this->ecm->setup_event_details($event_id);
     $_totals = $this->erm->calculate_cart_totals(true);
     $gateway_info = $this->erm->get_gateway_info();
     $host = "staging.linkpt.net";
     if ($gateway_info['_epl_sandbox'] == 0) {
         $host = "secure.linkpt.net";
     }
     //$pem_file = get_attached_file( $gateway_info['_epl_pem_file'] );
     $pem_file = epl_upload_dir_path() . "firstdata/{$gateway_info['_epl_user']}.pem";
     $payment_amount = epl_get_element_m('pay_deposit', 'money_totals', $cart_totals) == 1 ? epl_get_element_m('min_deposit', 'money_totals', $cart_totals, $cart_totals['money_totals']['grand_total']) : $cart_totals['money_totals']['grand_total'];
     $this->epl->load_file('libraries/gateways/firstdata/lphp.php');
     $_tolphp = array();
     $lphp = new lphp();
     //$_tolphp["debugging"] = ($gateway_info['_epl_sandbox'] == 10); //set to true to see debug message
     $_tolphp["host"] = $host;
     $_tolphp["port"] = "1129";
     $_tolphp["keyfile"] = $pem_file;
     $_tolphp["configfile"] = $gateway_info['_epl_user'];
     $_tolphp["ordertype"] = "SALE";
     $_tolphp["result"] = "LIVE";
     # LIVE for live, for test set to GOOD, DECLINE, DUPLICATE
     $_tolphp["cardnumber"] = $_POST['_epl_cc_num'];
     $_tolphp["cardexpmonth"] = date('m', strtotime($_POST['_epl_cc_exp_month']));
     $_tolphp["cardexpyear"] = substr($_POST['_epl_cc_exp_year'], 0 - 2);
     $_tolphp["chargetotal"] = epl_get_balance_due();
     $_tolphp["name"] = $_POST['_epl_cc_first_name'] . ' ' . $_POST['_epl_cc_last_name'];
     $_tolphp["address1"] = $_POST['_epl_cc_address'];
     $_tolphp["city"] = $_POST["_epl_cc_city"];
     $_tolphp["state"] = $_POST["_epl_cc_state"];
     $_tolphp["zip"] = $_POST["_epl_cc_zip"];
     $_tolphp["phone"] = epl_get_element('_epl_cc_phone', $_POST, '');
     $_tolphp["email"] = epl_get_element('_epl_cc_email', $_POST, '');
     $addrnum = $_POST['_epl_cc_address'];
     $temp_address = explode(" ", $_POST['_epl_cc_address']);
     if (count($temp_address) > 0) {
         $addrnum = $temp_address[0];
     }
     $_tolphp["addrnum"] = $addrnum;
     $result = $lphp->curl_process($_tolphp);
     if (is_array($result) && $result['r_approved'] == 'APPROVED') {
         // Payment successful
         $data['post_ID'] = $post_ID;
         $data['_epl_grand_total'] = $cart_totals['money_totals']['grand_total'];
         $data['_epl_payment_amount'] = $cart_totals['money_totals']['grand_total'];
         $data['_epl_payment_date'] = current_time('mysql');
         $data['_epl_payment_method'] = $this->erm->get_payment_profile_id();
         $data['_epl_transaction_id'] = $result['r_ref'];
         $data['_epl_prediscount_total'] = epl_get_element('pre_discount_total', $cart_totals['money_totals'], 0);
         $data['_epl_discount_amount'] = epl_get_element('discount_amount', $cart_totals['money_totals'], 0);
         $data = apply_filters('epl_firstdata_response_data', $data, $result);
         $this->erm->update_payment_data($data);
         return true;
     } else {
         return '<div class="epl_error">ERROR: ' . $result['r_error'] . '</div>';
     }
 }
 function make_pdf($data, $save = false, $force = false, $attachment = true, $paper = 'portrait')
 {
     if (($force || epl_get_element('pdf', $_REQUEST, 0) == 1) && $data != '') {
         //$r = $this->epl->load_view( 'admin/template', $data, true );
         //images will not render correctly on some hosts
         $data = str_ireplace(home_url(), ABSPATH, $data);
         $this->epl->load_file('libraries/dompdf/dompdf_config.inc.php');
         if (get_magic_quotes_gpc()) {
             $r = stripslashes($data);
         }
         $dompdf = new DOMPDF();
         $dompdf->load_html($data);
         $dompdf->set_paper('', $paper);
         $dompdf->render();
         $file_name = date('Y-m-d-h-i-s', time()) . '.pdf';
         if ($save) {
             $pdf = $dompdf->output();
             $full_path = epl_upload_dir_path() . $file_name;
             file_put_contents($full_path, $pdf);
             return $full_path;
         }
         $dompdf->stream($file_name, array("Attachment" => $attachment));
         exit(0);
     }
     return $data;
 }