* @link     http://dev.gaslightmedia.com/
  */
 
+/***** NOTE NEED TO SCAN THIS FOR LANGUAGE SUPPORT ******/
+
 /*
  * MES Gateway class
  *
  * http://docs.woothemes.com/wc-apidocs/class-WC_Payment_Gateway.html
  *
  * Development Credentials
- * Merchant Name       Gaslight Media
- * Profile ID          94100012117800000059
- * Profile Key         cBCBDBscxFpIRCJzcBqnKFORrBcNJXCt
- * Request URL         https://cert.merchante-solutions.com/mes-api/tridentApi
+ * Merchant Name Gaslight Media
+ * Profile ID 94100012117800000059
+ * Profile Key cBCBDBscxFpIRCJzcBqnKFORrBcNJXCt
+ * Request URL https://cert.merchante-solutions.com/mes-api/tridentApi
  *
  */
 class GlmMesGateway extends WC_Payment_Gateway
 {
 
-   /**
+    /**
+     * Plugin Name
+     *
+     * @var $name
+     */
+    public $name;
+
+    /**
+     * Text Domain
+     *
+     * @access public
+     * @var string
+     */
+    public $text_domain;
+
+    /**
      * Cards Accepted
      *
      * @var $visa
      * @var $mastercard
      * @var $amex
+     * @var $discover
      * @access public
      */
     public $visa = false;
     public $mastercard = false;
     public $amex = false;
+    public $discover = false;
+
     /**
      * Transaction Mode
      *
      * @access public
      */
     public $transaction_mode;
+
     /**
      * Gateway Icon URL
      *
      * @access public
      */
     public $icon;
-   /**
+
+    /**
      * Profile ID
      *
      * @var $profile_id
      * @access public
      */
     public $profile_id;
+
     /**
      * Profile Key
      *
      * @access public
      */
     public $profile_key;
+
     /**
      * Processing URL
      *
      * @access public
      */
     public $url;
+
     /**
-     * Credit Card Months
+     * Gateway Settings
      *
-     * @var $cc_months
+     * @var $settings
      * @access public
      */
-    public $cc_months;
+    public $settings;
+
     /**
-     * Credit Card Exp Years
+     * Gateway Settings
      *
-     * @var $cc_start_year
-     * @var $cc_end_year
-     * @access public
+     * @var $ccNumb
+     * @var $cc_exp
+     * @var $cc_cvc
+     *
+     * @access private
      */
-    public $cc_start_year;
-    public $cc_end_year;
+    private $ccNumb;
+    private $cc_exp;
+    private $cc_cvc;
+
     /**
-     * Cleaned User Input Array
+     * Amount driven test value
      *
-     * @var $glm_mes_in
+     * @var $amount_driven_test
      * @access public
      */
-    public $glm_mes_in;
+    public $amount_driven_test;
 
+    /**
+     * Customer Order object
+     *
+     * @var $cust_order
+     * @access public
+     */
+    public $cust_order;
 
+    /**
+     * Gateway Response Arrays
+     *
+     * @var $respDescr
+     * @var $amountDrivenTests
+     * @access public
+     */
+    public $respDescr;
+    public $amountDrivenTests;
 
     public function __construct ()
     {
-        // Add filter for our gateway
-        add_filter( 'woocommerce_payment_gateways', array( $this, 'glmMesAddGateway') );
-
-        $this->id = GLM_MES_ID;
-
-        // Title of gateway and description displayed in WooCommerce Checkout configuration pages
-        $this->method_title = __( GLM_MES_SHORT_NAME, GLM_MES_ID );
-        $this->method_description = __( GLM_MES_DESCRIPTION, GLM_MES_ID );
-
-        // Icon displayed with gateway in checkout page
-        $this -> icon = GLM_MES_ICON;
+        $this->name = GLM_MES_NAME;
+        $this->text_domain = GLM_MES_DIR;
+
+        $this->respDescr = array(
+
+                '001' => __('Please contact your credit card issuer or try another card.', 'glm-merchant_e_solutions'),
+                '002' => __('Please contact your credit card issuer or try another card', 'glm-merchant_e_solutions'),
+                '004' => __('Your card may not be used at this time. Please contact your credit card issuer or try another card.', 'glm-merchant_e_solutions'),
+                '005' => __('Your purchase using this credit card has been declined. If you have another credit card, you may try that at this time.', 'glm-merchant_e_solutions'),
+                '007' => __('Please contact your credit card issuer or try another card', 'glm-merchant_e_solutions'),
+                '014' => __('Your credit card number appears to be incorrect. Please check the card number you entered and try again.', 'glm-merchant_e_solutions'),
+                '015' => __('Your credit card number appears to be incorrect. Please check the card number you entered and try again.', 'glm-merchant_e_solutions'),
+                '019' => __('Your card was not successfully processed. Please try again. If you continue to get this response, please call for assistance.', 'glm-merchant_e_solutions'),
+                '041' => __('Please contact your credit card issuer or try another card.', 'glm-merchant_e_solutions'),
+                '043' => __('Please contact your credit card issuer or try another card.', 'glm-merchant_e_solutions'),
+                '051' => __('Your card is not currently able to cover the cost of this purchase. Delete contents from your cart or try again later.', 'glm-merchant_e_solutions'),
+                '054' => __('Your card appears to be expired. Please check your credit card information below or try another card.', 'glm-merchant_e_solutions'),
+                '057' => __('This purchase is not permitted with your credit card. Please contact your credit card issuer or try another card.', 'glm-merchant_e_solutions'),
+                '059' => __('Please contact your credit card issuer or try another card.', 'glm-merchant_e_solutions'),
+                '084' => __('There was a problem processing your credit cart. If you continue to get this response, please call for assistance.', 'glm-merchant_e_solutions'),
+                '110' => __('We do not accept this type of credit card. Please try another card or call for assistance.', 'glm-merchant_e_solutions'),
+                '114' => __('You did not supply all required credit card information. Please check your credit card payment information below.', 'glm-merchant_e_solutions'),
+                '210' => __('The address you entered did not satisfactorlly match the cardholder\'s address.', 'glm-merchant_e_solutions'),
+                '211' => __('The card security code (3 or 4 digit code, usually on the back of the card) did not match.', 'glm-merchant_e_solutions')
 
-        // Displays checkout fields for "direct" integration
-        $this->has_fields = true;
-
-        // Supports the default credit card form
-        $this->supports = array( 'default_credit_card_form' );
+        );
 
-        // Setup Fields and Settings
-        $this->init_form_fields();
-        $this->init_settings();
+        $this->amountDrivenTests = array(
+                '' => __('(none)', 'glm-merchant_e_solutions'),
+                '0.00' => '$0.00'.__('Card OK', 'glm-merchant_e_solutions'),
+                '0.01' => '$0.01'.__('Call', 'glm-merchant_e_solutions'),
+                '0.02' => '$0.02'.__('Call - special condition', 'glm-merchant_e_solutions'),
+                '0.04' => '$0.04'.__('Hold-call - pick up card (no fraud)', 'glm-merchant_e_solutions'),
+                '0.05' => '$0.05'.__('Decline - do not honor', 'glm-merchant_e_solutions'),
+                '0.07' => '$0.07'.__('Hold-call - pick up card (fraud)', 'glm-merchant_e_solutions'),
+                '0.14' => '$0.14'.__('Card # error', 'glm-merchant_e_solutions'),
+                '0.15' => '$0.15'.__('No such issuer', 'glm-merchant_e_solutions'),
+                '0.19' => '$0.19'.__('Re-enter transaction', 'glm-merchant_e_solutions'),
+                '0.41' => '$0.41'.__('Hold-call - pickup card (fraud: lost card)', 'glm-merchant_e_solutions'),
+                '0.43' => '$0.43'.__('Hold-call - pickup card (fraud: stolen card)', 'glm-merchant_e_solutions'),
+                '0.51' => '$0.51'.__('Decline - insufficient funds', 'glm-merchant_e_solutions'),
+                '0.54' => '$0.54'.__('Expired card', 'glm-merchant_e_solutions'),
+                '0.57' => '$0.57'.__('Transaction not permitted to cardholder', 'glm-merchant_e_solutions'),
+                '0.59' => '$0.59'.__('Suspected fraud', 'glm-merchant_e_solutions'),
+                '0.84' => '$0.84'.__('Invalid Auth', 'glm-merchant_e_solutions'),
+                '0.86' => '$0.86'.__('Unable to validate pin (not used in this plugin)', 'glm-merchant_e_solutions'),
+                '1.10' => '$1.10'.__('Card type not accepted by merchant', 'glm-merchant_e_solutions')
+        );
 
-        // Get the title and description for this checkout method to use in checkout page
-        $this->title = $this->get_option( 'title' );
-        $this->description = $this->get_option( 'description' );
+        // Add filter for our gateway
+        add_filter('woocommerce_payment_gateways',
+                array(
+                        $this,
+                        'glmMesAddGateway'
+                ));
+
+        // Add localization
+        add_action('init',
+                array(
+                        $this,
+                        'load_plugin_textdomain'
+                ));
 
-        // Add credit cards available to the description
-        $this->description .= '<h4>Credit Cards Accepted</h4><p>'
-            .($this->settings['visa'] == 'yes' ? '<img src="'.GLM_MES_ASSETS_URL.'/visa.png">' : '')
-            .($this->settings['mastercard'] == 'yes' ? '<img src="'.GLM_MES_ASSETS_URL.'/mastercard.png">' : '')
-            .($this->settings['amex'] == 'yes' ? '<img src="'.GLM_MES_ASSETS_URL.'/amex.png">' : '')
-            .'</p>';
+        $this->id = GLM_MES_ID;
 
-        // Set the transaction mode selected in the WooCommerce Checkout configuration page for this gateway
-        $this -> transaction_mode = $this->settings['transaction_mode'];
+        // Is WooCommerce activated?
+        if (! in_array('woocommerce/woocommerce.php',
+                apply_filters('active_plugins', get_option('active_plugins')))) {
 
-        // Determine if we're in test or production mode
-        switch ($this -> settings['transaction_mode']) {
+            if (is_admin()) {
+                add_action('admin_notices',
+                        array(
+                                $this,
+                                'woocommerce_missing_notice'
+                        ));
+                }
+            return false;
+
+        } elseif (defined('WC_VERSION') &&
+                 version_compare(WC_VERSION, GLM_MES_REQUIRED_WOO_VERSION, '>=')) {
+
+            // Title of gateway and description displayed in WooCommerce Checkout configuration pages
+            $this->method_description = __('A Merchant e-Solutions payment Gateway plug-in for WooCommerce.', 'glm-merchant_e_solutions');
+
+            // Icon displayed with gateway in checkout page
+            $this->icon = GLM_MES_ICON;
+
+            // Displays checkout fields for "direct" integration
+            $this->has_fields = true;
+
+            // Supports the default credit card form
+            $this->supports = array(
+                    'default_credit_card_form',
+                    'refunds'
+            );
+
+            // Setup Fields and Settings
+            $this->init_form_fields();
+            $this->init_settings();
+
+            // Get the title and description for this checkout method to use on
+            // the checkout page
+            $this->title = $this->settings['title'];
+            $this->description = $this->settings['description'];
+
+            $this->settings['address_verification'] == $this->settings['address_verification'];
+            $this->settings['cvv_required'] = $this->settings['cvv_required'];
+
+            // Add credit cards available to the description
+            $this->description .= '<h4>Credit Cards Accepted</h4><p>' . ($this->settings['visa'] ==
+                     'yes' ? '<img src="' . GLM_MES_ASSETS_URL . '/visa.png">' : '') . ($this->settings['mastercard'] ==
+                     'yes' ? '<img src="' . GLM_MES_ASSETS_URL .
+                     '/mastercard.png">' : '') . ($this->settings['amex'] ==
+                     'yes' ? '<img src="' . GLM_MES_ASSETS_URL . '/amex.png">' : '') . ($this->settings['discover'] ==
+                     'yes' ? '<img src="' . GLM_MES_ASSETS_URL .
+                     '/discover.png">' : '') . '</p>';
+
+            // Check for SSL
+            add_action('admin_notices', array(
+                    $this,
+                    'ssl_check'
+            ));
+
+            // Set the transaction mode selected in the WooCommerce Checkout
+            // configuration page for this gateway
+            $this->transaction_mode = $this->settings['transaction_mode'];
+
+            // Determine if we're in test or production mode
+            switch ($this->settings['transaction_mode']) {
+
+                case 'test':
+                    $this->profile_id = $this->settings['test_profile_id'];
+                    $this->profile_key = $this->settings['test_profile_key'];
+                    $this->host = $this->settings['test_url'];
+                    $this->amount_driven_test = $this->settings['amount_driven_test'];
+                    break;
+
+                case 'production':
+                    $this->profile_id = $this->settings['prod_profile_id'];
+                    $this->profile_key = $this->settings['prod_profile_key'];
+                    $this->host = $this->settings['prod_url'];
+                    break;
+            }
+
+            // Set debug defines
+            if (! defined('GLM_MES_DEBUG')) {
+                $d = ($this->settings['mes_debug'] == 'yes');
+                define('GLM_MES_DEBUG', $d);
+                $d = ($this->settings['mes_debug_verbose'] == 'yes');
+                define('GLM_MES_DEBUG_VERBOSE', $d);
+            }
+
+            // Process admin options
+            if (is_admin()) {
+                add_action(
+                        'woocommerce_update_options_payment_gateways_' . $this->id,
+                        array(
+                                $this,
+                                'process_admin_options'
+                        ));
+            }
 
-            case 'test':
-                $this->profile_id = $this -> settings['test_profile_id'];
-                $this->profile_key = $this -> settings['test_profile_key'];
-                $this->host = $this -> settings['test_url'];
-                break;
+        } else {
 
-            case 'production':
-                $this->profile_id = $this -> settings['prod_profile_id'];
-                $this->profile_key = $this -> settings['prod_profile_key'];
-                $this->host = $this -> settings['prod_url'];
-                break;
+            if (is_admin()) {
+                add_action('admin_notices',
+                        array(
+                                $this,
+                                'upgrade_notice'
+                        ));
+            }
+            return false;
 
         }
 
-        if (!defined('GLM_MES_DEBUG')) {
-            $d = ($this -> settings['mes_debug'] == 'yes');
-            define('GLM_MES_DEBUG', $d);
-            $d = ($this -> settings['mes_debug_verbose'] == 'yes');
-            define('GLM_MES_DEBUG_VERBOSE', $d);
+        // Add Checkout Page Messsages
+        if (!is_admin()) {
+            add_action('woocommerce_before_checkout_form',
+                    array(
+                            $this,
+                            'glmMesCheckoutMessages'
+                    ));
         }
 
-        add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
-
     }
 
     // Tell WooCommerce that we exist
-    public function glmMesAddGateway( $methods )
+    public function glmMesAddGateway ($methods)
     {
         $methods[] = 'GlmMesGateway';
+
         return $methods;
     }
 
-    /*
-     *  Initialize Form Fields
+    // Place message at top of checkout page
+    public function glmMesCheckoutMessages ($methods)
+    {
+        static $msg_sent = false;
+
+        if ($this->settings['transaction_mode'] == 'test') {
+
+            if (!$msg_sent) {
+                wc_add_notice('<b style="color: red;">PAYMENT GATEWAY OPERATING IN TEST MODE</b><br>
+                    <p>
+                        The credit card payment gateway is operating in test mode.
+                        All transactions are simulated. There will be no impact on cardholder\'s account,
+                        nor will there be any actual funds transfered to the merchant account.
+                        Click below for a list of card numbers, addresses, and card security codes that may be used
+                        for testing.
+                        <br>
+                        <a href="'.GLM_MES_ASSETS_URL.'/checkout_tests.html" target="_blank" style="font-size: 1.2em;">Show Test Options</a>
+                        <br>
+                        Also note that "Amount Driven Tests" may be selected in "WooCommerce" -> "Settings" -> "Checkout" -> "GLM Merchant e-Solutions"
+                    </p>
+                ', 'notice');
+
+                $msg_sent = true;
+            }
+        }
+    }
+
+    /**
+     * Check if SSL has been set for checkout
+     * Warn admin user if not.
+     *
+     * @access public
+     * @return
+     *
+     */
+    public function ssl_check ()
+    {
+        // This is used to prevent duplicate messages
+        static $ssl_check_sent = false;
+
+        if ($this->enabled == "yes" && ! $ssl_check_sent) {
+            if (get_option('woocommerce_force_ssl_checkout') == "no") {
+//**** USE ONLY SINGLE QUOTES
+                echo "<div class=\"error\"><p>" .
+                         sprintf(
+                                __(
+                                        "
+                        <strong>%s</strong> is enabled and WooCommerce is not forcing the
+                        SSL certificate on your checkout page. <br>Please ensure that you have
+                        a valid SSL certificate and that you are <a href=\"%s\">forcing
+                        the checkout pages to be secured.</a>",
+                                'glm-merchant_e_solutions'),
+                                 GLM_MES_SHORT_NAME,
+                                admin_url('admin.php?page=wc-settings&tab=checkout')) .
+                         "</p></div>";
+                $ssl_check_sent = true;
+            }
+        }
+    }
+
+    /**
+     * WooCommerce Payment Gateway Upgrade Notice.
      *
-     *  Add form fields to the WooCommerce Checkout page for this gateway
+     * @access public
+     * @return string
      */
+    public function upgrade_notice ()
+    {
+        echo '<div class="updated woocommerce-message wc-connect"><p>' .
+                 sprintf(
+                        __(
+                                '%s depends on version %s and up of WooCommerce! Please upgrade before activating.',
+                                'glm-merchant_e_solutions'), $this->name,
+                        GLM_MES_REQUIRED_WOO_VERSION) . '</p></div>';
+    }
 
+    /**
+     * Load Localisation files.
+     *
+     * Note: the first-loaded translation file overrides any
+     * following ones if the same translation is present.
+     *
+     * @access public
+     * @return void
+     */
+    public function load_plugin_textdomain ()
+    {
+        // Set filter for plugin's languages directory
+        $lang_dir = dirname(plugin_basename(__FILE__)) . '/languages/';
+        $lang_dir = apply_filters(
+                'woocommerce_' . GLM_MES_SLUG . '_languages_directory',
+                GLM_MES_LANGUAGE_PATH);
+
+        // Traditional WordPress plugin locale filter
+        $locale = apply_filters('plugin_locale', get_locale(),
+                $this->text_domain);
+        $mofile = sprintf('%1$s-%2$s.mo', $this->text_domain, $locale);
+
+        // Setup paths to current locale file
+        $mofile_local = GLM_MES_LANGUAGE_PATH . $mofile;
+        $mofile_global = WP_LANG_DIR . '/' . $this->text_domain . '/' . $mofile;
+        if (file_exists($mofile_global)) {
+
+            // Look in global /wp-content/languages/plugin-name/ folder
+            load_textdomain($this->text_domain, $mofile_global);
+        } else
+            if (file_exists($mofile_local)) {
+                // Look in local /wp-content/plugins/plugin-name/languages/
+                // folder
+                load_textdomain($this->text_domain, $mofile_local);
+            } else {
+                // Load the default language files
+                load_plugin_textdomain($this->text_domain, false, $lang_dir);
+            }
+    }
 
-    public function init_form_fields()
+    /*
+     * Initialize Form Fields
+     *
+     * Add form fields to the WooCommerce Checkout page for this gateway
+     */
+    public function init_form_fields ()
     {
 
         $this->form_fields = array(
 
                 // Enable gateway chackbox
                 'enabled' => array(
-                        'title' => __( 'Enable/Disable', 'woocommerce' ),
+                        'title' => __('Enable/Disable', 'glm-merchant_e_solutions'),
                         'type' => 'checkbox',
-                        'label' => __( 'Enable Merchant e-Solutions Gateway', 'woocommerce' ),
+                        'label' => __('Enable Merchant e-Solutions Gateway',
+                                'glm-merchant_e_solutions'),
                         'default' => 'yes'
                 ),
 
                 // Title displayed to user for this payment method
                 'title' => array(
-                        'title' => __( 'Title', 'woocommerce' ),
+                        'title' => __('Title', 'glm-merchant_e_solutions'),
                         'type' => 'text',
-                        'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
-                        'default' => __( 'Credit Card Payment', 'woocommerce' ),
-                        'desc_tip'      => true,
+                        'description' => __(
+                                'This controls the title which the user sees during checkout.',
+                                'glm-merchant_e_solutions'),
+                        'default' => __('Credit Card Payment', 'glm-merchant_e_solutions'),
+                        'desc_tip' => true
                 ),
 
                 // Description to customer at checkout
                 'description' => array(
-                        'title' => __( 'Description', 'woocommerce' ),
+                        'title' => __('Description', 'glm-merchant_e_solutions'),
                         'type' => 'textarea',
                         'default' => 'A description of this payment method to the user at checkout. Include cards accepted, etc.'
                 ),
 
                 'sep_0' => array(
-                        'title'       => __( 'Credit Cards Accepted', 'woocommerce' ),
-                        'type'        => 'title',
-                        'description' => '',
+                        'title' => __('Credit Cards Accepted', 'glm-merchant_e_solutions'),
+                        'type' => 'title',
+                        'description' => ''
                 ),
 
                 // Visa
                 'visa' => array(
-                        'title'       => __( '', 'woocommerce' ),
-                        'type'        => 'checkbox',
-                        'label' => __( 'Visa', 'woocommerce' ),
-                        'desc_tip'    => false,
+                        'title' => '',
+                        'type' => 'checkbox',
+                        'label' => __('Visa', 'glm-merchant_e_solutions'),
+                        'desc_tip' => false,
                         'default' => 'no'
                 ),
 
                 // MasterCard
                 'mastercard' => array(
-                        'title'       => __( '', 'woocommerce' ),
-                        'type'        => 'checkbox',
-                        'label' => __( 'MasterCard', 'woocommerce' ),
-                        'desc_tip'    => false,
+                        'title' => '',
+                        'type' => 'checkbox',
+                        'label' => __('MasterCard', 'glm-merchant_e_solutions'),
+                        'desc_tip' => false,
                         'default' => 'no'
                 ),
 
                 // Amex
                 'amex' => array(
-                        'title'       => __( '', 'woocommerce' ),
-                        'type'        => 'checkbox',
-                        'label' => __( 'American Express', 'woocommerce' ),
-                        'desc_tip'    => false,
+                        'title' => '',
+                        'type' => 'checkbox',
+                        'label' => __('American Express', 'glm-merchant_e_solutions'),
+                        'desc_tip' => false,
+                        'default' => 'no'
+                ),
+
+                // Discover
+                'discover' => array(
+                        'title' => '',
+                        'type' => 'checkbox',
+                        'label' => __('Discover', 'glm-merchant_e_solutions'),
+                        'desc_tip' => false,
+                        'default' => 'no'
+                ),
+
+                // Require Address Verification
+                'address_verification' => array(
+                        'title' => __('Require Address Verification', 'glm-merchant_e_solutions'),
+                        'type' => 'checkbox',
+                        'label' => __('Check to require valid address verification before charging credit card.', 'glm-merchant_e_solutions'),
+                        'default' => 'no'
+                ),
+
+                // Require Credit Card CCV/CVC/CID
+                'cvv_required' => array(
+                        'title' => __('Require CVV/CVC/CID', 'glm-merchant_e_solutions'),
+                        'type' => 'checkbox',
+                        'label' => __('Check to require a valid credit card CVV/CVC/CID when charging card.', 'glm-merchant_e_solutions'),
                         'default' => 'no'
                 ),
 
                 'sep_1' => array(
-                        'title'       => __( 'Test Mode Credentials', 'woocommerce' ),
-                        'type'        => 'title',
-                        'description' => '',
+                        'title' => __('Test Mode Credentials', 'glm-merchant_e_solutions'),
+                        'type' => 'title',
+                        'description' => ''
                 ),
 
                 // MeS Gateway Profile ID
                 'test_profile_id' => array(
-                        'title' => __( 'Test Profile ID', 'woocommerce' ),
+                        'title' => __('Test Profile ID', 'glm-merchant_e_solutions'),
                         'type' => 'text',
-                        'default' => __( '9410000xxxxx00000001', 'woocommerce' ),
-                        'desc_tip'      => false,
+                        'desc_tip' => false,
+                        'placeholder' => '9410000xxxxx00000001'
                 ),
 
                 // MeS Gateway Profile Key
                 'test_profile_key' => array(
-                        'title' => __( 'Test Profile Key', 'woocommerce' ),
+                        'title' => __('Test Profile Key', 'glm-merchant_e_solutions'),
                         'type' => 'text',
-                        'default' => __( 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'woocommerce' ),
-                        'desc_tip'      => false,
+                        'desc_tip' => false,
+                        'placeholder' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
                 ),
 
                 // MeS Gateway Test URL
                 'test_url' => array(
-                        'title' => __( 'Test URL', 'woocommerce' ),
+                        'title' => __('Test URL', 'glm-merchant_e_solutions'),
                         'type' => 'text',
-                        'default' => __( 'https://cert.merchante-solutions.com/mes-api/tridentApi', 'woocommerce' ),
-                        'desc_tip'      => false,
+                        'default' => 'https://cert.merchante-solutions.com/mes-api/tridentApi',
+                        'desc_tip' => false
                 ),
 
                 'sep_2' => array(
-                        'title'       => __( '<p> </p>Production Mode Credentials', 'woocommerce' ),
-                        'type'        => 'title',
-                        'description' => '',
+                        'title' => '<p> </p>'.__(
+                                'Production Mode Credentials',
+                                'glm-merchant_e_solutions'),
+                        'type' => 'title',
+                        'description' => ''
                 ),
 
                 // MeS Gateway Profile ID
                 'prod_profile_id' => array(
-                        'title' => __( 'Production Profile ID', 'woocommerce' ),
+                        'title' => __('Production Profile ID', 'glm-merchant_e_solutions'),
                         'type' => 'text',
-                        'default' => __( '9410000xxxxx00000001', 'woocommerce' ),
-                        'desc_tip'      => false,
+                        'desc_tip' => false,
+                        'placeholder' => '9410000xxxxx00000001'
                 ),
 
                 // MeS Gateway Profile Key
                 'prod_profile_key' => array(
-                        'title' => __( 'Production Profile Key', 'woocommerce' ),
+                        'title' => __('Production Profile Key', 'glm-merchant_e_solutions'),
                         'type' => 'text',
-                        'default' => __( 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'woocommerce' ),
-                        'desc_tip'      => false,
+                        'desc_tip' => false,
+                        'placeholder' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
                 ),
 
                 // MeS Gateway Test URL
                 'prod_url' => array(
-                        'title' => __( 'Production URL', 'woocommerce' ),
+                        'title' => __('Production URL', 'glm-merchant_e_solutions'),
                         'type' => 'text',
-                        'default' => __( 'https://cert.merchante-solutions.com/mes-api/tridentApi', 'woocommerce' ),
-                        'desc_tip'      => false,
+                        'default' => 'https://cert.merchante-solutions.com/mes-api/tridentApi',
+                        'desc_tip' => false
                 ),
 
                 'sep_3' => array(
-                        'title'       => __( '<p> </p>Mode Selection', 'woocommerce' ),
-                        'type'        => 'title',
-                        'description' => '',
+                        'title' => '<p> </p>'.__('Mode Selection', 'glm-merchant_e_solutions'),
+                        'type' => 'title',
+                        'description' => ''
                 ),
 
                 // Set Transaction Mode
                 'transaction_mode' => array(
-                        'title'       => __( 'Transaction Mode', 'woocommerce' ),
-                        'type'        => 'select',
-                        'label' => __( 'Must be in "Production Mode" for live transactions.', 'woocommerce' ),
-                        'description' => __( 'See <a href="http://resources.merchante-solutions.com/display/TPGPUB/Payment+Gateway+Certification+Request+Form" target="_blank">MeS Payment Certification Form</a> to apply for required ID and Key below.', 'woocommerce' ),
-                        'default'     => 'test',
-                        'desc_tip'    => false,
-                        'options'     => array(
-                                'test'       => __( 'Test Mode', 'woocommerce' ),
-                                'production' => __( 'Production Mode', 'woocommerce' )
+                        'title' => __('Transaction Mode', 'glm-merchant_e_solutions'),
+                        'type' => 'select',
+                        'label' => __(
+                                'Must be in "Production Mode" for live transactions.',
+                                'glm-merchant_e_solutions'
+                            ),
+                        'description' => sprintf(
+                                __('See %s MeS Payment Certification Form</a> to apply for required ID and Key.',
+                                'glm-merchant_e_solutions'),
+                                '<a href="http://resources.merchante-solutions.com/display/TPGPUB/Payment+Gateway+Certification+Request+Form" target="_blank">'
+                            ),
+                        'default' => 'test',
+                        'desc_tip' => false,
+                        'options' => array(
+                                'test' => __('Test Mode', 'glm-merchant_e_solutions'),
+                                'production' => __('Production Mode', 'glm-merchant_e_solutions')
                         )
                 ),
 
+                // Amount driven Transaction Tests
+                'amount_driven_test' => array(
+                        'title' => __('Amount Driven Tests', 'glm-merchant_e_solutions'),
+                        'type' => 'select',
+                        'description' => __('Selecting an amount driven test will set the payment amount for the transaction to the specific value
+                                and will cause the payment gateway to return the associated respose. This may be used to test all
+                                possible response types that might be experienced in production use.', 'glm-merchant_e_solutions')
+                                .'<br><a href="'.GLM_MES_ASSETS_URL.'/checkout_tests.html" target="_blank" style="font-size: 1.2em;">'
+                                .__('Show Additional Test Options', 'glm-merchant_e_solutions').'</a>',
+                        'options' => $this->amountDrivenTests,
+                        'default' => '',
+                        'desc_tip' => false
+                ),
+
                 // Set Debug Mode
                 'mes_debug' => array(
-                        'title' => __( 'Enable Debug Information', 'woocommerce' ),
+                        'title' => __('Enable Debug Information', 'glm-merchant_e_solutions'),
                         'type' => 'checkbox',
-                        'label' => __( '', 'woocommerce' ),
+                        'label' => __('Check to enable debug output on checkout page.', 'glm-merchant_e_solutions'),
                         'default' => 'no'
                 ),
 
                 // Set Debug Verbose Mode
                 'mes_debug_verbose' => array(
-                        'title' => __( 'Enable Verbose Debug', 'woocommerce' ),
+                        'title' => __('Enable Verbose Debug', 'glm-merchant_e_solutions'),
                         'type' => 'checkbox',
-                        'label' => __( '', 'woocommerce' ),
+                        'label' => __('Check to enable verbose output on checkout page.', 'glm-merchant_e_solutions'),
                         'default' => 'no'
                 )
-
         );
+    }
 
+    /*
+     * Perform any required field validation
+     *
+     * No additional validation at this time
+     */
+    public function validate_fields()
+    {
+        return true;
     }
 
-/*
-    // Set Payment Fields
-    public function payment_fields()
+    /*
+     * Run PreAuth to check address and CSV if set
+     *
+     *
+     * @var string $tans_type 'PreAuth', 'Settle', 'Sale', or 'Refund'
+     * @var float $amount Override order amount, used for refunds
+     *
+     * @access public
+     * @return void
+     */
+    private function run_transaction($trans_type = false, $refund_amount = false, $transaction_id = false)
     {
-        // Set start and end years for card expiration
-        $this->cc_start_year = date('Y');
-        $this->cc_end_year =  $this->cc_start_year + GLM_MES_EXPIRE_YEARS;
+        $response = array(
+            'success' => false
+        );
 
-        if (GLM_MES_DEBUG_VERBOSE) {
-            wc_add_notice('GLM MeS Gateway: Parameters available to payment form...<p><pre>'.print_r($this,1).'</pre></p>', 'success' );
-        }
+        $doDebug = true;
+        $sendRequestData = false;
 
-        require_once (GLM_MES_PATH . '/views/paymentForm.php');
-    }
+        // Create transaction object
+        require_once (GLM_MES_CLASS_PATH . '/MesTridentGateway.php');
 
-    // Validate Payment Fields
-    public function validate_fields()
-    {
+        // Select transaction object by type requested
+        switch ($trans_type) {
 
-//        $this->$glm_mes_in['account_number'] =
-//        $this->sanitize_text_field(  )
-    }
-*/
+            case 'PreAuth':
 
-    /*
-     * Process order with MES Gateway
-     */
-    public function process_payment( $order_id ) {
+                if (GLM_MES_DEBUG_VERBOSE) {
+                    wc_add_notice('GLM MeS Gateway: Running Pre-Authorization', 'success');
+                }
 
-        // Get a copy of our order
-        global $woocommerce;
-        $custOrder = new WC_Order( $order_id );
+                // Only run pre-auth if address verification or CVV test is selected
+                if ($this->settings['address_verification'] == 'yes' ||
+                    $this->settings['cvv_required'] == 'yes' ) {
 
-        // Get our invoice number
-        $invNumb = str_replace( "#", "", $custOrder->get_order_number() );
+                        $trans = new TpgPreAuth($this->profile_id, $this->profile_key);
 
-        // Clean up the submitted credit card data
-        $ccNumb = str_replace( array(' ', '-' ), '', $_POST[GLM_MES_ID.'-card-number'] );
-        $cc_exp = str_replace( array( '/', ' '), '', $_POST[GLM_MES_ID.'-card-expiry'] );
-        $cc_cvc = ( isset( $_POST[GLM_MES_ID.'-card-cvc'] ) ) ? $_POST[GLM_MES_ID.'-card-cvc'] : '';
-
-        /* Some other things available to us
-         $custOrder->billing_first_name,
-         $custOrder->billing_last_name,
-         $custOrder->billing_address_1,
-         $custOrder->billing_city,
-         $custOrder->billing_state,
-         $custOrder->billing_postcode,
-         $custOrder->billing_country,
-         $custOrder->billing_phone,
-         $custOrder->billing_email,
-         $custOrder->shipping_first_name,
-         $custOrder->shipping_last_name,
-         $custOrder->shipping_company,
-         $custOrder->shipping_address_1,
-         $custOrder->shipping_city,
-         $custOrder->shipping_country,
-         $custOrder->shipping_state,
-         $custOrder->shipping_postcode,
-         $custOrder->user_id,
-         $_SERVER['REMOTE_ADDR'],
-        */
+                        $sendRequestData = true;
+
+                        break;
+
+                // otherwise, no pre-auth needs to be run, so say we're OK to go
+                } else {
+
+                    if (GLM_MES_DEBUG_VERBOSE) {
+                        wc_add_notice('GLM MeS Gateway: No Pre-Authorization requested', 'success');
+                    }
+
+                }
+
+                // break;  - If no pre-auth was required, we're just falling through to Sale
+
+            case 'Sale':
+
+                if (GLM_MES_DEBUG_VERBOSE) {
+                    wc_add_notice('GLM MeS Gateway: Running Credit Card', 'success');
+                }
+
+                $trans = new TpgSale($this->profile_id, $this->profile_key);
+
+                $sendRequestData = true;
+
+                break;
+
+            case 'Settle':      // Requires a prior pre-auth
+
+                if (GLM_MES_DEBUG_VERBOSE) {
+                    wc_add_notice('GLM MeS Gateway: Running Credit Card after Pre-Auth', 'success');
+                }
+
+                // If we don't have a transaction ID then can't run Settle
+                if (!$transaction_id) {
+                    if (GLM_MES_DEBUG_VERBOSE) {
+                        wc_add_notice('GLM MeS Gateway: No transaction ID was provided for a Settle request!', 'success');
+                    }
+                    return false;
+                }
+
+                // Send transaction amount or amount driven test value if set
+                if ($this->amount_driven_test) {
+                    $amount = $this->amount_driven_test;
+                } else {
+                    $amount = $this->cust_order->order_total;
+                }
+
+                $trans = new TpgSettle($this->profile_id, $this->profile_key, $transaction_id, $amount);
+
+                $sendRequestData = false;
+
+                break;
+
+            case 'Refund':
+
+                $trans = new TpgRefund($this->profile_id, $this->profile_key, $transaction_id);
+                $trans->setRequestField('transaction_amount', $refund_amount);
+
+                // Don't let debug data be output during a refund.
+                $doDebug = false;
+
+                break;
+
+            default:
+
+                // There is no reason to end up here!!!
+                $response['auth_response_text'] = "Invalid transaction type in run_transaction()!";
+                $response['auth_response_desr'] = "WARNING: This is an internal system error in the GLM MES Payment Gateway.";
+                return $response;
+
+                break;
 
-        if (GLM_MES_DEBUG_VERBOSE) {
-            wc_add_notice('GLM MeS Gateway: process_payment() called', 'success' );
-            wc_add_notice('GLM MeS Gateway: Customer Order Data<p><pre>'.print_r($custOrder,1).'</pre></p>', 'success' );
         }
 
-        // Create transaction object
-        require_once (GLM_MES_CLASS_PATH . '/MesTridentGateway.php');
-        $trans = new TpgSale( $this->profile_id, $this->profile_key, $this->settings );
+        if ($sendRequestData) {
+
+            // Send transaction amount
+            if ($this->amount_driven_test) {
+                $amount = $this->amount_driven_test;
+            } else {
+                $amount = $this->cust_order->order_total;
+            }
+
+            // Send billing information
+            $trans->setAvsRequest($this->cust_order->billing_address_1, $this->cust_order->billing_postcode);
+            $trans->setDynamicData(
+                $this->cust_order->billing_first_name . ' ' .
+                $this->cust_order->billing_last_name, $this->cust_order->billing_city,
+                $this->cust_order->billing_state, $this->cust_order->billing_postcode,
+                $this->cust_order->billing_phone
+            );
+
+            // Send shipping infomration
+            $trans->setRequestField('ship_first_name', $this->cust_order->shipping_first_name);
+            $trans->setRequestField('ship_last_name', $this->cust_order->shipping_last_name);
+            $trans->setRequestField('ship_addr1', $this->cust_order->shipping_address_1);
+            $trans->setRequestField('ship_city', $this->cust_order->shipping_city);
+            $trans->setRequestField('ship_state', $this->cust_order->shipping_state);
+            $trans->setRequestField('ship_zip', $this->cust_order->shipping_postcode);
+
+            // Send Card data
+            $trans->setRequestField('cvv2', $this->cc_cvc);
+            $trans->setRequestField('invoice_number', $this->invNumb);
+            $trans->setTransactionData($this->ccNumb, $this->cc_exp, $amount);
 
-        // Set transaction data
-        $trans->setAvsRequest( $custOrder->billing_address_1, $custOrder->billing_postcode );
-        $trans->setRequestField('cvv2', $cc_cvc);
-        $trans->setRequestField('invoice_number', $invNumb);
-        $trans->setTransactionData( $ccNumb, $cc_exp, $custOrder->order_total );
+        }
 
-        // Call the MeS Gateway
+        // Set the gateway host URL
         $trans->setHost($this->host);
 
-        if (GLM_MES_DEBUG_VERBOSE) {
-            wc_add_notice('GLM MeS Gateway: Transaction Request<p><pre>'.print_r($trans,1).'</pre></p>', 'success');
+        if ($doDebug && GLM_MES_DEBUG_VERBOSE) {
+            wc_add_notice(
+                    'GLM MeS Gateway: Transaction Request<p><pre>' .
+                    print_r($trans, 1) . '</pre></p>', 'success');
         }
 
+        // Execute the transaction
         $trans->execute();
 
-        if (GLM_MES_DEBUG_VERBOSE) {
-            wc_add_notice('GLM MeS Gateway: Response Fields<p><pre>'.print_r($tran2->ResponseFields,1).'</pre></p>', 'success');
-        }
+        // Get response codes and text
+        $response = $trans->ResponseFields;
 
-        // Check result
-        if( $trans->isApproved() ) {
-            $paymentState = 'approved';
-        } else {
-            $paymentState = 'fail';
-            $errorMsg = $trans->ResponseFields['auth_response_text'];
+        if ($doDebug && GLM_MES_DEBUG) {
+            wc_add_notice(
+                    'GLM MeS Gateway: Response Fields - Type = '.$trans_type.'<p><pre>' .
+                    print_r($response, 1) . '</pre></p>',
+                    'success');
         }
 
-        // Take action based on payment state
-        switch ($paymentState) {
+        // Check for success based on transaction type
+        switch ($trans_type) {
 
-            case 'complete':
+            case 'PreAuth':
 
-                // Mark order as complete
-                $order->payment_complete();
+                $auth = true;
 
-                // Return thank you page redirect
-                return array(
-                        'result' => 'success',
-                        'redirect' => $this->get_return_url( $order )
-                );
+                // Selectr "Show Additional Test Options" in "GLM Merchant e-Solutions" settings for these response codes.
 
-                break;
+                // If address verification
+                if ($this->settings['address_verification'] == 'yes') {
+                    if (!in_array($response['avs_result'], array('Y', 'X', 'D', 'S'))) {
+                        $auth = false;
+                        $response['auth_response_descr'] = "The address you entered does not seem to match the address for this credit card.
+                                Please check your address and try again.<br>";
+                    }
+                }
 
-            case 'call_for_approval':
+                // If CVV required
+                if ($this->settings['cvv_required'] == 'yes') {
+                    if (!in_array($response['cvv2_result'], array('M'))) {
+                        $auth = false;
+                        $response['auth_response_descr'] = 'You may not have entered the correct "Card Code" below.
+                                Please check the code on the back of your card and try again.<br>';
+                    }
+                }
 
-                // Mark as on-hold (use if payment delayed)
-                $order->update_status('on-hold', __( 'Awaiting authorization of Credit Card payment. Please call your Credit Card provider.', 'woocommerce' ));
-                return;
+                $response['success'] = $auth;
 
                 break;
 
-            case 'fail':
+            case 'Settle':
+            case 'Sale':
 
-                // Tell the user we had a payment failure
-                wc_add_notice( __("<h4>We're sorry, there was a problem with your payment...</h4><p><b>Reason:</b> ".$errorMsg.'</p><p>Please check your credit card information and try again.', 'woothemes') . $error_message, 'error' );
+                // Ask MES gateway code if the transaction was approved
+                $response['success'] = $trans->isApproved();
 
-                if (GLM_MES_DEBUG && !GLM_MES_DEBUG_VERBOSE) {
-                    wc_add_notice('GLM MeS Gateway: Response Fields<p><pre>'.print_r($trans->ResponseFields,1).'</pre></p>', 'success');
-                }
+                break;
+
+            case 'Refund':
 
-                return;
+                // Look at error_code to see if refund was successful
+                $response['success'] = false;
+                if ($response['error_code'] == '000') {
+                    $response['success'] = true;
+                }
 
                 break;
 
-            default:
+        }
 
-                // Need to figure this out
+        // Check for Gateway Error Codes
+        $lang = 'EN'; // *** TEMPORARY FOR TESTING ***
+        if (isset($this->respDescr[$response['error_code']])) {
+            $response['auth_response_descr'] .= $this->respDescr[$response['error_code']];
+        }
 
-                break;
+        return $response;
+
+    }
+
+    /*
+     * Process order with MES Gateway
+     */
+    public function process_payment ($order_id)
+    {
+
+        // Get a copy of our order
+        global $woocommerce;
+        $this->cust_order = new WC_Order($order_id);
+
+        // Get our invoice number
+        $this->invNumb = str_replace("#", "", $this->cust_order->get_order_number());
+
+        // Clean up the submitted credit card data
+        $this->ccNumb = str_replace(
+                array(
+                        ' ',
+                        '-'
+                ), '', $_POST[GLM_MES_ID . '-card-number']);
+        $this->cc_exp = str_replace(
+                array(
+                        '/',
+                        ' '
+                ), '', $_POST[GLM_MES_ID . '-card-expiry']);
+        $this->cc_cvc = (isset($_POST[GLM_MES_ID . '-card-cvc'])) ? $_POST[GLM_MES_ID .
+                 '-card-cvc'] : '';
+
+        /*
+         * Other data available from WooCommerce
+         *
+         * $this->cust_order->billing_first_name,
+         * $this->cust_order->billing_last_name,
+         * $this->cust_order->billing_address_1,
+         * $this->cust_order->billing_city,
+         * $this->cust_order->billing_state,
+         * $this->cust_order->billing_postcode,
+         * $this->cust_order->billing_country,
+         * $this->cust_order->billing_phone,
+         * $this->cust_order->billing_email,
+         *
+         * $this->cust_order->shipping_first_name,
+         * $this->cust_order->shipping_last_name,
+         * $this->cust_order->shipping_company,
+         * $this->cust_order->shipping_address_1,
+         * $this->cust_order->shipping_city,
+         * $this->cust_order->shipping_country,
+         * $this->cust_order->shipping_state,
+         * $this->cust_order->shipping_postcode,
+         *
+         * $this->cust_order->user_id,
+         *
+         */
+
+        if (GLM_MES_DEBUG_VERBOSE) {
+            wc_add_notice('GLM MeS Gateway: process_payment() called',
+                    'success');
+            wc_add_notice(
+                    'GLM MeS Gateway: Customer Order Data<p><pre>' .
+                             print_r($this->cust_order, 1) . '</pre></p>', 'success');
+        }
+
+        // Check if pre-authorization is required
+        if ($this->settings['address_verification'] == 'yes' ||
+                $this->settings['cvv_required'] == 'yes' ) {
+
+            // Try pre-authorization first
+            $response = $this->run_transaction('PreAuth');
+
+            // If pre-auth was not requested or was successful - run sale
+            if ($response['success']) {
+                $response = $this->run_transaction('Settle', false, $response['transaction_id']);
+            }
+
+        // Ohterwise we're just going to run it as a final sale
+        } else {
+
+            $response = $this->run_transaction('Sale', false, $response['transaction_id']);
+
+        }
+
+
+        // Check result
+        if ($response['success']) {
+
+            // Say the transaction is complete, mark as paid and empty cart
+            $this->cust_order->add_order_note( __( 'Merchant e-Solutions payment completed.', 'glm-merchant_e_solutions' ) );
+            $this->cust_order->payment_complete($response['transaction_id']);
+            $woocommerce->cart->empty_cart();
+
+            // Return thank you page redirect
+            return array(
+                    'result' => 'success',
+                    'redirect' => $this->get_return_url($this->cust_order)
+            );
+
+        } else {
+
+            // Tell the user we had a payment failure
+// THE VARIABLE DATA NEEDS TO BE APPENDED RATHER THAT INCLUDED. woothemes is not our method title
+            wc_add_notice(
+                    __(
+                            "<h4>We're sorry, there was a problem with your payment...</h4><p><b>Reason:</b> " .
+                                     $response['auth_response_text'] .
+                                     '</p><p>'.$response['auth_response_descr'],
+                                    'woothemes'), 'error');
+
+            // Add a note to the customer order for reference
+            $this->cust_order->add_order_note( 'Error: '. $response['auth_response_descr'] );
+
+            if (GLM_MES_DEBUG && ! GLM_MES_DEBUG_VERBOSE) {
+                wc_add_notice(
+                        'GLM MeS Gateway: Response Fields<p><pre>' .
+                                 print_r($trans->ResponseFields, 1) .
+                                 '</pre></p>', 'success');
+            }
 
         }
 
     }
 
+    /*
+     * Process a refund
+     */
+
+    public function process_refund( $order_id, $amount = null, $reason = '' )
+    {
+        // Get the order object
+        $order = wc_get_order( $order_id );
+
+        // Get the MES transaction ID stored with the order
+        $transaction_id = $order->get_transaction_id();
+
+        // Attempt the refund
+        $response = $this->run_transaction('Refund', $amount, $transaction_id);
+
+        // If refund was not successful
+        if (!$response['success']) {
+            $order->add_order_note( 'Refund not approved ('.$response['error_code'].'): '.$response['auth_response_text'].'<br><pre>'.print_r($response,1).'</pre>' );
+        }
+
+        // Return to WooCommerce with refund result status
+        return $response['success'];
+    }
 }
 
 ?>
\ No newline at end of file
 
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-04-22 14:29-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../.././includes/response_descriptions.php:14
+#: ../.././includes/response_descriptions.php:22
+#: ../.././includes/response_descriptions.php:23
+#: ../.././includes/response_descriptions.php:27
+msgid "Please contact your credit card issuer or try another card."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:15
+#: ../.././includes/response_descriptions.php:18
+msgid "Please contact your credit card issuer or try another card"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:16
+msgid ""
+"Your card may not be used at this time. Please contact your credit card "
+"issuer or try another card."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:17
+msgid ""
+"Your purchase using this credit card has been declined. If you have another "
+"credit card, you may try that at this time."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:19
+#: ../.././includes/response_descriptions.php:20
+msgid ""
+"Your credit card number appears to be incorrect. Please check the card "
+"number you entered and try again."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:21
+msgid ""
+"Your card was not successfully processed. Please try again. If you continue "
+"to get this response, please call for assistance."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:24
+msgid ""
+"Your card is not currently able to cover the cost of this purchase. Delete "
+"contents from your cart or try again later."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:25
+msgid ""
+"Your card appears to be expired. Please check your credit card information "
+"below or try another card."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:26
+msgid ""
+"This purchase is not permitted with your credit card. Please contact your "
+"credit card issuer or try another card."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:28
+msgid ""
+"There was a problem processing your credit cart. If you continue to get this "
+"response, please call for assistance."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:29
+msgid ""
+"We do not accept this type of credit card. Please try another card or call "
+"for assistance."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:30
+msgid ""
+"You did not supply all required credit card information. Please check your "
+"credit card payment information below."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:31
+msgid ""
+"The address you entered did not satisfactorlly match the cardholder's "
+"address."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:32
+msgid ""
+"The card security code (3 or 4 digit code, usually on the back of the card) "
+"did not match."
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:37
+msgid "(none)"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:38
+msgid "Card OK"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:39
+msgid "Call"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:40
+msgid "Call - special condition"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:41
+msgid "Hold-call - pick up card (no fraud)"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:42
+msgid "Decline - do not honor"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:43
+msgid "Hold-call - pick up card (fraud)"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:44
+msgid "Card # error"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:45
+msgid "No such issuer"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:46
+msgid "Re-enter transaction"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:47
+msgid "Hold-call - pickup card (fraud: lost card)"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:48
+msgid "Hold-call - pickup card (fraud: stolen card)"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:49
+msgid "Decline - insufficient funds"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:50
+msgid "Expired card"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:51
+msgid "Transaction not permitted to cardholder"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:52
+msgid "Suspected fraud"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:53
+msgid "Invalid Auth"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:54
+msgid "Unable to validate pin (not used in this plugin)"
+msgstr ""
+
+#: ../.././includes/response_descriptions.php:55
+msgid "Card type not accepted by merchant"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:192
+msgid "A Merchant e-Solutions payment Gateway plug-in for WooCommerce."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:351
+#, php-format
+msgid ""
+"\n"
+"                        <strong>%s</strong> is enabled and WooCommerce is "
+"not forcing the\n"
+"                        SSL certificate on your checkout page. <br>Please "
+"ensure that you have\n"
+"                        a valid SSL certificate and that you are <a href=\"%s"
+"\">forcing\n"
+"                        the checkout pages to be secured.</a>"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:377
+#, php-format
+msgid ""
+"%s depends on version %s and up of WooCommerce! Please upgrade before "
+"activating."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:433
+msgid "Enable/Disable"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:435
+msgid "Enable Merchant e-Solutions Gateway"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:442
+msgid "Title"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:445
+msgid "This controls the title which the user sees during checkout."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:447
+msgid "Credit Card Payment"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:453
+msgid "Description"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:459
+msgid "Credit Cards Accepted"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:468
+msgid "Visa"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:477
+msgid "MasterCard"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:486
+msgid "American Express"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:495
+msgid "Discover"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:502
+msgid "Require Address Verification"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:504
+msgid ""
+"Check to require valid address verification before charging credit card."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:510
+msgid "Require CVV/CVC/CID"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:512
+msgid "Check to require a valid credit card CVV/CVC/CID when charging card."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:517
+msgid "Test Mode Credentials"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:524
+msgid "Test Profile ID"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:532
+msgid "Test Profile Key"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:540
+msgid "Test URL"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:548
+msgid "Production Mode Credentials"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:556
+msgid "Production Profile ID"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:564
+msgid "Production Profile Key"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:572
+msgid "Production URL"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:579
+msgid "Mode Selection"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:586
+msgid "Transaction Mode"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:589
+msgid "Must be in \"Production Mode\" for live transactions."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:593
+#, php-format
+msgid ""
+"See %s MeS Payment Certification Form</a> to apply for required ID and Key."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:600
+msgid "Test Mode"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:601
+msgid "Production Mode"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:607
+msgid "Amount Driven Tests"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:609
+msgid ""
+"Selecting an amount driven test will set the payment amount for the "
+"transaction to the specific value\n"
+"                                and will cause the payment gateway to return "
+"the associated respose. This may be used to test all\n"
+"                                possible response types that might be "
+"experienced in production use."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:613
+msgid "Show Additional Test Options"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:621
+msgid "Enable Debug Information"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:623
+msgid "Check to enable debug output on checkout page."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:629
+msgid "Enable Verbose Debug"
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:631
+msgid "Check to enable verbose output on checkout page."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:919
+msgid "Merchant e-Solutions payment completed."
+msgstr ""
+
+#: ../.././classes/glmMesGateway.php:935
+msgid ""
+"<h4>We're sorry, there was a problem with your payment...</h4><p><b>Reason:</"
+"b> "
+msgstr ""