on-internet
← Community

Saving M-PESA callback data

Stack Overflow ·

I am trying to save M-PESA callback data, when a user has paid with Lipa Na M-PESA. I need to save the CheckoutRequestID, with a decoded username from token, then if the payment is successful the callback URL needs to update the associated CheckoutRequestID from MySQL with the amount, from there it needs to update the user's wallet with the new value. Currently, the code works well, but I cannot save. When I try to access the username or any value, the callback doesn't return any data. Here is the Lipa Na M-PESA code and the STK Callback code. Lipa Na M-PESA code router.get('/stk', middleware.

Comments

Sign in or sign up to comment and upvote.

No comments yet.