VeraVault Posted January 4, 2010 Share Posted January 4, 2010 Hello, I made a function that uses the hook: AfterShoppingCartCheckout But it looks like that function triggers even if the payment does not go through. Anyway to get this hook or maybe another hook to trigger on successful check out? Thanks 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted January 4, 2010 WHMCS CEO Share Posted January 4, 2010 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 1 Quote Link to comment Share on other sites More sharing options...
VeraVault Posted January 4, 2010 Author Share Posted January 4, 2010 Thanks I will try it, I was also looking at AfterModuleCreate. 0 Quote Link to comment Share on other sites More sharing options...
chatpert Posted August 26, 2010 Share Posted August 26, 2010 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? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.