safaricom / mpesa-php-sdk

A PHP sdk for the new Mpesa RESTful APIs
188 stars 211 forks source link

No response from callback url #51

Open kamandemwangi opened 2 years ago

kamandemwangi commented 2 years ago

I am interacting with lipa na M-pesa online endpoint, https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest. I am experiencing an issues where sometimes I get response at my callback url but sometime there is no response at all and my callback url is accessible from the internet.

sandeshdasi commented 2 years ago

For me also same issue with sandbox api. sometimes getting the below response, most of the times, no response. stkCallback: { MerchantRequestID: '53785-65856915-1', CheckoutRequestID: 'ws_CO_23052022122137653708374149', ResultCode: 1019, ResultDesc: 'Transaction has expired' }

kamandemwangi commented 2 years ago

@mossey please give as an explanation or a solution to the issue. I rely on the data posted to the callback url for systems functionality. @sandeshdasi Besides lack of response, what you are getting means an error occurred or the transaction failed as per the Safaricom daraja documentation "ResultCode: This is a numeric status code that indicates the status of the transaction processing. 0 means successful processing and any other code means an error occurred or the transaction failed."

sandeshdasi commented 2 years ago

@kamandemwangi thanks for the response. I tried with LIVE details instead of SANDBOX, it is working fine, getting valid response every time.

em-manuel commented 1 year ago

I am simulating a C2B transaction on sandbox. The following are the steps I have taken:

  1. Get auth token.
  2. Register Callback URLs
  3. Simulate payment. All the above are successful.

However the callback URL is not getting any hits. It is not a UFW issue cause another STK callback script running (m-pesa live) is getting hits of the callback.

What could I be missing here?

ronjohnson-owuor commented 8 months ago

am also getting this issue on sandbox,Everything is happening correctly and the payment are being made successfull but my callback is not getting any hit at all from mpesa

ronjohnson-owuor commented 8 months ago

really urgent someone please

qualebs commented 3 months ago

This is an issue from safaricom's side. It has been bothering so many people for so long. It is really sad to see that 2 years later nothing has been done to fix it.

MosesMuiru commented 2 months ago

Hello , Try using alternatives of ngrok like localtunnel works for me

sichshiri1 commented 2 months ago

Who has been able to get the data in the callback url using asp.net? I still cannot get data to be saved in my database when live

koechian commented 2 months ago

Hello , Try using alternatives of ngrok like localtunnel works for me

Had the same issue with NodeJS and switching to localtunnel sorted it out on the Sandbox API.

JAPHETHNYARANGA commented 2 months ago

I have the same issue , it seems the sandbox has an issue calling the callback url

thatboywest commented 1 month ago

Hello , Try using alternatives of ngrok like localtunnel works for me

Had the same issue with NodeJS and switching to localtunnel sorted it out on the Sandbox API.

am using localtunnel, it works sometimes then i just stops i think its an issue with the sandbox