From: Steve Sutton Date: Fri, 21 Sep 2018 14:28:44 +0000 (-0400) Subject: Update for dealing with auth errors and reshowing renewal form. X-Git-Tag: v1.0.10^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=773e5dabb6c1f1069a876ce0637117f84a241e8d;p=WP-Plugins%2Fglm-member-db-billing.git Update for dealing with auth errors and reshowing renewal form. Allows the form to work after a submit with error from auth.net. --- diff --git a/models/admin/member/billing.php b/models/admin/member/billing.php index e245548..2395c8f 100644 --- a/models/admin/member/billing.php +++ b/models/admin/member/billing.php @@ -267,7 +267,7 @@ class GlmMembersAdmin_member_billing // extends GlmDataBilling // Now that the invoice is created. Do payment Processing. - // If there's any rrors then re-show the form. + // If there's any errors then re-show the form. if ( $error ) { // Remove the invoice created. if ( $invoice_id ) { @@ -294,6 +294,13 @@ class GlmMembersAdmin_member_billing // extends GlmDataBilling // Need to see if there's an account for this member. $account = $Accounts->editEntry( $accountID ); + + // Need to get the accounts + $Accounts = new GlmDataAccounts( $this->wpdb, $this->config ); + $accounts = $Accounts->getSimpleAccountList( "T.boss <> true AND T.boss IS NOT NULL AND T.invoice_type != 0", 'ref_name' ); + // echo '
$accounts: ' . print_r( $accounts, true ) . '
'; + + $invoiceTypes = $BillingSupport->getAllPayableInvoiceTypes(); } else { // Look at the payment option given $payment_option = filter_var( $_REQUEST['payment_option'], FILTER_SANITIZE_STRING ); @@ -337,6 +344,13 @@ class GlmMembersAdmin_member_billing // extends GlmDataBilling // Need to see if there's an account for this member. $account = $Accounts->editEntry( $accountID ); + + // Need to get the accounts + $Accounts = new GlmDataAccounts( $this->wpdb, $this->config ); + $accounts = $Accounts->getSimpleAccountList( "T.boss <> true AND T.boss IS NOT NULL AND T.invoice_type != 0", 'ref_name' ); + // echo '
$accounts: ' . print_r( $accounts, true ) . '
'; + + $invoiceTypes = $BillingSupport->getAllPayableInvoiceTypes(); } break; case 'pay_by_check':