}
+ // Handle the rest of $payment
if ( $payment ) {
// Get the unpaid invoices
/**
* 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
*/
);
}
+ /**
+ * 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();
}
+ /**
+ * 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 );
);
}
+ /**
+ * 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(