Keith Posted January 22, 2011 Share Posted January 22, 2011 I'm running 4.4.2 and I'm trying to do some auto-provisioning. I need the invoiceid as part of that but AfterShoppingCartCheckout is returning a blank invoiceid ... Here's my hook code: function afterCheckout($vars) { print_r($vars); exit(); } add_hook("AfterShoppingCartCheckout",1,"afterCheckout"); Here's the result as soon as I click Checkout: Array ( [OrderID] => 39 [OrderNumber] => 6781259185 [Products] => Array ( ) [Domains] => Array ( ) [Addons] => Array ( [0] => 33 ) [Renewals] => Array ( ) [PaymentMethod] => paypal [invoiceID] => ) Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted January 22, 2011 Share Posted January 22, 2011 Is the product amount $0? It might not even generate an invoice if there is nothing due. 0 Quote Link to comment Share on other sites More sharing options...
Keith Posted January 22, 2011 Author Share Posted January 22, 2011 It's $0, but it is generating an invoice. If I later wait for InvoicePaid, it returns the invoiceid no problem. Of course if I look into the DB, I see the entries for the invoice no problem. I tried storing the OrderID, then, on InvoicePaid taking that invoice ID and looking up the corresponding OrderID in tblorders but WHMCS doesn't add the entry into tblorders until well after the InvoicePaid hook happens... so there's no way for me to look it up that way. 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.