kn9ts / project-mulla

Talk to MPESA API via a REST API. Bringing the MPESA G2 API to the 21st century. --
http://kn9ts.github.io/project-mulla/
GNU Lesser General Public License v3.0
301 stars 117 forks source link

Authentication Failed #43

Closed roboflank closed 8 years ago

roboflank commented 8 years ago

HTTP/1.1 500 Internal Server Error Content-Length: 71 Content-Type: application/json; charset=utf-8 Date: Fri, 10 Jun 2016 19:13:59 GMT ETag: W/"47-QF6qBiKtCUQCLU0A2DNoVg" X-Powered-By: Express set-cookie: connect.sid=s%3ADBjDmYnygsM3- 82Cw9e20F_8at65WasY.sSMgGuVZT0SxTBegG6TVOetY24eo7rp4FVr%2FuGnwOTs; Path=/; HttpOnly

{ "response": { "description": "authentication failed", "return_code": "42" } } Am getting an Authentication error, any way around it?

kn9ts commented 8 years ago

@denzelwamburu First of all. The return code has not been mapped to a HTTP status. The Safaricom documentation does not have this error code documented.

Then this might be the PASSWORD generated does not validate with the SAG endpoint. Check you have all of your configurations right. Starting with the PASSKEY you are allocated and PAYBILL No.

kn9ts commented 8 years ago

@denzelwamburu Were you able to sort this out?

roboflank commented 8 years ago

@kn9ts Sorry for the late reply. Let me fetch then i try once more.

roboflank commented 8 years ago

screenshot from 2016-06-15 18 55 45 Now it's returning a 500 error code.

roboflank commented 8 years ago

Does safaricom provide a sandbox account for the paybills?

kn9ts commented 8 years ago

@denzelwamburu Am curious. Do you have a PAYBILL_NO and PASSKEY? Did you get them from Safaricom MPESA API guys?

kn9ts commented 8 years ago

Could you please follow these steps: http://kn9ts.github.io/project-mulla/docs/configuration.html

roboflank commented 8 years ago

Guess i will close the issue now :smiley: