<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts Multicart                     |
// +----------------------------------------------------------------------+
// | Authors: Programmer<programmer@armia.com>        		              |
// +----------------------------------------------------------------------+
// | Copyrights Armia Systems, Inc and iScripts.com ? 2005                |
// | All rights reserved                                                  |
// +----------------------------------------------------------------------+
// | This script may not be distributed, sold, given away for free to     |
// | third party, or used as a part of any internet services such as      |
// | webdesign etc.                                                       |
// +----------------------------------------------------------------------+
?>
<?php
include "../includes/config.php";
include "../includes/session.php";
include "../includes/functions.php";
include "../includes/arrays.inc.php";


if (get_magic_quotes_gpc()) {
    $_POST = array_map('stripslashes_deep', $_POST);
    $_GET = array_map('stripslashes_deep', $_GET);
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}

if (isset($_SESSION["sess_adminname"]) and $_SESSION["sess_adminname"] != "") {
    $adminname = $_SESSION["sess_adminname"];
} else {
    header("Location:login.php");
    exit;
}

$select_shipping_settings = "SELECT * FROM " . $tableprefix . "shipping_settings";
$result_shipping_settings = mysql_query($select_shipping_settings) or die(mysql_error());

if (mysql_num_rows($result_shipping_settings) > 0) {
    $rs_ship = mysql_fetch_array($result_shipping_settings);

    $ups_weight = $rs_ship['nShippingweight'];
    $ups_rate = $rs_ship['ups_rate'];
    $ups_container = $rs_ship['container_type'];
    $ups_type = $rs_ship['address_quote_method'];
} // end if


$adminpaymentmode = '';

$sellerpaymentmode = '';
//echo getSettingsValue('enable_buyerToseller');


include "../includes/htmltop.php";

$message = "";

$txtBluePayLoginId = trim($_POST["txtBluePayLoginId"]);
$txtBluePayTransKey = trim($_POST["txtBluePayTransKey"]);
$chkBluePayTestMode = isset($_POST["chkBluePayTestMode"]) ? 'Y' : 'N';
$chkStripeTestMode = $_POST["stripe_payment_test_mode"];




$txtAuthorizeLoginId = trim($_POST["txtAuthorizeLoginId"]);
$txtAuthorizeTransKey = trim($_POST["txtAuthorizeTransKey"]);

$txtAuthorizeEmail = trim($_POST["txtAuthorizeEmail"]);
$chkAuthorizeTestMode = $_POST["chkAuthorizeTestMode"];


$txtStripeSecretKey = trim($_POST["stripe_secretkey"]);
$txtStripePublishKey = trim($_POST["stripe_publish_key"]);


$txtPaypalEmail = trim($_POST["txtPaypalEmail"]);



$txtPaypalIDTOKEN = trim($_POST["txtPaypalIDTOKEN"]);


$txtGoogleMerchantId = $_POST["txtGoogleMerchantId"];
$txtGoogleMerchantKey = $_POST["txtGoogleMerchantKey"];

$txtGoogleMode      = $_POST["google_mode"];


// Your Pay Payment Details section

$txtYourPayStoreId = $_POST['txtYourPayId'];
$txtYourPayUserId = $_POST['txtYourPayUserId'];
$txtyourpay_mode = $_POST['txtyourpay_mode'];
$txtYourPayBuffer = $_POST['txtYourPayBuffer'];
//=======================Worldpay Payment Details===========================
$worldpayTestmode = $_POST['worldpay_testmode'];
$txtworldpayEmail = $_POST['txtworldpayEmail'];
$worldpay_transact_method = $_POST['worldpay_transact_method'];
$worldpay_inst_Id = $_POST['worldpay_inst_Id'];

//=======================End Payment Details===============================
$default_flatrate = trim($_POST['rate_fistitem']);
$flatrate_additional = trim($_POST['rate_additional']);

$flatrate_name = trim($_POST['flatrate_name']);

$txtcreditcard = $_POST['txtcreditcard'];

/* $txtEnableAuthorize = 'N';

  $txtEnableYourPay = 'N';

  if($txtcreditcard=='authorize')
  {
  $txtEnableAuthorize = 'Y';
  }

  if($txtcreditcard=='firstdata')
  {
  $txtEnableYourPay = 'Y';
  }
 */

$txtEnableYourPay = isset($_POST['txtcreditcardFirstData']) ? 'Y' : 'N';
$txtEnableAuthorize = isset($_POST['txtcreditcardAuthorize']) ? 'Y' : 'N';
$txtEnableBluePay = isset($_POST['txtcreditcardBluePay']) ? 'Y' : 'N';
$txtEnableWorldPay = isset($_POST['enableworldpay']) ? 'Y' : 'N';
$txtEnableStripe = isset($_POST['stripe_payment_enable']) ? 'Y' : 'N';

$txtEnableDwolla     = isset($_POST['enableDwollaCheck']) ? 'Y' : 'N';
$txtDwollaMode      = $_POST["dwolla_mode"];


$txtDwollakey       = trim($_POST["dwolla_key"]);
$txtDwollaSecretKey = trim($_POST["dwolla_secretkey"]);

(isset($_POST['enable_google'])) ? $txtEnableAd = $_POST['enable_google'] : $txtEnableAd = 'N';
(isset($_POST['enableGoogleCheck'])) ? $txtEnableGoogleCheck = $_POST['enableGoogleCheck'] : $txtEnableGoogleCheck = 'N';
(isset($_POST['enableMoreImages'])) ? $txtEnableMoreImages = $_POST['enableMoreImages'] : $txtEnableMoreImages = 'N';
(isset($_POST['enableworldpay']))?$chkworldpay=$_POST['enableworldpay']:$chkworldpay='N';



if ($chkAuthorizeTestMode == "on") {
    $chkAuthorizeTestMode = "Y";
} else {
    $chkAuthorizeTestMode = "N";
}

if ($_POST["chkPaypal"]) {



    $chkPaypal = "Y";
} else {



    $chkPaypal = "N";
}




$chkSandbox = "N";

if ($_POST["chkSandbox"] == "Y") {
    $chkSandbox = "Y";
}


if ($_POST["chkSandbox1"] == "Y") {

    $chkSandbox = "Y";
}




$txtPaypalUsername = trim($_POST["txtPaypalUsername"]);
$txtPaypalPassword = trim($_POST["txtPaypalPassword"]);
$txtPaypalSignature = trim($_POST["txtPaypalSignature"]);
$txtPaypalApplicationId = trim($_POST["txtPaypalApplicationId"]);


if (isset($_POST["btnSaveChanges"])) {
    $message = "";


    // payment Mode

    $payMode = $_POST['txtPaymentMode'];

    if ($payMode == 'admin') {
        $txtsellerPaymentMode = 'N';
    }

    if ($payMode == 'seller') {
        $txtsellerPaymentMode = 'Y';
        $txtPaypalEmail = trim($_POST["txtPaypalEmailDir"]);
    }

    if ($txtEnableAuthorize == 'Y' && $txtEnableYourPay == 'Y') {
        $message .= MSG_CHOOSE_PAYMENT."<br>";
    }
     /* ------Dwolla Checking -------- */
    if ($txtEnableDwolla == "Y") {

        if (!isNotNull($txtDwollakey)) {
            $message .= MSG_DWOLlA_API_KEY_IS_REQUIRED."<br>";
        }
       
        if (!isNotNull($txtDwollaSecretKey)) {
            $message .= MSG_DWOLlA_API_SECRET_KEY_IS_REQUIRED."<br>";
        }
        
    }
    /* ------Authorize .Net Checking--------- */
    if ($txtEnableAuthorize == "Y") {

        if (!isNotNull($txtAuthorizeLoginId)) {
            $message .= MSG_AUTHORIZE_LOGIN_ID_IS_REQUIRED."<br>";
        }
        //if (!isNotNull($txtAuthorizePassword)) {
        //$message .= "* Authorize Password is required! <br>";
        //}
        if (!isNotNull($txtAuthorizeTransKey)) {
            $message .= MSG_AUTHORIZE_TRANSACTION_KEY_IS_REQUIRED."<br>";
        }
        if (!isNotNull($txtAuthorizeEmail)) {
            $message .= MSG_AUTHORIZE_EMAIL_IS_REQUIRED."<br>";
        } else {
            if (!isValidEmail($txtAuthorizeEmail)) {
                $message .= MSG_AUTHORIZE_EMAIL_INVALID."<br>";
            }
        }
    }
    
    /* ------Stripe Payment Checking--------- */
    if ($txtEnableStripe == "Y") {

        if (!isNotNull($txtStripePublishKey)) {
            $message .= MSG_STRIPE_PUBLISH_KEY_IS_REQUIRED."<br>";
        }
       
        if (!isNotNull($txtStripeSecretKey)) {
            $message .= MSG_STRIPE_SECRET_KEY_IS_REQUIRED."<br>";
        }
        
    }

    if ($txtEnableBluePay == "Y") {

        if (!isNotNull($txtBluePayLoginId)) {
            $message .= MSG_BLUEPAY_LOGIN_ID_IS_REQUIRED." <br>";
        }
        //if (!isNotNull($txtAuthorizePassword)) {
        //$message .= "* Authorize Password is required! <br>";
        //}
        if (!isNotNull($txtBluePayTransKey)) {
            $message .= MSG_BLUEPAY_SECRETKEY_IS_REQUIRED."<br>";
        }
    }

    if ($txtEnableWorldPay == "Y") {
        if (!isNotNull($txtworldpayEmail)) {
            $message .= MSG_WORLDPAY_EMAIL_IS_REQUIRED."<br>";
        }

        if (!isNotNull($worldpay_inst_Id)) {
            $message .= MSG_WORLDPAY_INSTALLATION_ID_IS_REQUIRED. "<br>";
        }
    }
    if ($chkPaypal == "Y") {
        if (!isNotNull($txtPaypalEmail)) {
            $message .= PAYAL_EMAIL_EMPTY."<br>";
        } else {
            if (!isValidEmail($txtPaypalEmail)) {
                $message .= PAYPAL_EMAIL_INVALID."<br>";
            }
        }
        /* if ( !isNotNull($txtPaypalIDTOKEN)) {
          $message .= "* Paypal Identity token is empty<br>";
          } */
    } else if (isNotNull($txtPaypalEmail)) {
        if (!isValidEmail($txtPaypalEmail)) {
            $message .= PAYPAL_EMAIL_INVALID."<br>";
        }
    }

    /* --------------paypal Parralel payment-------- */

    if ($txtsellerPaymentMode == 'Y') {
        if (!isNotNull($txtPaypalUsername)) {
            $message .= PAYPAL_API_USER_NAME_EMPTY."<br>";
        }

        if (!isNotNull($txtPaypalPassword)) {
            $message .= PAYPAL_API_PASSWORD_EMPTY."<br>";
        }

        if (!isNotNull($txtPaypalSignature)) {
            $message .= PAYPAL_API_SIGNATURE_EMPTY."<br>";
        }
        if (!isNotNull($txtPaypalApplicationId)) {
            $message .= PAYPAL_API_ID_EMPTY."<br>";
        }
    }
    /* ----------Google Checkout----------------- */

    if ($txtEnableGoogleCheck == "Y") {
        if (!isNotNull($txtGoogleMerchantId)) {
            $message .= MSG_GOOGLE_CHECKOUT_MERCHANT_ID_EMPTY."<br>";
        }
        if (!isNotNull($txtGoogleMerchantKey)) {
            $message .= MSG_GOOGLE_CHECKOUT_MERCHANT_KEY_EMPTY."<br>";
        }
    }


    /* ---------------------Your Pay--------------------- */
    $txtYourPayCertificate = getSettingsValue('vyourpay_certificate_file');

    if ($txtEnableYourPay == "Y") {

        if (!isNotNull($txtYourPayStoreId)) {
            $message .= MSG_YOURPAY_STORE_ID_EMPTY."<br>";
        }

        if (!isNotNull($txtYourPayUserId)) {
            $message .= MSG_YOURPAY_USER_ID_EMPTY."<br>";
        }


        if ($_FILES['txtYourPayCertificate']['name'] != '') {

            $txtYourPayCertificate = $_FILES['txtYourPayCertificate']['name'];

            $file_extension = end(explode('.', $_FILES['txtYourPayCertificate']['name']));

            if ($_FILES['txtYourPayCertificate']['type'] == 'application/octet-stream' || $file_extension == "pem") {
                if (move_uploaded_file($_FILES['txtYourPayCertificate']['tmp_name'], "../pem/" . $_FILES['txtYourPayCertificate']['name'])) {
                    chmod("../pem/" . $_FILES['txtYourPayCertificate']['name'], 0777);


                    $txtYourPayBuffer = getSettingsValue('vyourpay_certificate_file');

                    if ($txtYourPayBuffer != "") {
                        unlink("../pem/" . $txtYourPayBuffer);
                    }
                    //$txtYourPayBuffer = $_FILES['txtYourPayCertificate']['name'];
                }
            } else {

                $message .= MSG_INVALID_CERTIFICATE_FILE."<br>";
            }
        } else {

            $txtYourPayCertificate = getSettingsValue('vyourpay_certificate_file');
        }


        if (!isNotNull($txtYourPayCertificate)) {
            $message .= MSG_UPLOAD_CERTIFICATE_FILE." <br>";
        }
    }









    //txtPaypalIDTOKEN
    if ($logofilename == "") {
        $logofilename = $logoimage;
    } else {

        /* -------Multicart 2.0 Upgradation starts-------- */


        //$logoimagedest="../images/$logofilename";

        $logoimagedest = "../banners/$logofilename";

        if (move_uploaded_file($_FILES['userfile']['tmp_name'][0], $logoimagedest)) {

            chmod($logoimagedest, 0777);
            $logo_value = getSettingsValue('site_logo');
        } else {
            $logofilename = $logoimage;
        }
    }
    /* -------Multicart 2.0 Upgradation ends-------- */

    if ($message != "") { // error
        $message = "<br>".MSG_CORRECT_THE_ERRORS."<br>" . $message;
        $sql_google = "SELECT vgooglecheck_mode,vyourpay_mode,dwolla_payment_test_mode FROM " . $tableprefix . "settings WHERE 1";
        $result_google = mysql_query($sql_google);
        $google_row = mysql_fetch_assoc($result_google);

        switch ($google_row['vgooglecheck_mode']) {

            case "YES":$google_test = "selected";
                break;
            case "NO":$google_live = "selected";
                break;
        }

        $google_check_input = "<select name='google_mode' class='textarea'>
                                                                        <option {$google_test} value='YES'>".TEST."</option>
                                                                        <option {$google_live} value='NO'>".LIVE."</option>
                                                                  </select>";
                                                                        
          switch ($google_row['dwolla_payment_test_mode']) {

            case "Y":$dwolla_test = "selected";
                break;
            case "N":$dwolla_live = "selected";
                break;
        }

        $dwolla_check_input = "<select name='dwolla_mode' class='textarea'>
                                                                        <option {$dwolla_test} value='Y'>".TEST."</option>
                                                                        <option {$dwolla_live} value='N'>".LIVE."</option>
                                                                  </select>";


        switch ($google_row['vyourpay_mode']) {

            case "YES":$google_test = "selected";
                break;
            case "NO":$google_live = "selected";
                break;
        }
    }//end if
    else { // no error so insert user details
        $sql = "UPDATE " . $tableprefix . "settings SET

                                        vauthorize_enable 			= 	" . GetSQLValueString($txtEnableAuthorize, "text") . ",
                                        authorize_loginid 			= 	" . GetSQLValueString($txtAuthorizeLoginId, "text") . ",
                                        authorize_transkey 			= 	" . GetSQLValueString($txtAuthorizeTransKey, "text") . ",

                                        authorize_email 			= 	" . GetSQLValueString($txtAuthorizeEmail, "text") . ",

                                        vgoogle_check_enable 		= 	" . GetSQLValueString($txtEnableGoogleCheck, "text") . ",
                                        vgooglecheck_id 	   	    = 	" . GetSQLValueString($txtGoogleMerchantId, "text") . ",
                                        vgooglecheck_key 			= 	" . GetSQLValueString($txtGoogleMerchantKey, "text") . ",
                                        vgooglecheck_mode 			= 	" . GetSQLValueString($txtGoogleMode, "text") . ",
                                            
                                        dwolla_payment_enable 		= 	" . GetSQLValueString($txtEnableDwolla, "text") . ",
                                        dwolla_key 	   	    = 	" . GetSQLValueString($txtDwollakey, "text") . ",
                                        dwolla_secretkey 			= 	" . GetSQLValueString($txtDwollaSecretKey, "text") . ",
                                        dwolla_payment_test_mode 			= 	" . GetSQLValueString($txtDwollaMode, "text") . ",
                                        stripe_payment_enable                   = 	" . GetSQLValueString($txtEnableStripe, "text") . ",
                                        stripe_payment_test_mode 	   	= 	" . GetSQLValueString($chkStripeTestMode, "text") . ",
                                        stripe_publish_key 			= 	" . GetSQLValueString($txtStripePublishKey, "text") . ",
                                        stripe_secretkey 			= 	" . GetSQLValueString($txtStripeSecretKey, "text") . ",
                                        vyourpay_enable 			= 	" . GetSQLValueString($txtEnableYourPay, "text") . ",
                                        vyourpay_storeid 			= 	" . GetSQLValueString($txtYourPayStoreId, "text") . ",
                                        vyourpay_userid 			= 	" . GetSQLValueString($txtYourPayUserId, "text") . ",
                                        vyourpay_certificate_file 	= 	" . GetSQLValueString($txtYourPayCertificate, "text") . ",
                                        vyourpay_mode  				= 	" . GetSQLValueString($txtyourpay_mode, "text") . ",
                                        paypal_api_username 		= 	" . GetSQLValueString($txtPaypalUsername, "text") . ",
                                        paypal_api_password 		= 	" . GetSQLValueString($txtPaypalPassword, "text") . ",
                                        paypal_api_signature 		= 	" . GetSQLValueString($txtPaypalSignature, "text") . ",
                                        paypal_application_app_id 	= 	" . GetSQLValueString($txtPaypalApplicationId, "text") . ",
                                        enableworldpay 				=	" . GetSQLValueString($txtEnableWorldPay, "text") . ",
                                        worldpay_testmode			=	" . GetSQLValueString($worldpayTestmode, "text") . ",
                                        worldpay_email			    =	" . GetSQLValueString($txtworldpayEmail, "text") . ",
                                        worldpay_transact_method	=	" . GetSQLValueString($worldpay_transact_method, "text") . ",
                                        worldpay_inst_Id			=   " . GetSQLValueString($worldpay_inst_Id, "text") . ",
                                        enablepaypal 				= 	" . GetSQLValueString($chkPaypal, "text") . ",
                                        enablepaypalsandbox 		= 	" . GetSQLValueString($chkSandbox, "text") . ",
                                        paypalemail 				= 	" . GetSQLValueString($txtPaypalEmail, "text") . ",
                                        paypalidentitytoken 		= 	" . GetSQLValueString($txtPaypalIDTOKEN, "text") . ",
                                        enable_buyerToseller            =       " . GetSQLValueString($txtsellerPaymentMode, "text") . ",
                                        authorize_test_mode 		= 	" . GetSQLValueString($chkAuthorizeTestMode, "text") . ",
                                        vbluepay_enable 		= 	" . GetSQLValueString($txtEnableBluePay, "text") . ",
                                        bluepay_accountid            =       " . GetSQLValueString($txtBluePayLoginId, "text") . ",
                                        bluepay_test_mode            =       " . GetSQLValueString(($chkBluePayTestMode == 'Y' ? 'TEST' : 'LIVE'), "text") . ",
                                        bluepay_secretkey 		= 	" . GetSQLValueString($txtBluePayTransKey, "text");

        mysql_query($sql) or die(mysql_error());



        if ($txtflatShipping == "Y") { // check flat rate shipping enabled or not
            if ($default_flatrate != 0 || $flatrate_additional != 0) {
                mysql_query("UPDATE " . $tableprefix . "settings SET
                                                        default_flatrate ='" . $default_flatrate . "',additional_flatrate='" . $flatrate_additional . "' ,flatrate_displayname='" . addslashes($flatrate_name) . "'  ");
            }// end if
        } // end flat rate row check

        $success_message = MSG_UPDATE_SUCCESS;
        $sql_google = "SELECT vgooglecheck_mode,vyourpay_mode,dwolla_payment_test_mode  FROM " . $tableprefix . "settings WHERE 1";
        $result_google = mysql_query($sql_google);
        $google_row = mysql_fetch_assoc($result_google);

        switch ($google_row['vgooglecheck_mode']) {

            case "YES":$google_test = "selected";
                break;
            case "NO":$google_live = "selected";
                break;
        }

        $google_check_input = "<select name='google_mode' class='textarea'>
                                                                        <option {$google_test} value='YES'>".TEST."</option>
                                                                        <option {$google_live} value='NO'>".LIVE."</option>
                                                                  </select>";

        switch ($google_row['vyourpay_mode']) {

            case "YES":$yourpay_test = "selected";
                break;
            case "NO":$yourpay_live = "selected";
                break;
        }

        $yourpay_check_input = "<select name='txtyourpay_mode' class='textarea'>
                                                                <option {$yourpay_test} value='YES'>".TEST."</option>
                                                                <option {$yourpay_live} value='NO'>".LIVE."</option>
                                                          </select>";
                                                                
         switch ($google_row['dwolla_payment_test_mode']) {

            case "Y":$dwolla_test = "selected";
                break;
            case "N":$dwolla_live = "selected";
                break;
        }

        $dwolla_check_input = "<select name='dwolla_mode' class='textarea'>
                                                                        <option {$dwolla_test} value='Y'>".TEST."</option>
                                                                        <option {$dwolla_live} value='N'>".LIVE."</option>
                                                                  </select>";
    }
} else {

    $sql = "SELECT * FROM " . $tableprefix . "settings ";
    $result = mysql_query($sql);
    if (mysql_num_rows($result) != 0) {
        $row = mysql_fetch_array($result);//print_r($row);
        $txtLicenseKey = $row["vLicenceKey"];
        $txtSiteName = $row["site_name"];
        $txtSiteEmail = $row["site_email"];
        $txtStyle = $row["site_style"];

        $txtSiteURL = $row["site_url"];
        $txtSecureSiteURL = $row["site_secure_url"];

        $txtBannerSize = $row["banner_size"];
        $txtAdsense = $row["google_adsense_value"];
        $txtEnableAd = $row["enable_google"];
        $txtEnableMoreImages = $row["more_images"];
        $txtProductsPerPage = $row["products_per_page"];
        $chkPublishFeedbacks = $row["publish_feedbacks"];

        $txtEnableShipping = $row["enable_shipping"];
        $txtfedex = $row["enable_fedexshipping"];
        $txtusps = $row["enable_uspsshipping"];
        $chkcanadapost = $row["enable_canadapost"];
        $chkaustraliapost = $row["enable_australiapost"];

        $txtflatShipping = $row["enable_flatrate"];
        $default_flatrate = $row["default_flatrate"];
        $flatrate_additional = $row["additional_flatrate"];

        $chkPublishFeatured = $row["publish_featured"];
        $chkPublishNewitem = $row["publish_newitem"];
        $chkPublishShopping = $row["publish_shoppingcart"];
        $txtArtistCommission = $row["artist_commission"];
        $txtReferralCharge = $row["referral_charge"];
        $txtGiftCoupon = $row["venable_gift_payment"];
        $txtCouponCodes = $row["venable_couponCode_payment"];
        $txtMembership = $row["enable_membership"];

        $txtEnableAuthorize = $row["vauthorize_enable"];
        $txtAuthorizeLoginId = $row["authorize_loginid"];
        $txtAuthorizeTransKey = $row["authorize_transkey"];

        $txtAuthorizeEmail = $row["authorize_email"];
        $chkAuthorizeTestMode = $row["authorize_test_mode"];

        $chkPaypal = $row["enablepaypal"];
        $chkSandbox = $row["enablepaypalsandbox"];
        $txtPaypalEmail = $row["paypalemail"];
        $txtPaypalIDTOKEN = $row["paypalidentitytoken"];

        $chkworldpay = $row["enableworldpay"];
        $worldpayTestmode = $row["worldpay_testmode"];
        $worldpay_transact_method = $row["worldpay_transact_method"];
        $txtworldpayEmail = $row["worldpay_email"];
        $worldpay_inst_Id = $row["worldpay_inst_Id"];

        $txtEnableGoogleCheck = $row["vgoogle_check_enable"];
        $txtGoogleMerchantId = $row["vgooglecheck_id"];
        $txtGoogleMerchantKey = $row["vgooglecheck_key"];
        $txtGoogleMode = $row["vgooglecheck_mode"];

        $txtEnableYourPay = $row["vyourpay_enable"];
        $txtYourPayStoreId = $row["vyourpay_storeid"];
        $txtyourpay_mode = $row["vyourpay_mode"];

        $txtYourPayUserId = $row["vyourpay_userid"];

        $txtYourPayBuffer = $row["vyourpay_certificate_file"];

        $txtEnableStock = $row["ndisplay_stock"];
        $txtEnableBanner = $row["ndisplay_banner"];
        
        $txtEnableDwolla     = $row['dwolla_payment_enable'];
        $txtDwollaMode       = $row['dwolla_payment_test_mode'];
      
        $txtDwollakey        = $row['dwolla_key'];
        $txtDwollaSecretKey  = $row['dwolla_secretkey'];
        
        $txtEnableStripe        = $row['stripe_payment_enable'];
        $chkStripeTestMode      = $row['stripe_payment_test_mode'];
        $txtStripePublishKey    = $row['stripe_publish_key'];
        $txtStripeSecretKey     = $row['stripe_secretkey'];
        
        $chkapproveafiliates = $row["approve_affiliates"];
        $chkapprovesellers = $row["approve_sellers"];
        $chkapproveproducts = $row["approve_products"];
        $txtrma = $row["enable_rma"];
        $txtrma_repair = $row["rma_repair"];
        $txtrma_replace = $row["rma_replace"];
        $txtrma_refund = $row["rma_refund"];
        $txtrma_confirm_message = $row["rma_confirm_message"];
        $txtrma_status_change = $row["rma_status_change"];
        $txtbulkupload = $row["enable_bulkupload"];
        $radReview = $row["vReview"];
        $BuyertoSeller2 = $row["enable_buyerToseller"];
        $txtBuyertoSeller = $row["enable_buyerToseller"];

        $flatrate_name = stripslashes($row["flatrate_displayname"]);

        $txtPaypalUsername = $row["paypal_api_username"];
        $txtPaypalPassword = $row["paypal_api_password"];
        $txtPaypalSignature = $row["paypal_api_signature"];
        $txtPaypalApplicationId = $row["paypal_application_app_id"];



        $txtEnableBluePay = ($row['vbluepay_enable']);
        $txtBluePayLoginId = ($row["bluepay_accountid"]);
        $txtBluePayTransKey = ($row["bluepay_secretkey"]);
        $chkBluePayTestMode = ($row["bluepay_test_mode"] == 'TEST') ? 'Y' : 'N';
        
        $chkDwollaPayTestMode = ($row["dwolla_payment_test_mode"] == 'Y') ? 'Y' : 'N';

        switch ($txtGoogleMode) {

            case "YES":$google_test = "selected";
                break;
            case "NO":$google_live = "selected";
                break;
        }
        
        

        $google_check_input = "<select name='google_mode' class='textarea'>
                                                                        <option {$google_test} value='YES'>".TEST."</option>
                                                                        <option {$google_live} value='NO'>".LIVE."</option>
                                                                  </select>";
                                                                        
        switch ($txtDwollaMode) {

            case "Y":$dwolla_test = "selected";
                break;
            case "N":$dwolla_live = "selected";
                break;
        }

        $dwolla_check_input = "<select name='dwolla_mode' class='textarea'>
                                                                        <option {$dwolla_test} value='Y'>".TEST."</option>
                                                                        <option {$dwolla_live} value='N'>".LIVE."</option>
                                                                  </select>";
    }
}




if ($txtEnableShipping == "Y") {

    $shipping_checked = "checked";
} else {


    $shipping_checked = "";
}
if ($txtMembership == "Y") {
    $Membership_checked = "checked";
}

if ($chkcanadapost == "Y") {
    $canadapost_checked = "checked";
} else {
    $canadapost_checked = "";
}
if ($chkaustraliapost == "Y") {
    $australiapost_checked = "checked";
} else {
    $australiapost_checked = '';
}

if ($txtusps == "Y") {

    $shipping_usps_checked = "checked";
} else {


    $shipping_usps_checked = "";
}

if ($txtEnableYourPay == "Y") {

    $yourpay = "checked";
    $yourpay_block = "";
} else {

    $yourpay = "";
    $yourpay_block = "none";
}

if ($txtGiftCoupon == "Y") {
    $gift_coupon = "checked";
} else {
    $gift_coupon = "";
}

if ($txtCouponCodes == "Y")
    $CouponCodes = "checked";

if ($txtBuyertoSeller == "Y")
    $BuyertoSeller = "checked";




if ($chkPaypal == "Y") {
    $paypal_block = "";
} else {

    $paypal_block = "none";
}




if ($txtEnableWorldPay == "Y") {

    $worldpay_block = "";
    $worldpay = "checked";
} else {

    $worldpay = " ";
    $worldpay_block = "none";
}

if ($txtEnableStripe == "Y") {

    $stripepay_block = "";
    $stripepay = "checked";
} else {

    $stripepay = " ";
    $stripepay_block = "none";
}

if ($txtBuyertoSeller == "Y")
    $BuyertoSeller = "checked";

if ($txtEnableStock == "Y") {
    $enable_stock = "checked";
} else {
    $enable_stock = "";
}

if ($txtEnableBanner == "Y") {
    $enable_banner = "checked";
} else {
    $enable_banner = "";
}


if ($txtEnableMoreImages == "Y") {
    $more_images = "checked";
} else {
    $more_images = "";
}

if ($txtfedex != "N") {
    $fedex_checked = "checked";
    $fedex_shipping_block = "";
} else {

    $fedex_checked = "";
    $fedex_shipping_block = "none";
}

if ($txtbulkupload == 'Y') {
    $enable_bulkupload = "checked";
} else {
    $enable_bulkupload = "";
}
if ($txtrma != "N") {
    $rma_checked = "checked";
    $rmablock = "";
} else {

    $rma_checked = "";
    $rmablock = "none";
}
if ($txtrma_repair == "Y") {
    $chkrma_repair = "checked";
} else {
    $chkrma_repair = "";
}
if ($txtrma_replace == "Y") {
    $chkrma_replace = "checked";
} else {

    $chkrma_replace = "";
}
if ($txtrma_refund == "Y") {
    $chkrma_refund = "checked";
} else {

    $chkrma_refund = "";
}

if ($txtrma_confirm_message == "Y") {
    $chkrma_confirm_message = "checked";
} else {
    $chkrma_confirm_message = "";
}

if ($txtrma_status_change == "Y") {
    $chkrma_status_change = "checked";
} else {
    $chkrma_status_change = "";
}


if ($txtflatShipping == "Y") {

    $flat_checked = "checked";
    $flatrate_block = "";
} else {

    $flat_checked = "";
    $flatrate_block = "none";
}
if ($txtEnableAd == "Y") {

    $google_checked = "checked";
    $google_adsense_block = "";
} else {

    $google_checked = "";
    $google_adsense_block = "none";
}

if ($txtEnableAuthorize == "Y") {

    $authorize_net = "checked";
    $authorize_net_block = "";
} else {
    $authorize_net = "";
    $authorize_net_block = "none";
}

if ($txtEnableGoogleCheck == "Y") {

    $google_checkout = "checked";
    $google_checkout_block = "";
} else {
    $google_checkout = "";
    $google_checkout_block = "none";
}

if ($txtEnableDwolla == "Y") {

    $dwolla_checkout = "checked";
    $dwolla_checkout_block = "";
} else {
    $dwolla_checkout = "";
    $dwolla_checkout_block = "none";
}

if ($txtEnableGoogleCheck == "Y") {

    $google_checkout = "checked";
    $google_checkout_block = "";
} else {
    $google_checkout = "";
    $google_checkout_block = "none";
}

if ($txtYourPayBuffer != "" || $txtYourPayCertificate != "") {
    $pem_file_message = MSG_CERTIFICATE_FILE_UPLOADED;
} else {
    $pem_file_message = MSG_UPLOAD_CERTIFICATE_FILE1;
}

if (getSettingsValue('enable_buyerToseller') == 'Y') {
    $sellerpaymentmode = 'checked';

    $parallel_block = "";

    $paypalpay_block = "none";
} else {
    $adminpaymentmode = 'checked';

    $parallel_block = "none";

    $paypalpay_block = "";
}

//checking buyer to selled db value
if (trim($BuyertoSeller2 != '') and $BuyertoSeller2 == 'Y') {
    $BuyertoSeller = 'checked';
}
//end if


if ($txtEnableBluePay == 'Y') {
    $blue_pay_block = 'block';
} else {
    $blue_pay_block = 'none';
}
?>
<body>
<center>

    <div align="left" id="layout">




        <!--header area start -->
        <?php
        include_once("../includes/topheader_admin.php")
        ?>

        <!--header area end -->




        <div align="left" class="main_body">
            <!--main body start -->



            <?php
            include_once("../includes/admintopmenu.php")
            ?>
            <style>
               /* .tooltip {
                    display:none;
                    background:transparent url(../images/tooltip/black_arrow.png);
                    font-size:12px;
                    height:70px;
                    width:160px;
                    padding:25px;
                    color:#fff;
                }*/

               .tooltip {
    background-color: black;;
filter: alpha(opacity=75)-moz-opacity:0.75;
opacity: 0.75;
    border: 2px solid #FFFFFF;

    border-radius:5px 5px 5px 5px;
    color: white;
    font-size: 1.2em;
    left: -12px;
    padding: 10px;
    position: relative;
    top: 21px;
    width: 200px;
}
.tooltip:after, .tooltip:before
{
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}
.tooltip:after
{
    border-color: rgba(10, 13, 15, 0);
    border-top-color: #0a0d0f;
    border-width: 10px;
    left: 50%;
    margin-left: -10px;
} .tooltip:before

{
    border-color: rgba(245, 245, 245, 0);
    border-top-color: #f5f5f5;
    border-width: 16px;
    left: 50%;
    margin-left: -16px;
}



            </style>

            <script>

                function imagePopUp(img) {
                    html ="<html><head><title>"+"<?php echo PAYPAL_GETTING_API_CREDENTIALS; ?>"+"</title>" +  "</head><body style='margin: 0px 0; text-align:center;'>" +  "<IMG src='" + img + "'    BORDER=0 NAME=image " +  "onload='window.resizeTo(document.image.width,(document.image.height*1.3))'>;" +  "</body></html>";
                    popup=window.open('','image','toolbar=0,location=0,  directories=0,menuBar=0, scrollbars=1,resizable=1');
                    popup.document.open();
                    popup.document.write(html);
                    //popup.document.focus();
                    popup.document.close();
                };

            </script>

            <script language="JavaScript" type="text/JavaScript" src="../js/jquery.tools.min.js"></script>
            <script language="javascript" type="text/javascript">
                $(document).ready(function(){
                    $(".help a[title]").tooltip();
                });
                $(document).ready(function(){
                    $(".jqCCOption").click(function(){

                        var myVal = $(this).val();
                        $(".jqCCBlock").slideUp();
                        if($(this).is(":checked"))
                        {
                            //$(".jqCCOption").attr("checked", false);
                            $('.jqCCOption').not(this).attr("checked", false);
                            $(this).attr("checked", true);

                            $("." + myVal + "Block").slideDown();
                        }

                    })
                });


                function checkAuthorizeNet()
                {

                    if($("#enableAuthorizeNet").is(":checked"))
                    {
                        $("#AuthorizeCheckBlock").slideDown();
                        $("#yourPayBlock").slideUp();
                         $("#stripepayBlock").slideUp();
                        $("#enableYourPay").attr("checked", false);
                    }
                    else
                    {
                        $("#AuthorizeCheckBlock").slideUp();

                    }
                }

                function checkYourPay()
                {
                    if($("#enableYourPay").is(":checked"))
                    {
                        $("#yourPayBlock").slideDown();
                        $("#AuthorizeCheckBlock").slideUp();
                         $("#stripepayBlock").slideUp();
                        $("#enableAuthorizeNet").attr("checked", false);
                    }
                    else
                    {

                        $("#yourPayBlock").slideUp();
                    }
                }

                function checkWorldPay()
                {
                    if($("#enableworldpay").is(":checked"))
                    {
                        $("#worldpayBlock").slideDown();
                        $("#yourPayBlock").slideUp();
                        $("#AuthorizeCheckBlock").slideUp();
                         $("#stripepayBlock").slideUp();
                        $("#enableAuthorizeNet").attr("checked", false);
                    }
                    else
                    {

                        $("#worldpayBlock").slideUp();
                    }
                }
                
                function checkStripePay()
                {
                    if($("#stripe_payment_enable").is(":checked"))
                    {
                        $("#stripepayBlock").slideDown();
                        $("#worldpayBlock").slideUp();
                        $("#yourPayBlock").slideUp();
                        $("#AuthorizeCheckBlock").slideUp();
                        $("#enableAuthorizeNet").attr("checked", false);
                    }
                    else
                    {

                        $("#stripepayBlock").slideUp();
                    }
                }


                function displayPaypal()
                {

                    if($("#txtPaymentDirect:checked"))
                    {
                        document.getElementById("paypal").style.display = "";
                        document.getElementById("parrallelpay").style.display = "none";
                    }

                    document.getElementById("xxenableworldPayRow").style.display = "";
                    document.getElementById("xxWorldPayBlockRow").style.display = "";



                }


                function displayParallel()
                {

                    if($("#txtPaymentSeller:checked"))
                    {
                        document.getElementById("parrallelpay").style.display = "";
                        document.getElementById("paypal").style.display = "none";
                    }

                    document.getElementById("xxenableworldPayRow").style.display = "none";
                    document.getElementById("xxWorldPayBlockRow").style.display = "none";

                }



                function checkPaypalGateway()  // checkbox clcik in the Direct Admin Section
                {
                    if(document.getElementById("chkPaypal").checked == true)
                    {
                        document.getElementById("PaypalBlock").style.display = "";
                        document.getElementById("PaypalParallelBlock").style.display = "";
                        document.getElementById("chkPaypal1").checked = true;
                    }
                    else
                    {
                        document.getElementById("PaypalBlock").style.display = "none";
                        document.getElementById("PaypalParallelBlock").style.display = "none";
                        document.getElementById("chkPaypal1").checked = false;
                    }
                }

                function checkPaypalGateway2()  // checkbox clcik in the Split Payment Between Admin-Seller Section
                {

                    if(document.getElementById("chkPaypal1").checked == true)
                    {
                        document.getElementById("chkPaypal").checked = true;
                        document.getElementById("PaypalBlock").style.display = "";
                        document.getElementById("PaypalParallelBlock").style.display = "";
                    }
                    else
                    {
                        document.getElementById("chkPaypal").checked = false;
                        document.getElementById("PaypalBlock").style.display = "none";
                        document.getElementById("PaypalParallelBlock").style.display = "none";
                    }
                }




                function Uncheck()
                {

                    if(document.frmPaymentSettings.chkSandbox1.checked==false)
                    {

                        document.getElementById("chkSandbox").checked=false;

                    }

                }

                function Uncheck1()
                {

                    if(document.frmPaymentSettings.chkSandbox.checked==false)
                    {

                        document.getElementById("chkSandbox1").checked=false;

                    }

                }

                function checkFedexshipping()
                {


                    if(document.frmPaymentSettings.enable_fedexshipping.checked == true)
                    {

                        document.getElementById("FedexBlock").style.display = "";

                    }
                    else
                    {

                        document.getElementById("FedexBlock").style.display = "none";

                    }





                }

                function checkFlatrateshipping()
                {


                    if(document.frmPaymentSettings.enable_flatrate.checked == true)
                    {

                        document.getElementById("FlatBlock").style.display = "";

                    }
                    else
                    {

                        document.getElementById("FlatBlock").style.display = "none";

                    }

                }

                function checkrma()
                {


                    if(document.frmPaymentSettings.rma.checked == true)
                    {

                        document.getElementById("RMABlock").style.display = "";

                    }
                    else
                    {

                        document.getElementById("RMABlock").style.display = "none";

                    }

                }

                function checkGooglePayment()
                {

                    if(document.frmPaymentSettings.enableGoogleCheck.checked == true)
                    {

                        document.getElementById("googleCheckBlock").style.display = "";

                    }
                    else
                    {

                        document.getElementById("googleCheckBlock").style.display = "none";

                    }



                }
                function checkDwollaPayment()
                {

                    if(document.frmPaymentSettings.enableDwollaCheck.checked == true)
                    {

                        document.getElementById("dwollaCheckBlock").style.display = "";

                    }
                    else
                    {

                        document.getElementById("dwollaCheckBlock").style.display = "none";

                    }



                }
            </script>
            <form action="" method="post" name="frmPaymentSettings" onSubmit="return validate();" enctype="multipart/form-data">

                <div align="left" class="content_area">
                    <!--content area start -->


                    <table cellpadding="0" cellspacing="0" border="0" width="100%">


                        <tr>
                            <td>

                                <div align="left" class="page_title"><?php echo EDIT_PAYMENT_SETTINGS; ?></div>
                                <div align="center" class="text_information grey_tr"><?php echo $message ?></div>
                                <div align="center" class="text_information_success grey_tr"><?php echo $success_message ?></div>
                                <br>

                                <div align="left">
                                    <table width="100%" border="0" class="manage_table" cellpadding="3" cellspacing="3">

                                        <tr>
                                            <td width="28%" align="right" valign="middle"><strong><?php echo PAYMENT_SETTINGS; ?></strong></td>
                                            <td width="4%" align="center" valign="middle"></td>
                                            <td width="68%" colspan="2" align="left" valign="middle">
                                                <input type="radio" name="txtPaymentMode" id="txtPaymentDirect" value="admin" <?php echo $adminpaymentmode; ?> onclick="displayPaypal();"><?php echo DIRECT_ADMIN; ?> &nbsp;
                                                <span class="help"><a href="#" title="<?php echo ADMIN_PAY_TOOLTIP; ?>"><img src="../images/question_mark.jpg" border="0" height="15"></a></span>

                                                <input type="radio" name="txtPaymentMode" id="txtPaymentSeller" value="seller" <?php echo $sellerpaymentmode; ?> onclick="displayParallel();"><?php echo SPLIT_PAYMENT_BETWEEN_ADMIN_AND_SELLER; ?>&nbsp;
                                                <span class="help"><a href="#" title="<?php echo SPLIT_PAY_TOOLTIP; ?>"><img src="../images/question_mark.jpg" border="0" height="15"></a></span>

                                            </td>
                                        </tr>

                                        <tr>
                                            <td colspan="4" width="100%">

                                                <div id="paypal" style="display:<?php echo $paypalpay_block; ?>">
                                                    <table width ="100%" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td align="right" valign="middle"><strong><?php echo ENABLE_PP; ?></strong></td>
                                                            <td align="center" valign="middle"></td>
                                                            <td colspan="2" align="left" valign="middle"><input type="checkbox" id="chkPaypal" onClick="checkPaypalGateway();" name="chkPaypal" <?php
            if (isset($chkPaypal) and ($chkPaypal == "Y")) {
                echo " CHECKED ";
            }
            ?> />
                                                                <?php echo SELECT_THE_CHECKBOX_TO_ENABLE_PAYPAL; ?>									</td>
                                                        </tr>

                                                        <tr>
                                                            <td></td>
                                                            <td></td>
                                                            <td colspan="2">
                                                                <div id="PaypalBlock" style="display:<?php echo $paypal_block ?>">
                                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                        <tr>
                                                                            <td colspan="3">
                                                                                <br><?php echo SET_RETURN_PAGE; ?><br>
                                                                                <?php echo GIVEN_BELOW_DETAILS; ?><br>
                                                                                <?php echo SETUP_AUTO_RETURN; ?><br>
                                                                                <p><?php echo TO_SETUP_AUTO_RETURN; ?><br>
                                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1. <?php echo CLICK_THE_PROFILE_TAB; ?><br>
                                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2. <?php echo CLICK_WEBSITE_PAYMENT; ?><br>
                                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3. <?php echo CLICK_RADIO_BUTTON; ?><br>
                                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4. <?php echo ENTER_RETURN_URL; ?><br>
                                                                                    <?php echo RETURN_URLS; ?> <br>
                                                                                    &nbsp;&nbsp;&nbsp;&nbsp;<?php echo SUCC; ?>:&nbsp;<b><?php echo SECURE_SITE_URL ?>/success.php</b><br>
                                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5. <?php echo CLICK_RADIOBTN_ENABLE_DATA_TRANSFER; ?><br />
                                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6 <?php echo CLICK_SAVE; ?><br />
                                                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;7. <?php echo MSG_ID_TOKEN; ?>

                                                                                    <br>
                                                                                    <input type="checkbox" id="chkSandbox" name="chkSandbox" value="Y" <?php
                                                                                                                if (isset($chkSandbox) and ($chkSandbox == "Y")) {
                                                                                                                    echo " CHECKED ";
                                                                                                                }
            ?> onclick="Uncheck1();">&nbsp;<?php echo SANDBOX_OR_TEST; ?>													</td>
                                                                        </tr>

                                                                        <tr align="left">
                                                                            <td valign="middle"><?php echo NEW_ACCOUNT; ?>  &nbsp;&nbsp; </td>
                                                                            <td valign="middle"></td>
                                                                            <td valign="middle"><a href="https://www.paypal.com/us/mrb/pal=NCGEZ2VF6YL62" target="_blank"><img src="../images/paypal_small.jpg" width="77" height="30" border="0" alt="<?php echo NEW_ACCOUNT; ?>" title="<?php echo NEW_ACCOUNT; ?>"></a></td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo EMAIL_ADDRESS; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea" size="50" value="<?php echo htmlentities($txtPaypalEmail); ?>" name="txtPaypalEmail"  maxlength="100" onMouseOver="fixedtooltip('<?php echo PAYPAL_EMAIL_ADDRESS_TOOL_TIP; ?>',this,event,'220px');" onMouseout="delayhidetip();">												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo IDENTIFY_TOKEN; ?>&nbsp;
                                                                                <span class="help"><a href="#" title="<?php echo ID_TOKEN_TOOLTIP; ?>"><img src="../images/question_mark.jpg" border="0" height="15"></a></span>
                                                                            </td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea2" value="<?php echo htmlentities($txtPaypalIDTOKEN); ?>" name="txtPaypalIDTOKEN" style="width:300px" onMouseOver="fixedtooltip('<?php echo PAYPAL_IDENTITY_TOKEN_TOOLTIP; ?>',this,event,'220px');" onMouseout="delayhidetip();">												  </td>
                                                                        </tr>
                                                                    </table>
                                                                </div>
                                                            </td>
                                                        </tr>
                                                        
                                                        <tr>
                                                            <td align="right" valign="middle"><strong><?php echo DWOLlA_PAYMENT; ?></strong></td>
                                                            <td align="center" valign="middle"></td>
                                                            <td colspan="2" align="left" valign="middle"><input type="checkbox" name="enableDwollaCheck" value="Y" <?php echo $dwolla_checkout ?> onClick="checkDwollaPayment();" />
                                                                <?php echo ENABLE_DWOLlA_PAYMENT; ?>									</td>
                                                        </tr>
                                                        <tr>
                                                            <td></td>
                                                            <td></td>
                                                            <td colspan="2">
                                                                <div id="dwollaCheckBlock" style="display:<?php echo $dwolla_checkout_block ?>">
                                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                        <tr align="left">
                                                                            <td valign="middle"><?php echo START_NEW_ACCOUNT; ?></td>
                                                                            <td valign="middle"></td>
                                                                            <td valign="middle"><a href="https://uat.dwolla.com" target="_blank"><img src="../images/Dwolla-logo.png" width="114" height="20" border="0" alt="<?php echo START_NEW_ACCOUNT; ?>" title="<?php echo START_NEW_ACCOUNT; ?>"></a></td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo DWOLLA_KEY; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtDwollakey); ?>" name="dwolla_key" maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_DWOLlA_PAYMENT_KEY; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo DWOLLA_SECRET_KEY; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtDwollaSecretKey); ?>" name="dwolla_secretkey"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_DWOLlA_PAYMENT_SECRET_KEY; ?>',this,event,'220px');" onMouseout="delayhidetip();">												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo DWOLLA_TEST_MODE; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle">
                                                                                <?php echo $dwolla_check_input; ?>	
                                                                            </td>
                                                                        </tr>
                                                                        
                                                                    </table>
                                                                </div>									
                                                        </tr>
                                                        <!--<tr>
                                                            <td align="right" valign="middle"><strong><?php echo GC; ?></strong></td>
                                                            <td align="center" valign="middle"></td>
                                                            <td colspan="2" align="left" valign="middle"><input type="checkbox" name="enableGoogleCheck" value="Y" <?php echo $google_checkout ?> onClick="checkGooglePayment();" />
                                                                <?php echo ENABLE_GOOGLE_CHECKOUT; ?>									</td>
                                                        </tr>-->

                                                        <!--<tr>
                                                            <td></td>
                                                            <td></td>
                                                            <td colspan="2">
                                                                <div id="googleCheckBlock" style="display:<?php echo $google_checkout_block ?>">
                                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                        <tr align="left">
                                                                            <td valign="middle"><?php echo START_NEW_ACCOUNT; ?></td>
                                                                            <td valign="middle"></td>
                                                                            <td valign="middle"><a href="http://checkout.google.com/sell?promo=searmiasystemsinc" target="_blank"><img src="../images/google_small.gif" width="114" height="20" border="0" alt="<?php echo START_NEW_ACCOUNT; ?>" title="<?php echo START_NEW_ACCOUNT; ?>"></a></td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo GOOGLE_MERCHANT_ID; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtGoogleMerchantId); ?>" name="txtGoogleMerchantId" maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_GOOGLE_CHECKOUT_MERCHANT_ID_EMPTY_1; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo GOOGLE_MERCHANT_KEY; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtGoogleMerchantKey); ?>" name="txtGoogleMerchantKey"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_GOOGLE_CHECKOUT_MERCHANT_KEY_EMPTY_1; ?>',this,event,'220px');" onMouseout="delayhidetip();">												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo MODE; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle">
                                                                                <?php echo $google_check_input ?>													</td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td colspan="3" valign="middle"><font color="#FF0000">* <?php echo NOTE.ADD_THE_URL; ?> "<?php echo SECURE_SITE_URL . '/response.php'; ?>" <?php echo PATH_TO_API_CALLBACK; ?></font></td>
                                                                        </tr>
                                                                    </table>
                                                                </div>									</td>
                                                        </tr>-->




                                                        <tr>                                                          
                                                            <td colspan="3" align="left"> <h3><?php echo CREDIT_CARD_PROCESSORS; ?> </h3></td>
                                                        </tr>



                                                        <tr>



                                                            <td width="28%" align="right" valign="middle"><strong><?php echo AUTHORIZE_DOT_NET; ?></strong></td>
                                                            <td width="4%" align="center" valign="middle"></td>
                                                            <td width="68%" colspan="2" align="left" valign="middle"><input type="checkbox" name="txtcreditcardAuthorize" value="authorize" id="enableAuthorizeNet" <?php echo $authorize_net ?> class="jqCCOption"/>
                                                                <?php echo ENABLE_AUTHORIZE_DOT_NET; ?>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <td></td>
                                                            <td></td>
                                                            <td colspan="2">
                                                                <div id="AuthorizeCheckBlock" style="display:<?php echo $authorize_net_block ?>" class="authorizeBlock jqCCBlock">
                                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                        <tr align="left">
                                                                            <td valign="middle"><?php echo START_ACCOUNT; ?> </td>
                                                                            <td valign="middle"></td>
                                                                            <td valign="middle"><a href="http://www.authorize.net/" target="_blank"><img src="../images/authorize_small.jpg" width="49" height="36" border="0" alt="<?php echo START_ACCOUNT; ?>" title="<?php echo START_ACCOUNT; ?>"></a></td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo AUTH_LOGID; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtAuthorizeLoginId); ?>" name="txtAuthorizeLoginId"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_AUTHORIZE_LOGIN_ID_IS_REQUIRED_1; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo TRAN_KEY; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtAuthorizeTransKey); ?>" name="txtAuthorizeTransKey"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_AUTHORIZE_TRANSACTION_KEY_IS_REQUIRED_1; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo AUTH_EMAIL; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtAuthorizeEmail); ?>" name="txtAuthorizeEmail"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_AUTHORIZE_EMAIL_IS_REQUIRED_1; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td  valign="middle" width="25%"><?php echo AUTHORIZE_DOT_NET; ?> <?php echo TEST_MODE;?>&nbsp;<span class="required">*</span></td>
                                                                            <td  valign="middle" width="2%"></td>
                                                                            <td  valign="middle"><input type="checkbox" class="checkbox" name="chkAuthorizeTestMode" <?php if ($chkAuthorizeTestMode == "Y") { echo "CHECKED"; } ?> />
                                                                                <?php echo PAYMENT_MODE_LIVE; ?></td>
                                                                        </tr>
                                                                    </table>
                                                                </div></td>
                                                        </tr>



                                                        <tr>
                                                            <td align="right" valign="middle"><strong><?php echo FST_DATA_GLOBAL_GATEWY; ?></strong></td>
                                                            <td align="center" valign="middle"></td>
                                                            <td colspan="2" align="left" valign="middle"><input type="checkbox" name="txtcreditcardFirstData" value="firstdata"  id="enableYourPay" <?php echo $yourpay ?>  class="jqCCOption"/>
                                                            <?php echo ENABLE_FST_DATA_GLOBAL_GATEWY; ?>    
                                                            </td>
                                                        </tr>



                                                        <tr>
                                                            <td></td>
                                                            <td></td>
                                                            <td colspan="2">
                                                                <div id="yourPayBlock" style="display:<?php echo $yourpay_block ?>" class="firstdataBlock  jqCCBlock">
                                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                        <tr><td colspan="3" align="left"> <b><i><?php echo NOTE; ?></i> : <?php echo OPEN_THE_PORT; ?></b></td></tr>
                                                                        <tr align="left">
                                                                            <td valign="middle"><?php echo START_ACCOUNT; ?></td>
                                                                            <td valign="middle"></td>
                                                                            <td valign="middle"><a href="https://registration.altpayfirstdata.com/" target="_blank"><img src="../images/firstdata.jpg"  border="0" alt="<?php echo START_ACCOUNT; ?>" title="<?php echo START_ACCOUNT; ?>"></a></td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo STORE_ID; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtYourPayStoreId); ?>" name="txtYourPayId"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_YOURPAY_STORE_ID; ?>',this,event,'220px');" onMouseout="delayhidetip();">												  </td>
                                                                        </tr>

                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo USER_ID; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtYourPayUserId); ?>" name="txtYourPayUserId"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_YOURPAY_USER_ID; ?>',this,event,'220px');" onMouseout="delayhidetip();">												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo CERTF_FILE; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="file" name="txtYourPayCertificate"  onMouseOver="fixedtooltip('<?php echo MSG_YOURPAY_CERTIFICATE_FILE; ?>',this,event,'220px');" onMouseout="delayhidetip();"><br>
                                                                                <b>(.pem)</b>&nbsp;<span class="text_information"><?php echo $pem_file_message ?></span>
                                                                                <input type="hidden" name="txtYourPayBuffer" value="<?php echo $txtYourPayBuffer ?>">												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo MODE; ?></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle">
                                                                                <select name='txtyourpay_mode' class='textarea'>
                                                                                    <option  value="TEST" <?php if ($txtyourpay_mode == 'TEST') { echo "selected"; }
                                                                                ?>><?php echo TEST; ?></option>
                                                                                    <option value="LIVE" <?php if ($txtyourpay_mode == 'LIVE') { echo "selected"; }
                                                                                ?>><?php echo LIVE; ?></option>
                                                                                </select>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </div>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                              <td width="28%" align="right" valign="middle"><strong><?php echo BLUEPAY; ?></strong></td>
                                                            <td width="4%" align="center" valign="middle"></td>
                                                            <td width="68%" colspan="2" align="left" valign="middle"><input type="checkbox" name="txtcreditcardBluePay" value="bluepay" id="enableBluePay" <?php
                                                                                            if ($txtEnableBluePay == "Y") {
                                                                                                echo "CHECKED";
                                                                                            }
                                                                                ?> class="jqCCOption"/>
                                                                <?php echo ENABLE_BLUEPAY; ?>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <td></td>
                                                            <td></td>
                                                            <td colspan="2">
                                                                <div id="BluePayCheckBlock" style="display:<?php echo $blue_pay_block ?>" class="bluepayBlock jqCCBlock">
                                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                        <tr align="left">
                                                                            <td valign="middle"><?php echo NEW_ACCOUNT; ?></td>
                                                                            <td valign="middle"></td>
                                                                            <td valign="middle"><a href="https://onlineapp.bluepay.com/interfaces/create?hostid=17d6913481c995869f09844787c72ef5" target="_blank"><img src="../images/bluepay.jpg" border="0" alt="<?php echo NEW_ACCOUNT; ?>" title="<?php echo NEW_ACCOUNT; ?>"></a></td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo BLUEPAY_LOGINID; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtBluePayLoginId); ?>" name="txtBluePayLoginId"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_BLUEPAY_LOGIN_ID; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo SECRET_KEY; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea"  value="<?php echo htmlentities($txtBluePayTransKey); ?>" name="txtBluePayTransKey"  maxlength="100" onMouseOver="fixedtooltip('<?php echo MSG_BLUEPAY_SECRET_KEY; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>

                                                                        <tr>
                                                                            <td valign="middle" width="25%"><?php echo BLUEPAY;?> <?php echo TEST_MODE;?>&nbsp;<span class="required">*</span></td>
                                                                            <td  valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="checkbox" class="checkbox" name="chkBluePayTestMode" <?php if ($chkBluePayTestMode == "Y") { echo "CHECKED"; } ?> />
                                                                                <?php echo PAYMENT_MODE_LIVE; ?></td>
                                                                        </tr>
                                                                    </table>
                                                                </div></td>
                                                        </tr>
                                                        
                                                    <tr id="xxenableworldPayRow" style="display:<?php echo $paypalpay_block; ?>;" >
                                                        <td align="right" valign="middle"><strong><?php echo WORLDPAY; ?></strong></td>
                                                        <td align="center" valign="middle"></td>
                                                        <td colspan="2" align="left" valign="middle"><input name="enableworldpay" type="checkbox" value="worldpay" <?php if(trim($chkworldpay) == 'Y') { ?> checked="checked" <?php } ?>  id="enableworldpay"   class="jqCCOption"/>
                                                            <?php echo ENABLE_WORLDPAY; ?></td>
                                                    </tr>
                                                    <tr id="xxWorldPayBlockRow" style="display:<?php echo $paypalpay_block; ?>;" >
                                                        <td align="right" valign="middle"></td>
                                                        <td align="center" valign="middle"></td>
                                                        <td colspan="2" align="left" valign="top">
                                                            <div id="worldpayBlock" style="display:<?php if (trim($chkworldpay) == 'N') { echo $worldpay_block; } ?>" class="worldpayBlock jqCCBlock">
                                                                <table cellpadding="0" cellspacing="0" border="0" width="100%">

                                                                    <tr align="left">
                                                                        <td colspan="3"><table><tr><td>
                                                                                        <span class="required">*</span> <?php echo TAKE_ACCOUNT_FROM_WORLDPAY; ?>
                                                                                    </td></tr>
                                                                                <tr><td> <?php echo LOG_INTO_WORLDPAY; ?></td></tr>
                                                                                <tr>
                                                                                    <td>  1) <?php echo ENTER_CALLBACK_URL; ?> <?php echo SITE_URL ?>/worldpay_callback.php</td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td>2) <?php echo TICK_CHK_BOX_TO_CALLBACK; ?></td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td>3) <?php echo PWD_MATCH_CALLBACK_PWD; ?></td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td>4) <?php echo CLK_SAVE_CHANGES; ?></td>
                                                                                </tr>
                                                                                <tr>
                                                                                    <td>&nbsp;</td>
                                                                                </tr>
                                                                            </table></td>
                                                                    </tr>
                                                                    <tr align="left">
                                                                        <td><?php echo NEW_ACCOUNT; ?> </td>
                                                                        <td></td>
                                                                        <td><a href="http://www.worldpay.com/" target="_blank"><img src="../images/worldpay_small.jpg" width="78" height="20" border="0" alt="<?php echo NEW_ACCOUNT; ?>" title="<?php echo NEW_ACCOUNT; ?>"></a></td>
                                                                    </tr>
                                                                    <tr align="left">
                                                                        <td>
                                                                            <?php echo WP_ID; ?> <span class="required">*</span>	</td>
                                                                        <td></td>
                                                                        <td width="65%"><input type="text" class="textarea" name="worldpay_inst_Id" value="<?php echo $worldpay_inst_Id; ?>"></td>
                                                                    </tr>
                                                                    <tr align="left">
                                                                        <td valign="middle"><?php echo TEST_MODE; ?></td>
                                                                        <td valign="middle"></td>
                                                                        <td valign="middle"><input name="worldpay_testmode" type="radio" value="100" checked>
                                                                            <?php echo TEST_MODE; ?>
                                                                            <input name="worldpay_testmode" type="radio" value="0" <?php if ($worldpayTestmode == 0) { echo "checked"; } ?>>
                                                                            <?php echo LIVE_MODE; ?> </td>
                                                                    </tr>
                                                                    <tr align="left">
                                                                        <td valign="middle" width="33%"><?php echo EMAIL_ADDRESS; ?>&nbsp;<span class="required">*</span></td>
                                                                        <td valign="middle" width="2%"></td>
                                                                        <td valign="middle"><input type="text" class="textarea" value="<?php echo htmlentities($txtworldpayEmail); ?>" name="txtworldpayEmail"  maxlength="200" onMouseOver="fixedtooltip('<?php echo MSG_WORLDPAY_EMAIL_ADDRESS; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                    </tr>
                                                                    <tr align="left">
                                                                        <td valign="middle" width="33%"> <?php echo TRANSACTION_METHOD; ?><span class="required"></span></td>
                                                                        <td valign="middle" width="2%"></td>
                                                                        <td valign="middle"><input name="worldpay_transact_method" type="radio" value="A" <?php if ($worldpay_transact_method == "A") { echo "checked"; } ?>> <?php echo AUTHORIZED; ?>
                                                                            <input name="worldpay_transact_method" type="radio" value="C" <?php if ($worldpay_transact_method == "C") { echo "checked"; } ?>><?php echo CAPTURED; ?></td>
                                                                    </tr>
                                                                </table>
                                                            </div></td>
                                                    </tr>
                                        
                                                    <tr id="xxenableStripePayRow" style="display:<?php echo $paypalpay_block; ?>;" >
                                                       <td align="right" valign="middle"><strong><?php echo STRIPE; ?></strong></td>
                                                       <td align="center" valign="middle"></td>
                                                       <td colspan="2" align="left" valign="middle"><input name="stripe_payment_enable" type="checkbox" value="stripepay" <?php if(trim($txtEnableStripe) == 'Y') { ?> checked="checked" <?php } ?>  id="stripe_payment_enable"   class="jqCCOption"/>
                                                           <?php echo ENABLE_STRIPE; ?></td>
                                                    </tr>
                                        
                                                    <tr id="xxStripePayBlockRow" style="display:<?php echo $paypalpay_block; ?>;" >
                                                            <td align="right" valign="middle">&nbsp;</td>
                                                            <td align="center" valign="middle">&nbsp;</td>
                                                            <td colspan="2" align="left" valign="top">
                                                                <div id="stripepayBlock" style="display:<?php if (trim($txtEnableStripe) == 'N') { echo $stripepay_block; } ?>" class="stripepayBlock jqCCBlock">
                                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">


                                                                        <tr align="left">
                                                                            <td><?php echo NEW_ACCOUNT; ?> </td>
                                                                            <td></td>
                                                                            <td><a href="https://stripe.com/" target="_blank"><img src="../images/stripe_logo.gif" width="78" height="20" border="0" alt="<?php echo NEW_ACCOUNT; ?>" title="<?php echo NEW_ACCOUNT; ?>"></a></td>
                                                                        </tr>

                                                                        <!--<tr align="left">
                                                                            <td valign="middle"><?php echo TEST_MODE; ?></td>
                                                                            <td valign="middle"></td>
                                                                            <td valign="middle"><input name="stripe_payment_test_mode" type="radio" value="Y" checked>
                                                                                <?php echo TEST_MODE; ?>
                                                                                <input name="stripe_payment_test_mode" type="radio" value="N" <?php if ($chkStripeTestMode == "N") { echo "checked"; } ?>>
                                                                                <?php echo LIVE_MODE; ?> </td>
                                                                        </tr>-->
                                                                        <tr align="left">
                                                                            <td valign="middle" width="33%"><?php echo STRIPE_PUBLISH_KEY; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea" value="<?php echo htmlentities($txtStripePublishKey); ?>" name="stripe_publish_key"  maxlength="200" onMouseOver="fixedtooltip('<?php echo MSG_STRIPE_PUBLISH_KEY; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="33%"><?php echo STRIPE_SECRET_KEY; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea" value="<?php echo htmlentities($txtStripeSecretKey); ?>" name="stripe_secretkey"  maxlength="200" onMouseOver="fixedtooltip('<?php echo MSG_STRIPE_SECRET_KEY; ?>',this,event,'220px');" onMouseout="delayhidetip();" />												  </td>
                                                                        </tr>
                                                                         <tr><td colspan="3" align="left"> <b><i><?php echo NOTE; ?></i> : <?php echo MSG_STRIPE_CREDENTIALS; ?></b></td></tr>


                                                                    </table>
                                                                </div></td>
                                                        </tr>

                                                    </table>
                                                </div>

                                            </td>
                                        </tr>

                                        
                                        
                                       


                                        <tr><td colspan="4" width="100%">
                                                <div id="parrallelpay" style="display:<?php echo $parallel_block; ?>">
                                                    <table width="100%" cellpadding="0" cellspacing="0" border="0" >
                                                        <tr>
                                                            <td  valign="middle"><?php echo ENABLE_PAYPAL_PARA_PAY; ?></td>
                                                            <td align="center" valign="middle"></td>
                                                            <td colspan="2" align="left" valign="middle"><input type="checkbox" id="chkPaypal1"  name="chkPaypal" <?php
                                                                       if (isset($chkPaypal) and ($chkPaypal == "Y")) { echo " CHECKED "; } ?> onclick="checkPaypalGateway2();" />
                                                                <?php echo SELECT_THE_CHECKBOX_TO_ENABLE_PAYPAL; ?>									</td>
                                                        </tr>

                                                        <tr>
                                                            <td></td>
                                                            <td></td>
                                                            <td colspan="2">
                                                                <div id="PaypalParallelBlock" style="display:<?php echo $paypal_block ?>">
                                                                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                                                        <tr>
                                                                            <td colspan="3">

                                                                                <input type="checkbox" id="chkSandbox1" name="chkSandbox1"  value="Y" <?php if (isset($chkSandbox) and ($chkSandbox == "Y")) { echo " CHECKED "; } ?> onclick="Uncheck();">&nbsp;<?php echo SANDBOX_OR_TEST; ?>													</td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo EMAIL_ADDRESS; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea" size="50"  value="<?php echo htmlentities($txtPaypalEmail); ?>" name="txtPaypalEmailDir"  maxlength="100" onMouseOver="fixedtooltip('<?php echo PAYPAL_EMAIL_ADDRESS_TOOL_TIP; ?>',this,event,'220px');" onMouseout="delayhidetip();">												  </td>
                                                                        </tr>

                                                                        <tr><td colspan="3"> <b> <a href="javascript:imagePopUp('../images/adaptive_payment.jpg')"><?php echo GET_PAYPAL_API; ?> </a> </b></td></tr>
                                                                        <tr align="left">
                                                                            <td valign="middle"><?php echo NEW_ACCOUNT; ?></td>
                                                                            <td valign="middle"></td>
                                                                            <td valign="middle"><a href="https://www.paypal.com/us/mrb/pal=NCGEZ2VF6YL62" target="_blank"><img src="../images/paypal_small.jpg" width="77" height="30" border="0" alt="<?php echo NEW_ACCOUNT; ?>" title="<?php echo NEW_ACCOUNT; ?>"></a></td>
                                                                        </tr>
                                                                        <tr><td colspan="3"> <?php echo IF_YOUR_APPLICATION_GOES_LIVE; ?> </td></tr>
                                                                        <tr align="left">
                                                                            <td valign="middle"><?php echo APP_ID; ?> &nbsp;<span class="required">*</span> </td>
                                                                            <td valign="middle">&nbsp;</td>
                                                                            <td valign="middle"><input type="text"  class="textarea" size="50" value="<?php echo htmlentities($txtPaypalApplicationId); ?>" name="txtPaypalApplicationId" style="width:250px" onMouseOver="fixedtooltip('<?php echo PAYPAL_API_ID_EMPTY_1; ?>',this,event,'220px');" onMouseout="delayhidetip();"></td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo API_UNAME; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input name="txtPaypalUsername" type="text" class="textarea" size="50"  style="width:250px"  onMouseOver="fixedtooltip('<?php echo PAYPAL_API_USER_NAME_EMPTY_1; ?>',this,event,'220px');" onMouseout="delayhidetip();" value="<?php echo htmlentities($txtPaypalUsername); ?>"   maxlength="50">												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo API_PWD; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input type="text" class="textarea" size="50"  value="<?php echo htmlentities($txtPaypalPassword); ?>" name="txtPaypalPassword" style="width:250px" onMouseOver="fixedtooltip('<?php echo PAYPAL_API_PASSWORD_EMPTY_1; ?>',this,event,'220px');" onMouseout="delayhidetip();">												  </td>
                                                                        </tr>
                                                                        <tr align="left">
                                                                            <td valign="middle" width="25%"><?php echo API_SIGN; ?>&nbsp;<span class="required">*</span></td>
                                                                            <td valign="middle" width="2%"></td>
                                                                            <td valign="middle"><input name="txtPaypalSignature" class="textarea" size="60" type="text" style="width:320px" onMouseOver="fixedtooltip('<?php echo PAYPAL_API_SIGNATURE_EMPTY_1; ?>',this,event,'220px');" onMouseout="delayhidetip();" value="<?php echo htmlentities($txtPaypalSignature); ?>" size="4">												  </td>
                                                                        </tr>
                                                                    </table> 
                                                                </div>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </td><tr>
                                        <tr><td colspan="4" align="center"><div align="center"><input type="submit" value="<?php echo BTN_SAVE_CHANGES; ?>" name="btnSaveChanges" class="button"></div></td></tr>
                                    </table>

                                </div>
                                <div align="center"></div>
                                <!--content area end-->
                            </td></tr>

                    </table>

                </div>

            </form>

            <div align="left" class="clear_float"><img src="../images/clear.gif" alt="" width="1" height="1" /></div>
            <!--main body end -->
        </div>


        <?php
        include "../includes/footer.php";
        ?>
        <script language="javascript">

            function validate()
            {
                return true;
            }
        </script>


