For become member form have to setup $_REQUEST array for billing data.
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 22 Jun 2018 14:46:45 +0000 (10:46 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 22 Jun 2018 14:46:45 +0000 (10:46 -0400)
Need the billing data set for Authorize.net

index.php
models/front/billing/becomeMember.php

index 1910f6f..df12693 100644 (file)
--- 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.3
+ * Version: 1.0.4
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -19,7 +19,7 @@
  * @package glmMembersBillingAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.0.3
+ * @version 1.0.4
  */
 
 /*
@@ -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.3');
+define('GLM_MEMBERS_BILLING_PLUGIN_VERSION', '1.0.4');
 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.
index 2ff1ac8..45eae39 100644 (file)
@@ -469,6 +469,15 @@ class GlmMembersFront_billing_becomeMember // extends GlmDataBilling
                     $payment_option = filter_var( $_REQUEST['payment_option'], FILTER_SANITIZE_STRING );
                     switch ( $payment_option ) {
                     case 'pay_by_credit_card':
+                        // Setup $_REQUEST ARRAY for billing
+                        $_REQUEST['billing_fname'] = $member_fname;
+                        $_REQUEST['billing_lname'] = $member_lname;
+                        $_REQUEST['billing_addr1'] = $billing_addr1;
+                        $_REQUEST['billing_city']  = $billing_city;
+                        $_REQUEST['billing_state'] = $billing_state;
+                        $_REQUEST['billing_zip']   = $billing_zip;
+                        $_REQUEST['billing_phone'] = $billing_phone;
+                        $_REQUEST['email']         = $memberContactEmail;
                         // Do the Payment Processing.
                         $processErrors = $BillingSupport->processMemberRenewal( $accountID, $invoice_id, $invoice_data['amount'], $invoice_data['employees'] );
                         if ( $processErrors ) {