Comments (4)
@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.
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.
@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.
@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)
- Wrong implementation of stk push function HOT 7
- How to register new urls HOT 2
- documentation is poor HOT 3
- load environment configs from database HOT 8
- Possible typo on:
- Using IIS to host the app
- TransactionCallbacks result for c2b has the same value for both key and value HOT 1
- Trying to understand the $SecurtyCredential parameter in AccountBalance API
- AccountBalance API returns "The initiator information is invalid." HOT 8
- Composer autoload path not working: ../vendor/autoload.php HOT 4
- StkPushQuerry- Bad Request - Invalid Timestamp HOT 3
- MPESA API Intergration to a CORE PHP Project HOT 2
- laravel issue on config:cache HOT 3
- No response from callback url HOT 9
- Lina na mpesa: AccountReference is invalid HOT 1
- Security Credential
- Callback value HOT 6
- Error: call to URL https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials failed with status 503, response
- Error: call to URL https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials failed with status 503, response Request unsuccessful. Incapsula incident ID: 173000240624511593-81996337350772249
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpesa-php-sdk.