Coder Social home page Coder Social logo

osenco / mpesa Goto Github PK

View Code? Open in Web Editor NEW
26.0 5.0 13.0 139 KB

Intuitive and Comprehensive M-PESA SDK for PHP Applications

Home Page: https://osen.co.ke

License: MIT License

PHP 100.00%
mpesa mpesa-api mpesa-payments php laravel composer composer-package

mpesa's Introduction

Intuitive and Comprehensive M-PESA SDK for PHP Applications

Documentation

See the wiki for documentation.

Credits & Acknowledgements

Licensing

This software is released under MIT License.

Usage & Contribution

This library is free and open source software. You can copy, modify and distribute it as you so wish. If you have any ideas on how to improve it, shoot us an email at [email protected] or raise an issue here.

mpesa's People

Contributors

maukoese avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mpesa's Issues

New C2B update

Do you think anything will break with the new c2b changes on the API?

Handling Callback response, The package is adding [ ] at the end of json string

Hi, The package seems to be adding [ ] on the callback json response making the json invalid and cant be consumed. I found it out while integrating Mpesa stk. When I check out my logs, all of them end with [ ]. Below is my log snipet

$mpesa_log = new Logger("MPESA");
$mpesa_log->pushHandler(new StreamHandler(storage_path("logs/mpesastk.log")), Logger::INFO);

$Respose = $request->input();  //get the response from safaricom       
$mpesa_log->info("JSON RESPONSE::", $Respose); // Logging response
{
"Body": {
"stkCallback": {
"MerchantRequestID": "24057-2373643-1",
"CheckoutRequestID": "ws_CO_110520200125106758",
"ResultCode": 0,
"ResultDesc": "The service request is processed successfully.",
"CallbackMetadata": {
"Item": [{
"Name": "Amount",
"Value": 1.0
}, {
"Name": "MpesaReceiptNumber",
"Value": "OEB53ZOQY3"
}, {
"Name": "Balance"
}, {
"Name": "TransactionDate",
"Value": 20200511012527
}, {
"Name": "PhoneNumber",
"Value": 254743596827
}]
}
}
}
} []

B2B file

Line 58 of B2B file, passing more parameters on remote_post expecting 2 parameters, 3 sent.
removing token worked as it gets fetched under remote_post function
Got me the whole day trying to figure it out

Composer Autoload Deprecation Notice

Update classes to comply with pr-4 autoloading standard

Deprecation Notice: Class Osen\Mpesa\C2B located in ./vendor/osenco/mpesa/src/C2B.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Osen\Mpesa\Service located in ./vendor/osenco/mpesa/src/Service.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Osen\Mpesa\B2B located in ./vendor/osenco/mpesa/src/B2B.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Osen\Mpesa\B2C located in ./vendor/osenco/mpesa/src/B2C.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
Deprecation Notice: Class Osen\Mpesa\STK located in ./vendor/osenco/mpesa/src/STK.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201

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.