Jump to content

A hook after successful Checkout


VeraVault

Recommended Posts

  • WHMCS CEO

Hi,

 

You should look at using the InvoicePaid hook for this. Within that function you'll be passed the invoice ID that just got paid in the $vars['invoiceid'] variable and then if you find an entry for that invoice ID in the tblorders table invoiceid field, then it's a payment for a new order and you should run your desired code.

 

Matt

Link to comment
Share on other sites

  • 7 months later...

What about generated invoices of existing orders? for example, when a customer pays an invoice on a regular basis. Should I look at table tblinvoiceitems? What is the relid in tblinvoiceitems? I would like to handle paid invoices for both new orders and existing orders. Do I need to treat them differently?

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