atDev Posted May 25, 2007 Share Posted May 25, 2007 How can we include a php file to be run only on the successful payment rather than before they pay? 0 Quote Link to comment Share on other sites More sharing options...
Adam Posted May 25, 2007 Share Posted May 25, 2007 How can we include a php file to be run only on the successful payment rather than before they pay? Hey, You can't. Checkoutscript comes before any payment gateway is used, this is how its supposed to run. From, Adam 0 Quote Link to comment Share on other sites More sharing options...
trine Posted May 25, 2007 Share Posted May 25, 2007 I suppose if you are apt enough with php and mysql, you could create a query for new accounts present in the db, then cron it to trigger the action. Another way perhaps: I haven't tried yet, but it may also be possible to try to run something once payment is posted from the template side, after successful payment is made, you can look for a post and trigger the action. 0 Quote Link to comment Share on other sites More sharing options...
atDev Posted May 25, 2007 Author Share Posted May 25, 2007 You can't. Checkoutscript comes before any payment gateway is used, this is how its supposed to run. Yes I realize that. My question was not about the current checkout script feature. If this is not a feature then it should be. WHMCS should have a plugin system similar to vB. Having the checkoutscript only run before payment is made is useless in many cases simply because it will run for orders where users backup, where the payment is fraud, and so on. Another way perhaps: I haven't tried yet, but it may also be possible to try to run something once payment is posted from the template side, after successful payment is made, you can look for a post and trigger the action. Sure but it would be nice if we could simply access the code for the gateway returns and do it that way. There is always the chance a user won't return automatically to the site after they pay. I suppose if you are apt enough with php and mysql, you could create a query for new accounts present in the db, then cron it to trigger the action. Yeah thats easy, but my point is having this built in, or the code accessible so we can just make our own plugin. The cron method would also not immediately run the script (for the scenario where you need to say create a support account for the user after they pay, or something along these lines). 0 Quote Link to comment Share on other sites More sharing options...
trine Posted May 25, 2007 Share Posted May 25, 2007 I can totally agree with you on all this. But for now that where it stands... You'll have to ask Matt, but there is an API in the works, that hopefully will allow us do things like this too and much more 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.