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."
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
You can use the Shoket::makePaymentRequest([...])
method to accept payments.
use Shoket\Laravel\Facades\Shoket;
$chargeResponse = Shoket::makePaymentRequest([
"amount" => "200",
"customer_name" => "John Doe",
"email" => "[email protected]",
"number_used" => "255612345678",
"channel" => "Tigo"
]);
// OR
$referenceId = "abcd124";
$chargeResponse = Shoket::verifyPaymentRequest($referenceId, [
"provider_name" => "Vodacom",
"provider_code" => "MPESA"
]);
// ...
The package is bundled with 2 commands
- AcceptPayment [WIP]
- VerifyPayment [WIP]
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.