Mpesa payment gateway in php

If you’re working with PHP, there is a good sdk written in Laravel for implementing the MPESA API. You can fork it from their GitHub repository: https://github.com/safaricom/mpesa-php-sdk

Hehe hizo ni keys za sandbox… they can’t transact real money

Kwa docs utaona sample code for all the languages to interact with the APIs. You could copy paste that, but for optimal performance you have to customize it and just borrow the concepts.

Vile yeye huchocha ametumia PHP tangu 2009 hajui kusoma docs za api :D:D:D:D

He can’t just copy paste like that and expect it to work. @Mi Si Nyayako you need to first get credentials to access the API, set up his REST client since it is a RESTful API, then work with the dcos. Infact he should first start making the API calls from the sandbox, go to a test environment like localhost before thinking of using it in production.

Maybe he wants to implement the API using the raw vanilla PHP :D:D:D:D

I think it’s exactly what he wants to do… Lol.

even if some idiots discourage me, i will never loose hope

We don’t discourage you… In fact… I think it’s a good thing you are trying to learn… And in time all these things get really simple. What I personally make fun of is the fact that you try to create the facade of being a better developer than you actually are.

ooh :eek::eek::eek::eek:

Boss uko sawa, banter aside. If anything it is is your best interest to get up to speed with the API coz that’s the trend right now. All the best.

Ktalker kama haikuwork sema nikupee link ya developers tunatumia mpesa API’s pale telekram usaidike

…Boss check out pesapal or jambopay, these are established payment gateways with all the options you are looking for…

Jambopay and pesapal have apis for various languages including PHP

There are comprehensive tutorials on Utube, on integrating payment gateway in php source code. They might give you a good insight and expand you knowledge in this area. All the best.

https://www.youtube.com/watch?v=rz9AtBeRAQI

https://www.youtube.com/watch?v=6URqnL25al0

https://www.youtube.com/watch?v=Wx6W3_1LE5w

These will work. But as a dev you need to have the skills to do it yourself. Most enterprise level systems will usually need you to interact directly with payment and core banking systems.

I’d suggest that the poster of this thread learns how to work with APIs first, get to know more about REST APIs - cos most of the APIs mentioned in this thread are RESTful in nature. Then after that also get to learn how build the front-end with the API’s results from the json responses.

CBK has to approve custom built money systems, quite a process, sir. Most Kenyan corporate and private companies are all addicted to speed of delivery when it comes to development, I have learnt this from years of coding and such APIs saves one’s day, not to discourage you am just sharing

I didn’t say build build your own mpesa or cbs, I just mean learn to interact with these systems without another extra middle man (their APIs being the first middle man).