Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 737 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Collect a custom field data for a product at the time of order and termination

#1
I'm currently working on some automation things in WHMCS. I've several custom products available in WHMCS:

Linux product 1
Linux product 2
Windows product 1
Windows product 2

I want to execute a bash script when an order accept and when the service terminate from the WHMCS. The script require an argument (IP address) which is a custom field for the above products. The script should fetch this custom field data containing IP address, and compare the products whether it is Linux or Windows and then pass it to the script as follows:

- If the product is a Linux one, then the script pass would be like "autoaccept.sh linux [IP]"

- If the product is Windows one, then the script call would be like "autoaccept.sh windows [IP]"

- Similar way, when the package terminate on WHMCS we have to call the script again with "autoterminate.sh [IP]"

The WHMCS AcceptOrder and AfterModuleTerminate hook can be used I guess. But not sure how we can fetch these custom field data and compare the products within hook PHP code there. Can anyone shed some light on this or help our me to code this correctly.

Any responses would be much appreciated!

Created the Bash scripts already, and is working perfectly. I'm new to WHMCS hook and PHP things, so stucked here.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through