Project Mulla as a solution to your SOAP problems.

Project Mulla is a MPESA API RESTful mediator. It lets you make familiar HTTP REST requests, transforming your requests to the fiddling dreaded SOAP/XML requests that the Safaricom MPESA G2 API only understands. It then communicates with the MPESA API gateway, transforming all SOAP responses from the SAG to RESTful JSON responses that you then consume effortlessly.

In short, it’ll deal with all of the SOAP shenanigans while you REST. Everybody wins!

Time is Money! Get up and running in 1 minute

Project Mulla is easily deployable to Heroku or Google App Engine in less than a minute.

 $ git clone https://github.com/kn9ts/project-mulla.git 
 $ cd project-mulla
 $ heroku create project-mulla-companyname 
 $ git push heroku master 
 $ heroku ps:scale web=1 
 $ heroku config:set \
						PAYBILL_NUMBER='898998' \
						PASSKEY='a8eac82d7ac1461ba0348b0cb24d3f8140d3afb9be86...' \
						MERCHANT_ENDPOINT='http://merchant-endpoint.com/mpesa/payment/complete' 
 $ curl -i https://project-mulla-companyname.herokuapp.com/api/v1/status 
 $ heroku open 

Please refer to installation and deploying documentation for a complete guide to deploying it.

The Middleman

After installing and starting Project Mulla, it will route every incoming request from your server/client with the specified public DNS to the Safaricom SAG. And route every response, after processing the SOAP body to JSON, to your server/client.