Developer: Hook to be called when payment is approved

Guys,



I wanted to post this in the developer forum but I can't post there.



I'm trying to see if I can integrate a license manager (Digital Distribution - General Questions - CS-Cart Community Forums) into CS-Cart. I've very familiar with programming and PHP/Javascript. Just not with CS-Cart (yet).



Which hook should I use to be notified of a succesful order? That way when a succesfull order happens I can assign the newly generated license codes to the order entry ( one for each product ordered that has license keys).



I've been going through the example plugins but nothing seems to hook that specific event, if I can look at something that hooks that event that would be helpfull too.



Ron

Come to think of it the better hook would be when an order goes into the “Processed” state, which I assume means it has been paid but not shipped.

I'm not exactly sure what you are trying to do, but to add things like Google Code or similar, you can create a file called:



skins/your-skin-name/customer/addons/my_changes/hooks/checkout/order_confirmation.override.tpl



That is what comes after the order is sent it.



I hope that helps,



Brandon

Sounds like he needs to make an HTTP request and get a license number back that is then attached to the order.



You could add a product feature field called License Number and hide it using CSS. Then hook into the cart controller, I forget the code hook, but make your call, get your license number and write it to the database in the field you created. You could also send it to the smarty variable and display it on the checkout.complete page as well.