safaricom / mpesa-node-library

M-Pesa Library for Node.js using REST API
Apache License 2.0
161 stars 139 forks source link

The initiator information is invalid #13

Closed jeffnyauke closed 6 years ago

jeffnyauke commented 6 years ago

Describe the bug The callback returns the following error response but I seem to have done everything right.

Error

{
    "Result": {
        "ResultType": 0,
        "ResultCode": 2001,
        "ResultDesc": "The initiator information is invalid.",
        "OriginatorConversationID": "11143-7569966-1",
        "ConversationID": "AG_20181024_000043ade8e082b13567",
        "TransactionID": "MJO61H754M",
        "ReferenceData": {
            "ReferenceItem": {
                "Key": "QueueTimeoutURL",
                "Value": "https://internalsandbox.safaricom.co.ke/mpesa/b2cresults/v1/submit"
            }
        }
    }
}

Expected behavior I was expecting a successful response because I had followed all the specifications.

geofmureithi-zz commented 6 years ago

Hey @jeffnyauke This looks like a config issue rather than a bug. Please check your configuration. If you feel this is not the case, please confirm with the following steps:

  1. Clone this repo
  2. Run tests and verify they are passing: npm run test
  3. Update tests/helpers/tests.env to your creds and run again If the former passes and the latter fails, then its your configs.
jeffnyauke commented 6 years ago

I have updated my configs but not working. I am requesting for help

geofmureithi-zz commented 6 years ago

As I said, please check your configs. If you can run npm run test after cloning, it means your configuration is wrong. What could be wrong:

The error is initiator is wrong, I would start there.