a month ago
I have a Wi-Fi voucher database resides at Railway. Upon customer request, his mobile number, and price_tier are captured and populated in MySQL table. I initiate communication with mobile Money Provider (AzamPay) to send USSD PUSH to deduct money from customer wallet. Customer accept, insert PIN and money deducted. AzamPay release notification payload to https://www.tanconnect.co.tz/callback.php to either RELEASE or HOLD the voucher code. The payload is not reaching my webhook file.
Please assist
Pinned Solution
a month ago
I'd make sure you have Under Attack Mode disabled on your service.
2 Replies
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 1 month ago
a month ago
Hi! This looks like an issue on the callback host (tanconnect.co.tz), not Railway, since Railway only holds the MySQL database. Here is how I would narrow it down:
-
Make sure the callback URL registered in the AzamPay portal matches exactly, including https, the www prefix, and the path.
-
Check for redirects: run
curl -I https://www.tanconnect.co.tz/callback.php. A 301/302 (http→https or non-www→www) turns AzamPay's POST into a GET and the body is lost. The registered URL must answer directly with 200. -
Read the raw body, not $_POST. Webhooks usually send JSON, and PHP does not fill $_POST for JSON. I tested this locally: a JSON POST to a script reading $_POST gave an empty array. Put this at the very top of callback.php, before any DB or auth code:
Status changed to Solved 0x5b62656e5d • 18 days ago