I've set up a bash script to automate few tasks that we did manually, but to complete this we would need to execute this script at the time of accepting an order. From reviewing some online threads, I guess it could be possible using the WHMCS AcceptOrder hook [ https://developers.whmcs.com/hooks-reference/shopping-cart/#acceptorder ] , but I'm not sure how this can be applied to get it work.
My requirement is:
- We have a custom product, once they have paid the fee and when the order accepted a bash script need to execute.
- The client will give an IP address on a custom field at the time of order, and that need to pass as an argument to the script including the client name and email address.
- for eg: /root/automate_script.sh $ipaddress $name $email
If so, how would I go further doing it? Can someone shed some light on this with an example code, that would be much helpful.