From: Steve Sutton Date: Mon, 6 May 2019 17:11:24 +0000 (-0400) Subject: Fix the payment methods X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=222a2c8e3cc85f127fe92124ed63f618dd330886;p=WP-Plugins%2Fglm-member-db-billing.git Fix the payment methods Setting this up as new config name so it is not confused with the one from registrations. --- diff --git a/classes/data/dataManagement.php b/classes/data/dataManagement.php index 0fe6be6..673b503 100644 --- a/classes/data/dataManagement.php +++ b/classes/data/dataManagement.php @@ -119,7 +119,7 @@ class GlmDataBillingManagement extends GlmDataAbstract 'payment_methods' => array ( 'field' => 'payment_methods', 'type' => 'bitmap', - 'bitmap' => $this->config['payment_method'], + 'bitmap' => $this->config['billing_payment_method'], 'default' => 0, // none selected 'use' => 'a' ), diff --git a/config/plugin.ini b/config/plugin.ini index 82e728d..f3e0ca8 100644 --- a/config/plugin.ini +++ b/config/plugin.ini @@ -21,23 +21,13 @@ transaction_numb['Comment'] = 40; ; ; Payment Method - Use as Bitmap Index or List ; -payment_method[1] = 'No Charge' -payment_method[2] = 'Pay On Arrival' -payment_method[3] = 'Cash' -payment_method[4] = 'Check' -; payment_method[5] = 'Call from Merchant' -payment_method[6] = 'Credit Card' -payment_method[7] = 'PayPal' -payment_method [10] = 'Payment Pending' - -payment_method_numb['NoCharge'] = 1 -payment_method_numb['OnArrival'] = 2 -payment_method_numb['Cash'] = 3 -payment_method_numb['Check'] = 4 -; payment_method_numb['CallFromMerchant'] = 5 -payment_method_numb['CreditCard'] = 6 -payment_method_numb['PayPal'] = 7 -payment_method_numb['Pending'] = 10 +billing_payment_method[1] = 'Check' +billing_payment_method[2] = 'Credit Card' +billing_payment_method[3] = 'Mark Paid' + +billing_payment_method_numb['Check'] = 1 +billing_payment_method_numb['CreditCard'] = 2 +billing_payment_method_numb['MarkPaid'] = 3 ; Default payment method is Credit Card default_payment_method = 6 diff --git a/models/admin/member/billing.php b/models/admin/member/billing.php index 4b4cfda..ba53e49 100644 --- a/models/admin/member/billing.php +++ b/models/admin/member/billing.php @@ -1008,7 +1008,7 @@ class GlmMembersAdmin_member_billing // extends GlmDataBilling 'account_status' => $account_status, 'accounts' => $accounts, 'invoiceTypes' => $invoiceTypes, - 'paymentMethods' => $this->config['alt_payment_method'], + 'paymentMethods' => $this->config['billing_payment_method'], 'renewalFormSession' => $renewalFormSession, 'nextInvoiceDate' => $nextInvoiceDate, 'pluginJsUrl' => GLM_MEMBERS_BILLING_PLUGIN_URL . '/js', diff --git a/views/common/billing/paymentForm.html b/views/common/billing/paymentForm.html index bce7184..93f5ea5 100644 --- a/views/common/billing/paymentForm.html +++ b/views/common/billing/paymentForm.html @@ -89,9 +89,15 @@ Select Payment Option
+ {if in_array( 'Credit Card', $management.payment_methods.names)} + {/if} + {if in_array( 'Check', $management.payment_methods.names)} + {/if} + {if in_array( 'Mark Paid', $management.payment_methods.names)} + {/if}
{/if}