From a5601887d9b43b52f9f21013d0f67743a444bbb9 Mon Sep 17 00:00:00 2001
From: Chuck Scott Reason:We\'re sorry, there was a problem with your payment...
' .
- 'You have exceeded the maximum number of attempts to process your credit card.
- Please contact us for assistance.',
- 'woothemes'), 'notice');
-
- // Add a note to the customer order for reference
- $this->cust_order->add_order_note( 'Error: '. 'Number of credit card processing attempts exceeded.' );
-
- if (GLM_MES_DEBUG && ! GLM_MES_DEBUG_VERBOSE) {
- wc_add_notice(
- 'GLM MeS Gateway: Maximum attempts exceeded!', 'notice');
- }
-
- return array(
- 'result' => 'failure',
- 'redirect' => $this->get_return_url($this->cust_order)
- );
-
- }
-
// Get our invoice number
$this->invNumb = str_replace("#", "", $this->cust_order->get_order_number());
@@ -1038,6 +1032,22 @@ class GlmMesGateway extends WC_Payment_Gateway
$this->cc_cvc = (isset($_POST[GLM_MES_ID . '-card-cvc'])) ? $_POST[GLM_MES_ID .
'-card-cvc'] : '';
+ // Check for required credit card data
+ if (trim($this->ccNumb) == '' || trim($this->cc_exp) == '' || trim($this->cc_cvc) == '') {
+
+ wc_add_notice(
+ __(
+ 'You have not supplied the required Credit Card information!
+ Please complete the credit card number, expiration date, and card code in the form below at the bottom of the page.',
+ 'woothemes'), 'notice');
+
+ return array(
+ 'result' => 'failure',
+ 'redirect' => $this->get_return_url($this->cust_order)
+ );
+
+ }
+
/*
* Other data available from WooCommerce
*
@@ -1072,6 +1082,31 @@ class GlmMesGateway extends WC_Payment_Gateway
print_r($this->cust_order, 1) . '
Reason:
' .
+ 'You have exceeded the maximum number of attempts to process your credit card.
+ Please contact us for assistance.',
+ 'woothemes'), 'notice');
+
+ // Add a note to the customer order for reference
+ $this->cust_order->add_order_note( 'Error: '. 'Number of credit card processing attempts exceeded.' );
+
+ if (GLM_MES_DEBUG && ! GLM_MES_DEBUG_VERBOSE) {
+ wc_add_notice(
+ 'GLM MeS Gateway: Maximum attempts exceeded!', 'notice');
+ }
+
+ return array(
+ 'result' => 'failure',
+ 'redirect' => $this->get_return_url($this->cust_order)
+ );
+
+ }
+
// Check if Address Verification is required
if ($this->settings['address_verification'] == 'yes') {
diff --git a/glm-woocommerce-merchant-e-solutions-gateway.php b/glm-woocommerce-merchant-e-solutions-gateway.php
index ab20e26..f0100a5 100644
--- a/glm-woocommerce-merchant-e-solutions-gateway.php
+++ b/glm-woocommerce-merchant-e-solutions-gateway.php
@@ -3,7 +3,7 @@
* Plugin Name: GLM WooCommerce Merchant e-Solutions Gateway
* Plugin URI: http://www.gaslightmedia.com/
* Description: Gaslight Media Merchant e-Solutions support for WooCommerce. Provides a payment gateway that will process WooCommerce payments and refunds through Merchant e-Solutions. For more information on Merchant e-Solutions see their Website at https://www.merchante-solutions.com/.
- * Version: 1.0.3
+ * Version: 1.0.4
* Author: Gaslight Media
* Author URI: http://www.gaslightmedia.com/
* Text Domain: glm-woocommerce-merchant-e-solutions-gateway
@@ -21,7 +21,7 @@
* @package glmMerchantESolutions
* @author Chuck Scott