Giter Site home page Giter Site logo

Comments (4)

AbeNalee avatar AbeNalee commented on June 6, 2024 1

@jSoftKenya you should import Safaricom\Mpesa\Mpesa at the top of your class like:
use Safaricom\Mpesa\Mpesa;
You can then use $mpesa = new Mpesa;

Also good to note is that some methods in Mpesa.php are static and others are non static. As such, you can use the Mpesa facade to invoke some methods like Mpesa::c2b. but I would recommend sticking to the new Mpesa syntax so that you call a new instance of the class each time.

from mpesa-php-sdk.

AbeNalee avatar AbeNalee commented on June 6, 2024 1

Hi @jSoftKenya,
Sorry for the late reply. The php sdk cannot register the urls for you. You can use postman to achieve this task using the url for registration. Use the syntax as is in the documentation.

from mpesa-php-sdk.

jkeanche avatar jkeanche commented on June 6, 2024

@AbeNalee . I have issues integration this package. Which Mpesa.php should require on my files so as to instantiate because i cant successfully instantiate like ..$mpesa= new \Safaricom\Mpesa\Mpesa();

Kindly help

from mpesa-php-sdk.

jkeanche avatar jkeanche commented on June 6, 2024

@AbeNalee Thanks. it works. But I am having trouble registering the confirmation and validation urls for c2b. Any help will be appreciated

from mpesa-php-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.