Hi Guys I need a script to run each day and check WHMCS for due invoices with (diredtdebit) as the payment method selected.
Script will then need to apply payment to that invoice then send out payment advice.
This script will not have to do any other processing.
This is the info I have been given from WHMCS support.
[url removed, login to view]:System#DailyCronJob - this is the hook I would recommending using for this.
[url removed, login to view]:Internal_API - This shows how to use the API internally
[url removed, login to view]:Get_Invoices - filter by unpaid and then loop through the invoices until you get one with the correct payment method and due date.
[url removed, login to view]:Add_Invoice_Payment - use this to add a payment to the invoice with an appropriate transaction ID.
You will also need to modify [url removed, login to view] to send email to me with the bank details etc when client selects the direct debit mode