epmnzava / beempayments
A laravel lib that helps you to easily integrate with beem africa payments api.
1.0.8
2021-12-21 12:27 UTC
Requires
- php: ^7.1|^7.2|^7.3|^7.4|^8.0
- epmnzava/bill-me: ^1.0.7
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^5.5.44|^6.0|^7.0|^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
README
Installation
You can install the package via composer:
composer require epmnzava/beempayments
Usage
// <?php namespace App\Http\Controllers; use App\Models\User; use Epmnzava\Annoucement\Annoucement; use Epmnzava\LaravelCms\LaravelCms; use Epmnzava\MpesaTanzania\MpesaTanzania; use Illuminate\Http\Request; use Illuminate\Support\Str; use Log; use Epmnzava\Beempayments\Beempayments; class CheckoutController extends Controller { public function beemCheckout(){ //create a beempayment instance $bpay=new Beempayments; //use the checkout method to request a payment. //remember the arguments should be created from your system. $res=$bpay->checkout("50000","255701000000","SAMPLE-12345","96f9cc09-afa0-40cf-928a-d7e2b27b2411"); //convert your reponse to an array to access src $response=json_decode($res); // go to the link provided return redirect($response->src); //reponse doc coming soon } //whitelisting service public function whitelistmywebsite(){ $website="https://storewid.com"; $bpay=new Beempayments; $response=$bpay->whitelist($website); //$reponse={ "status": 200, "message": "succesful" //}; }
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email emmanuel@opensource.co.tz instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.