osenco / osen-wc-mpesa

WordPress Plugin that extends WooCommerce functionality to integrate MPESA for making payments, remittances, checking account balance, transaction status and reversals.
https://wcmpesa.co.ke
GNU General Public License v3.0
93 stars 90 forks source link

Sandbox not getting callback #53

Open perfait opened 2 years ago

perfait commented 2 years ago

Hello. I'd really use your assistance. I'm on sandbox and everything is working fine until after the user pays. The buyer pays using STK push but no callback is made back to the website so as to complete the order.

maukoese commented 2 years ago

Hi, this is not a plugin error, it's a Daraja issue. Using production credentials works without a problem.

On Thu, Dec 2, 2021 at 12:30 AM perfait @.***> wrote:

Hello. I'd really use your assistance. I'm on sandbox and everything is working fine until after the user pays. The buyer pays using STK push but no callback is made back to the website so as to complete the order.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/osenco/osen-wc-mpesa/issues/53, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMTCVSB2MTKV5KB5NG6ZJ3UO2HWDANCNFSM5JFQWJLQ .

--

[image: --]

Mauko Maunde [image: https://]http://mauko.co.ke

perfait commented 2 years ago

Thank you for your response. I love your response time. When was the last time you tried the sandbox?

maukoese commented 2 years ago

Tested a few minutes ago, didn't even get an STK push, although the request went through.

Daraja has been having issues lately, and the API team is working to fix.

I know using live credentials works without any issues.

On Thu, Dec 2, 2021 at 11:30 AM perfait @.***> wrote:

Thank you for your response. I love your response time. When was the last time you tried the sandbox?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/osenco/osen-wc-mpesa/issues/53#issuecomment-984399155, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMTCVRKVHHEQCFBARFQSI3UO4VAZANCNFSM5JFQWJLQ .

--

[image: --]

Mauko Maunde [image: https://]http://mauko.co.ke

perfait commented 2 years ago

Thank you for the update

On Thu, Dec 2, 2021, 22:01 Mauko Maunde @.***> wrote:

Tested a few minutes ago, didn't even get an STK push, although the request went through.

Daraja has been having issues lately, and the API team is working to fix.

I know using live credentials works without any issues.

On Thu, Dec 2, 2021 at 11:30 AM perfait @.***> wrote:

Thank you for your response. I love your response time. When was the last time you tried the sandbox?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/osenco/osen-wc-mpesa/issues/53#issuecomment-984399155>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ADMTCVRKVHHEQCFBARFQSI3UO4VAZANCNFSM5JFQWJLQ

.

--

[image: --]

Mauko Maunde [image: https://]http://mauko.co.ke

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/osenco/osen-wc-mpesa/issues/53#issuecomment-984911094, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMDDVPTBY4VKYCS7RAX4WOLUO6673ANCNFSM5JFQWJLQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Michez86 commented 2 years ago

Hi my site is live and am using live credentials but am not receiving any call back on my website after payment and download the product Anyone Kindly assist?

maukoese commented 2 years ago

Please reach out on WhatsApp, 0705459494,

I'm locked out of my Github at the moment.

On Wed, Jan 12, 2022 at 3:22 PM Michez86 @.***> wrote:

Hi my site is live and am using live credentials but am not receiving any call back on my website after payment and download the product Anyone Kindly assist?

— Reply to this email directly, view it on GitHub https://github.com/osenco/osen-wc-mpesa/issues/53#issuecomment-1010991397, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMTCVQERRTKTSDAW6W6B7DUVVXBRANCNFSM5JFQWJLQ . You are receiving this because you commented.Message ID: @.***>

--

[image: --]

Mauko Maunde [image: https://]http://mauko.co.ke

tjpin commented 2 years ago

Anyone who was able to solve this issue? Am experiencing the same problem. I cant receive callback response. Everything else is ok. Am on sandbox not production.

FaddyDev commented 1 year ago

Hey,

I encountered the same error, wondering why my callback was not being hit by safaricom because I had written code there to save the results in the database. Then I thought of testing my callback to ensure it was working well. That's when I code an error with my callback code. I fixed it and everything started working fine.

Therefore, I suggest you call your callback URL from Postman. In the body, pass parameters in the exact format as safaricom. You can use the below one. Then fix any errors encountered.

{ "Body": { "stkCallback": { "MerchantRequestID": "51165-189061416-3", "CheckoutRequestID": "ws_CO_01022023215432073700123123", "ResultCode": 0, "ResultDesc": "The service request is processed successfully.", "CallbackMetadata": { "Item": [ { "Name": "Amount", "Value": 1 }, { "Name": "MpesaReceiptNumber", "Value": "RB12P0ICD8" }, { "Name": "Balance" }, { "Name": "TransactionDate", "Value": 20230204215444 }, { "Name": "PhoneNumber", "Value": 254700123123 } ] } } } }

kamnjoro commented 1 year ago

Hey,

I encountered the same error, wondering why my callback was not being hit by safaricom because I had written code there to save the results in the database. Then I thought of testing my callback to ensure it was working well. That's when I code an error with my callback code. I fixed it and everything started working fine.

Therefore, I suggest you call your callback URL from Postman. In the body, pass parameters in the exact format as safaricom. You can use the below one. Then fix any errors encountered.

{ "Body": { "stkCallback": { "MerchantRequestID": "51165-189061416-3", "CheckoutRequestID": "ws_CO_01022023215432073700123123", "ResultCode": 0, "ResultDesc": "The service request is processed successfully.", "CallbackMetadata": { "Item": [ { "Name": "Amount", "Value": 1 }, { "Name": "MpesaReceiptNumber", "Value": "RB12P0ICD8" }, { "Name": "Balance" }, { "Name": "TransactionDate", "Value": 20230204215444 }, { "Name": "PhoneNumber", "Value": 254700123123 } ] } } } }

How were you able to resolve the issue. Any assistance will be highly appreciated.

kamnjoro commented 1 year ago

A Postman call to the endpoint created for reconciliation returns "{\"resultCode\":1,\"resultDesc\":\"Reconciliation failed\"}"

harsh-biz commented 1 year ago

@FaddyDev @maukoese @perfait What data does mpesa send in your callback url because i am getting an empty dictionary in my callbackurl controller.

mikemills254 commented 11 months ago

I have a similar problem however when I test the callback by maybe canceling the transaction it works well but when I complete the transaction there is no callback and I am on sandbox, not production

mutisyajonathan commented 6 months ago

As at today Feb 18,2024 safaricom daraja stkpush not calling my callback url after user responds to the prompt... anyone with solution?

harsh-biz commented 6 months ago

@mutisyajonathan Make sure your return url is live and is "https".

Faustine254 commented 6 months ago

image I'm stuck there after making payment, i think it's a callback issue. I'm using sandbox and https. Does anyone have a solution?