Accept payments from your Dhru Fusion customers through PayerNex. Funds land directly in your Binance wallet or bank account — PayerNex just verifies and confirms the payment, then tells Dhru to mark the invoice paid.
This folder contains the files you need to upload to your Dhru server:
modules/gateways/payernex.php ← gateway module
modules/gateways/callback/payernex.php ← payment confirmation handler
modules/gateways/callback/.htaccess ← whitelist for the callback (merge with existing)
Using FTP, SFTP, or your hosting control panel's file manager, copy the two files into the matching folders inside your Dhru installation:
| File from this plugin | Upload to (on your Dhru server) |
|---|---|
modules/gateways/payernex.php |
/your-dhru-folder/modules/gateways/payernex.php |
modules/gateways/callback/payernex.php |
/your-dhru-folder/modules/gateways/callback/payernex.php |
Tip: The simplest way is to just upload the whole
modules/folder into your Dhru root — the paths will line up automatically.
Dhru's modules/gateways/callback/.htaccess blocks all PHP files by default and only allows a specific list of known gateway callbacks. If you skip this step, every webhook from PayerNex will return 403 Forbidden and your invoices will never get marked paid.
Open modules/gateways/callback/.htaccess on your Dhru server and find the line that starts with <FilesMatch. Append |^payernex\.php to the end of the list, right before the closing ">:
<FilesMatch "^wombi\.php|^gourlio\.php|…|^galaxpay\.php|^payernex\.php">Save the file. No need to restart anything — Apache picks up the change on the next request.
Don't overwrite the whole
.htaccess— your existing Dhru install has its own gateway list that you want to keep. We ship a reference copy atmodules/gateways/callback/.htaccessin this plugin only for comparison; just add the one|^payernex\.phpentry to your live file.
- Sign in to your PayerNex account at https://payernex.com
- Go to Dashboard → API Keys (left sidebar under Developer)
- You'll see two values — keep this page open, you'll paste them into Dhru next:
- API Key (a long hex string)
- Webhook Secret
-
Log in to your Dhru Admin Panel
-
Go to Settings → Payment Gateways
-
Click Activate on the PayerNex row
-
Fill in the two fields:
Field What to paste Merchant Token The API Key you copied from PayerNex in Step 3 Webhook Secret The Webhook Secret from the same page -
Click Save Changes
-
On the same screen you'll see a Webhook / Callback URL box — copy that URL (you'll need it in the next step)
The callback URL is set per-gateway inside PayerNex, not in a global setting.
- Back in your PayerNex Dashboard, open Gateway Settings (left sidebar under Payments)
- Click Edit on the gateway you want to receive Dhru payments on (Binance / Bank / TRC20 / BEP20 — whichever one your customers will pay through)
- Find the field labelled Callback / Webhook URL
- Paste the URL you copied from Dhru in Step 4
- Click Update Gateway
If you have multiple gateways enabled (e.g. Binance + BEP20 wallet), paste the same callback URL into each one — PayerNex will notify Dhru regardless of which method the customer chose.
- In Dhru, add a small amount of funds to any test customer (e.g. $1)
- Choose PayerNex as the payment method and proceed
- You'll be redirected to the PayerNex checkout page
- Scan the QR with your Binance app (or send USDT manually), paste the NOTE code shown, confirm the payment
- Within a few seconds Dhru will mark the invoice as Paid and the customer's balance will update
Done — PayerNex is live on your Dhru panel.
| Problem | What to check |
|---|---|
| "PayerNex" not visible under Payment Gateways | Make sure both files uploaded to the correct folders. Refresh the Dhru admin page. |
| Customer redirected but sees "Invalid credentials" | Merchant Token in Dhru doesn't match the API Key in PayerNex. Re-copy and save. |
| Payment completed on PayerNex but invoice still unpaid on Dhru | The Dhru callback URL (Step 4) isn't pasted into your PayerNex gateway's Callback / Webhook URL field (Step 5). Open the gateway in PayerNex → Edit → paste → Update. |
Callback gets 403 Forbidden when hit directly |
You skipped Step 2a — payernex.php isn't in the <FilesMatch> whitelist of modules/gateways/callback/.htaccess. Add |^payernex\.php to the list and save. |
| "Invalid signature" in Dhru gateway log | The Webhook Secret doesn't match. Copy it fresh from the PayerNex dashboard into Dhru. |
| Redirect page says "Order not found" | Your Dhru server can't reach PayerNex. Check your server's outbound internet connection / firewall. |
Need help? Contact your PayerNex reseller or email support@payernex.com with a screenshot of the error and your Dhru site URL.
- Dhru Fusion v2024 or newer
- PHP 7.4+ with the
curlextension enabled (every standard hosting setup already has this) - An active PayerNex account with at least one payment gateway (Binance, bank, or crypto wallet) configured
© 2026 PayerNex. Developed by Umair Abubakkar.