epmnzava/beempayments

一个laravel库,帮助您轻松集成beem非洲支付API。

1.0.8 2021-12-21 12:27 UTC

This package is auto-updated.

Last update: 2024-09-21 18:39:30 UTC


README

Latest Version on Packagist Total Downloads GitHub Actions

安装

您可以通过composer安装此包

composer require epmnzava/beempayments

使用方法

//
<?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"
//};

}

测试

composer test

变更日志

有关最近更改的更多信息,请参阅变更日志

贡献

有关详细信息,请参阅贡献指南

安全

如果您发现任何安全相关的问题,请通过emmanuel@opensource.co.tz发送电子邮件,而不是使用问题跟踪器。

鸣谢

许可证

MIT许可证(MIT)。有关更多信息,请参阅许可证文件