Jump to content

Script to check for unpaid invoice with payment method (directdebit)


Recommended Posts

Hi Guys I need a script to do the following every day via cron.

1: Check for unpaid invoice with payment method (directdebit)

2: Pay for invoice and send out payment advice.

3: Will need to make changes in the directdebit.php module to send email to myself with the direct debit request and bank details.

 

This is the info I was given from WHMCS staff.

 

 

http://docs.whmcs.com/Hooks:System#DailyCronJob - this is the hook I would recommending using for this.

http://docs.whmcs.com/API:Internal_API - This shows how to use the API internally

http://docs.whmcs.com/API:Get_Invoices - filter by unpaid and then loop through the invoices until you get one with the correct payment method and due date.

http://docs.whmcs.com/API:Add_Invoice_Payment - use this to add a payment to the invoice with an appropriate transaction ID.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated