shoket / laravel-shoket
Laravel Shoket Intergation
Fund package maintenance!
Patreon
Requires
- php: ^8.0|^8.1
- illuminate/contracts: ^8.0|^9.0
- shoket/php-shoket: ^0.0.4
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- nunomaduro/collision: ^5.10
- nunomaduro/larastan: ^1.0
- orchestra/testbench: ^6.22
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
- spatie/laravel-ray: ^1.26
This package is auto-updated.
Last update: 2024-11-09 19:45:53 UTC
README
A simple integration of Shoket's Payments API into your Laravel application.
From Shokets website
"Truly simple payments for your business. Shoket makes online payments more easier for all kind of business in Tanzania. From startups, small businesses to medium and large businesses."
Installation
Requiremnts PHP 8.0+ and Laravel 8+
You can install the package via composer:
composer require shoket/laravel-shoket
You can publish the config file with:
php artisan vendor:publish --tag="shoket-config"
- Update the env adding the
SHOKET_API_SECRET
Usage
You can use the Shoket::makePaymentRequest([...])
method to accept payments.
Simple and direct
use Shoket\Laravel\Facades\Shoket; $chargeResponse = Shoket::makePaymentRequest([ "amount" => "200", "customer_name" => "John Doe", "email" => "john@user.com", "number_used" => "255612345678", "channel" => "Tigo" ]); // OR $referenceId = "abcd124"; $chargeResponse = Shoket::verifyPaymentRequest($referenceId, [ "provider_name" => "Vodacom", "provider_code" => "MPESA" ]); // ...
Avaibale Commands
The package is bundled with 2 commands
- AcceptPayment [WIP]
- VerifyPayment [WIP]
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.