Dujiaoka Integration
Dujiaoka is supported through the Epusdt payment plugin. This page covers the actual fields used by the plugin and the current Epusdt endpoint.
Prerequisites
| Requirement | Details |
|---|---|
| Dujiaoka version | The official plugin folder in the Epusdt repo is explicitly for Dujiaoka below 2.0.4. For 2.0.4+ the plugin may already be built in. |
| Plugin files for old versions | If you use an older Dujiaoka release, copy the plugin's app and routes directories into the Dujiaoka site root as described in plugins/dujiaoka/README.md. |
| Epusdt | Publicly reachable from the Dujiaoka server, or reachable by LAN/local address if both run on the same host/network. |
| API token | api_auth_token from Epusdt .env. |
| Callback reachability | Epusdt must be able to POST back to the Dujiaoka notify URL generated by the plugin. |
What the Dujiaoka plugin actually sends
The official plugin sends these fields to Epusdt when an order is created:
amountorder_idnotify_urlredirect_urlsignature
You do not manually configure notify_url or redirect_url inside Epusdt. Dujiaoka generates them for each order.
Dujiaoka configuration
In Dujiaoka, add or edit the Epusdt payment method. The official plugin README uses these admin field labels, and the plugin code shows how they are consumed:
| Dujiaoka field | Value | Used by plugin code as |
|---|---|---|
| Payment option | Epusdt | Payment handler name |
| Merchant ID | Your Epusdt api_auth_token | Signing key (merchant_id) |
| Merchant Key | Leave empty | Not used by this plugin |
| Merchant Secret | Full Epusdt create-order URL. For current Epusdt source, use https://your-epusdt-domain/payments/epusdt/v1/order/create-transaction | Request target URL (merchant_pem) |
Notes:
- Use the full request URL, not only the domain.
- If Dujiaoka and Epusdt are on the same server, a local address such as
http://127.0.0.1:8000/payments/epusdt/v1/order/create-transactioncan avoid proxy issues. - The plugin README inside the Epusdt repo still shows the older
/api/v1/order/create-transactionexample. That example is stale relative to the current Epusdt source. Use/payments/epusdt/v1/order/create-transactioninstead. - Source confirms the plugin signs requests with
merchant_idand sends the HTTP POST tomerchant_pem, so the admin labels above are not just guesswork.
Callback / return behavior
The route file shipped in plugins/dujiaoka/routes/common/pay.php registers these Dujiaoka-side endpoints:
- Notify URL:
POST /pay/epusdt/notify_url - Return URL:
GET /pay/epusdt/return_url - Payment entry:
GET /pay/epusdt/{payway}/{orderSN}
The plugin controller generates the Epusdt request with:
redirect_url = route('epusdt-return', ['order_id' => $order_sn])notify_url = url($this->payGateway->pay_handleroute . '/notify_url')
So a real integration normally looks like:
redirect_url = https://your-dujiaoka-domain/pay/epusdt/return_url?order_id=DJK20260001
notify_url = https://your-dujiaoka-domain/pay/epusdt/notify_urlAfter payment, Epusdt POSTs callback data back to Dujiaoka. The plugin verify handler expects the signature to match merchant_id and processes at least these fields:
trade_idorder_idamountsignature
Dujiaoka must return plain text ok after successful processing; otherwise Epusdt will treat the callback as failed.
Test checklist
Place a small test order and confirm:
- Dujiaoka can open the Epusdt
payment_url - Payment status updates after the on-chain transfer is confirmed
- Dujiaoka receives the notify callback and marks the order paid
- The buyer is redirected back to the Dujiaoka order page
Troubleshooting
Signature verification failed
Use the exact Epusdt api_auth_token as Dujiaoka's Merchant ID. Extra spaces or the wrong token will break signing.
Callback not delivered
Check that your Dujiaoka notify route is publicly reachable by the Epusdt server and not blocked by firewall or reverse proxy rules.
Wrong endpoint
If the plugin is still configured with /api/v1/order/create-transaction, update it to:
/payments/epusdt/v1/order/create-transactionOrder expires too quickly
Adjust order_expiration_time in Epusdt if your customers need more time to complete the transfer.
