Rushi Posted March 29, 2018 Share Posted March 29, 2018 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 More sharing options...
brian! Posted March 31, 2018 Share Posted March 31, 2018 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. 1 Link to comment Share on other sites More sharing options...
Recommended Posts