bdhobare / mpesa-android-sdk

An android SDK for MPESA.
44 stars 52 forks source link

Getting Invalid Access Token (Result Code : 404) #4

Closed BrianObillo closed 6 years ago

BrianObillo commented 6 years ago

Hi,

What i'm i doing wrong? I keep on getting the below error when trying to process payment using the below samples.

//passkey, bsnCode2, bsnCode and testNumber sourced from developer.safaricom.co.ke

passKey = "bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919";

bsnCode2 = "600147"; bsnCode = "174379";

testNumber = "254708374149";

// STKPush.Builder builderPay = new STKPush.Builder(bsnCode2, passKey, amount, bsnCode,testNumber);

//STKPush.Builder builderPay = new STKPush.Builder(bsnCode, passKey, amount, bsnCode, testNumber); //repeated both steps with personal number instead of testNumber still got the same error

E/mpesaFailed: Invalid Access Token result Code :404

BrianObillo commented 6 years ago

Solved, i had not checked on the Lipa na Mpesa checkbox once my app was approved.