From a06013157779530ebbf2d0d1943aaeb76f13a79a Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 11 Apr 2018 15:07:55 -0400 Subject: [PATCH] Update billing support class Adding docs to class. --- classes/billingSupport.php | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/classes/billingSupport.php b/classes/billingSupport.php index 7256ea9..4b76a4b 100644 --- a/classes/billingSupport.php +++ b/classes/billingSupport.php @@ -134,6 +134,7 @@ class GlmBillingSupport } + // Handle the rest of $payment if ( $payment ) { // Get the unpaid invoices @@ -943,6 +944,16 @@ class GlmBillingSupport /** * createMemberInvoiceWithEmployees * + * Expects to have $invoice_data array with following keys: + * account_id + * renew_type_id + * amount + * due_date + * member_invoice + * employee_data + * + * @param mixed $invoice_data Array of invoice data + * * @access public * @return int */ @@ -1087,6 +1098,19 @@ class GlmBillingSupport ); } + /** + * processPayment + * + * Manages the payment processing for billing. + * This has been updated to use the new payment gateways. + * + * @param int $account_id Account id + * @param int $payment_id Payment id + * @param float $amount Amount of payment + * + * @access public + * @return mixed + */ public function processPayment( $account_id, $payment_id, $amount ) { $errors = array(); @@ -1359,6 +1383,18 @@ class GlmBillingSupport } + /** + * makePayment + * + * Calls the processPayment method, creates payment and records it. + * + * @param int $account_id Account id + * @param mixed $invoices Array of invoices + * @param float $amount Amount of payment + * + * @access public + * @return void + */ public function makePayment( $account_id, $invoices, $amount ) { $payment_id = implode( '-', $invoices ); @@ -1408,6 +1444,16 @@ class GlmBillingSupport ); } + /** + * updateAccountRenewalDate + * + * Update the renewal date for the given account. + * + * @param int $account Account number + * + * @access public + * @return void + */ public function updateAccountRenewalDate( $account ) { $this->wpdb->update( -- 2.17.1