From 1701a042ef59b9bef2b645e0b6912038e13364e8 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 22 Jun 2018 10:14:47 -0400 Subject: [PATCH] Update the message returned when there's an issue from payment proc. If there's an error in processing the card display that message. --- index.php | 6 +++--- models/front/billing/becomeMember.php | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index df0cabb..65ca3c7 100644 --- a/index.php +++ b/index.php @@ -3,7 +3,7 @@ * Plugin Name: GLM Members Billing * Plugin URI: http://www.gaslightmedia.com/ * Description: This is glmAssociate Billing Module - * Version: 1.0.1 + * Version: 1.0.2 * Author: Gaslight Media * Author URI: http://www.gaslightmedia.com/ * License: GPL2 @@ -19,7 +19,7 @@ * @package glmMembersBillingAddOn * @author Chuck Scott * @license http://www.gaslightmedia.com Gaslightmedia - * @version 1.0.1 + * @version 1.0.2 */ /* @@ -37,7 +37,7 @@ * so that we're sure the other add-ons see an up to date * version from this plugin. */ -define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.1'); +define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.2'); define('GLM_MEMBERS_BILLING_PLUGIN_DB_VERSION', '0.0.25'); // This is the minimum version of the GLM Members DB plugin require for this plugin. diff --git a/models/front/billing/becomeMember.php b/models/front/billing/becomeMember.php index 0a8390f..780d54b 100644 --- a/models/front/billing/becomeMember.php +++ b/models/front/billing/becomeMember.php @@ -474,7 +474,8 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling if ( $processErrors ) { if ( count( $processErrors ) > 0 ) { $error = true; - $messages[] = 'An error occurred! processErrors'; + $error_message = ( isset( $processErrors[0] ) && $processErrors[0] ) ? $processErrors[0] : 'There was an error trying to process your card!'; + $messages[] = 'An error occurred! ' . $error_message . ''; } } break; -- 2.17.1