-
Notifications
You must be signed in to change notification settings - Fork 12
Implemented first draft of usdt integration #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Implemented first draft of usdt integration #161
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall code and functionality is working well.
It will be a good idea to only start polling if USDT is enabled, to avoid unnecessarily starting the background process.
$path = __DIR__ . '/pollTransactionStatus.php'; | ||
|
||
// Command to check if the specific PHP script is running | ||
$checkCommand = "pgrep -f 'php $path'"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I experience issues with this check. $output is set, but the script is not running in the background. I had to use the following in order for the script to start running correctly:
// Command to check if the specific PHP script is running
$output = [];
$checkCommand = "pgrep -f 'php $path'";
exec($checkCommand, $output, $return_var);
$pid = (int)$output[0];
$command = "ps -p $pid";
$output = [];
exec($command, $output);
$isRunning = count($output) > 1;
if (!$isRunning) {
$startCommand = "php $path > /dev/null &";
exec($startCommand, $startOutput, $startReturnVar);
}
Please verify the commands that check if background polling is already running are correct and update accordingly.
Another working alternative:
// Command to check if the specific PHP script is running
$command = "ps aux | grep $path";
$output = [];
exec($command, $output);
$isRunning = count($output) > 2;
if (!$isRunning) {
$startCommand = "php $path > /dev/null &";
exec($startCommand, $startOutput, $startReturnVar);
}
USDT Payment Gateway Integration for WHMCS via Blockonomics
Description
Accept USDT (Tether) payments on your WHMCS website with ease. With this integration, payments are directly connected to your customers' MetaMask wallets, ensuring secure and straightforward transactions without intermediaries.
Key Features
Installation Guide
modules
folder to your root WHMCS directory.Setup -> Payments -> Payment Gateways
, and activate Blockonomics as a payment option.upgrade.php
found inmodules/gateways/blockonomics/upgrade.php
to remove unnecessary files and ensure your system is up-to-date.Tags
USDT
WHMCS
Payment Gateway
Crypto Payments
Blockonomics
MetaMask
Secure Payments
Cryptocurrency