Open adetheprince opened 3 years ago
Well, simply enable it manually by going to activit_main.xml
and make android:enabled="true"
or just delete that line altogether. Now your button should be always enabled. Happy coding.😊😊😊
and what about invalid access token? I guess I need to add real account for mpesa now?
@adetheprince no. I faced the same issue too I didn't do anything to fix it but somehow it fixed itself 😅
Well I am not sure how will this fix itself, lol. I have not changed any details and the link inside this project is a dead link ( very old ) eg: private String callBackURL = "https://mpesa.bdhobare.com/mpesa So I am sure something needs to be changed and I dont have any api account with M-Pesa. Do I have to register with any third party like sfari com etc to get this api? Can you please help how to get this credential for testing purpose? Many thanks for your help.
Try this https://boiling-stream-31182.herokuapp.com. And consider cloning the repo by the author and deploy it on your server. Hope it helps
Many thanks for your help, the problem is I have not edited anywhere else so I am sure something is missing or I have not edited. Where do I need to edit or where can I get the needed keys or token?. Sorry, I am new to mpesa and android. Thanks.
Hi again. The problem is I am in UK , I am not sure how can I test this from UK as we dont have M-Pesa. The test that comes with these codes didn't work for me due to wrong info like MPESA SDK, API, sanbox or Daraja etc needs to be filed with some info.eg
Mpesa mpesa = Mpesa( clientKey: "YOUR_CONSUMER_KEY_HERE", clientSecret: "YOUR_CONSUMER_SECRET_HERE", passKey: "YOUR_LNM_PASS_KEY_HERE", initiatorPassword: "YOUR_SECURITY_CREDENTIAL_HERE", environment: "sandbox", );
Hi again. The problem is I am in UK , I am not sure how can I test this from UK as we dont have M-Pesa. The test that comes with these codes didn't work for me due to wrong info like MPESA SDK, API, sanbox or Daraja etc needs to be filed with some info.eg
Mpesa mpesa = Mpesa( clientKey: "YOUR_CONSUMER_KEY_HERE", clientSecret: "YOUR_CONSUMER_SECRET_HERE", passKey: "YOUR_LNM_PASS_KEY_HERE", initiatorPassword: "YOUR_SECURITY_CREDENTIAL_HERE", environment: "sandbox", );
Please get your keys from here: https://developer.safaricom.co.ke/ as stated in the README :)
Please let me know if this code still works, looks like something I missed or i need to edit the credential for mpesa or sandbox?