承接 omakei/tembo 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

omakei/tembo

最新稳定版本:v1.0.0

Composer 安装命令:

composer require omakei/tembo

包简介

A package to simplify integration between Laravel web apps with Tembo.

README 文档

README

Tembo Logo

Laravel Tembo

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A package to simplify integration between Laravel web apps with Tembo.

Installation

You can install the package via composer:

composer require omakei/tembo

You can publish the config file with:

php artisan vendor:publish --tag="tembo-config"

This is the contents of the published config file:

return [
    /*
    |--------------------------------------------------------------------------
    | Tembo Account ID for (Banking & Wallets, Collect Money, Make Payment) API's
    |--------------------------------------------------------------------------
    |
    | This value is the account ID of your application as provided by Tembo.
    |
    */
    'accountId' => env('TEMBO_ACCOUNT_ID', 'Tembo'),

    /*
    |--------------------------------------------------------------------------
    | Tembo Secret Key for (Banking & Wallets, Collect Money, Make Payment) API's
    |--------------------------------------------------------------------------
    |
    | This value is the secret key of your application as provided by Tembo.
    |
    */
    'secretKey' => env('TEMBO_SECRET_KEY', 'Tembo'),

    /*
    |--------------------------------------------------------------------------
    | Tembo Token for (Merchant Virtual Accounts, eKYC Services, Remittance Services) API's
    |--------------------------------------------------------------------------
    |
    | This value is the Bearer token of your application as provided by Tembo.
    |
    */
    'token' => env('TEMBO_TOKEN', 'Bearer Tembo Token'),

    /*
    |--------------------------------------------------------------------------
    | Tembo Environment
    |--------------------------------------------------------------------------
    |
    | This value is the environment of your application as registered on Tembo.
    |
    */
    'environment' => env('TEMBO_ENVIRONMENT', 'sandbox'),
];

Usage

Merchant Virtual Accounts

Create Merchant Virtual Account

use Omakei\Tembo\Tembo;

$tembo = new Tembo;

    $response = $tembo->createMerchantVirtualAccount([
        'companyName' => 'TEMBOPLUS COMPANY LIMITED',
        'reference' => 'VT87038HZS',
    ]);

    

Create Merchant Virtual Account using Facade Class

use Omakei\Tembo\Facades\Tembo;

    $response = Tembo::createMerchantVirtualAccount([
        'companyName' => 'TEMBOPLUS COMPANY LIMITED',
        'reference' => 'VT87038HZS',
    ]);

Callback

When the package the callbacks from tembo it will dispatch Event depending on the callback called. You can create a listener and do further process with the callback data which will be pass when the event get dispatch.

On you App\Providers\EventServiceProvider register a listeners for the following events.

use Omakei\Tembo\Events\RemittanceCallback;
use Omakei\Tembo\Events\TemboCallback;
use Omakei\Tembo\Events\UtilityPaymentsCallback;
use Omakei\Tembo\Events\WalletToMobileCallback;
use App\Listeners\YourEventListener;

/**
 * The event listener mappings for the application.
 *
 * @var array
 */
protected $listen = [
    RemittanceCallback::class => [
        YourEventListener::class,
    ],
     TemboCallback::class => [
        YourEventListener::class,
    ],
     UtilityPaymentsCallback::class => [
        YourEventListener::class,
    ],
     WalletToMobileCallback::class => [
        YourEventListener::class,
    ],
];

Tembo documentation

You can find more details about tembo on their documentation in this link Tembo Documentation.

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.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-28