Jump to content

A hook that runs just before the payment is done or just before an invoice is paid


Rushi

Recommended Posts

Hello,

I want to run my code just before the payment is made. There is a hook AfterShoppingCartCheckout that runs when a new order is placed, but I can not find a hook that runs just before an invoice is paid. 

There are some other hooks that I have studied, but I think they will not work here just before an invoice is paid:

  • AddTransaction
  • AddInvoicePayment
  • InvoicePaid
  • InvoiceChangeGateway
  • InvoicePaidPreEmail

@brian! If you can please help me out with this.

Thanks

Rushi

Link to comment
Share on other sites

Hi Rushi,

On 3/29/2018 at 12:03, Rushi said:

I want to run my code just before the payment is made.

from your limited description, i'd have said InvoicePaidPreEmail because while it would run after the invoice has paid, it's triggered before WHMCS sends emails or runs aotomatic processes.

the difficulty is not knowing exactly what you want to do, and also because paying an invoice could be immediately after the order or weeks later, so it's a case of knowing where in the process is the most appropriate to do whatever it is that you want to do.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • 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