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

This package is auto-updated.

Last update: 2024-10-21 18:47:44 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

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.