Daraja STK Push from Android: 10 things the docs will not tell you (with Kotlin)
Sasa wasee. I wire up M-Pesa for a logistics startup in Nairobi, from Eldoret. Safaricom's Daraja API works, but the docs leave a lot for you to discover at 2am. Here is my list. Maze, read it before you start. 1. Never call Daraja from the app A consumer key and secret inside an APK is a gift to every bored teenager with apktool. App calls your backend, backend calls Daraja. No exceptions, not even "just for the…
- Clean Kotlin. I would add a table-driven unit test for normaliseMsisdn with all the ugly inputs. The 011 numbers will bite someone who edits this later
- meanwhile in naija half the banks cant even send a callback. una dey enjoy for kenya