定制 gavabridge/kra 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gavabridge/kra

最新稳定版本:1.0.8

Composer 安装命令:

composer require gavabridge/kra

包简介

Simple Laravel SDK for KRA (GavaConnect) APIs

README 文档

README

A simple, clean, and developer-friendly Laravel SDK that bridges your Laravel app with Kenya Revenue Authority (KRA) APIs via GavaConnect.
It simplifies authentication, token caching, and request handling, letting you focus on building your product.

Features

  • 🔑 Automatic OAuth2 (client credentials) token management
  • 📡 Easy access to common KRA endpoints:
    • PIN validation
    • TCC validation
    • Taxpayer obligations & liabilities
    • Excise license check
    • NIL return filing
  • 🧩 Extendable: add more endpoints in minutes
  • ⚡ Built for Laravel 10+ / 11

Installation

  1. Require the package:

    composer require gavabridge/kra
  2. Publish the config:

    php artisan vendor:publish --tag=gavabridge-config
  3. Add credentials in .env:

    KRA_ENV=sandbox
    KRA_CONSUMER_KEY=your_consumer_key
    KRA_CONSUMER_SECRET=your_consumer_secret

Usage

You can access all endpoints via the GavaBridge facade:

use GavaBridge\Kra\Facades\Kra;

// PIN validation
$result = Kra::pin()->validateByPin('A000000010');

// TCC validation
$check = Kra::tcc()->validate('A000000010', 'TCC-12345678');

// Obligations
$obls = Kra::taxpayer()->obligations('A000000010');

// Liabilities
$libs = Kra::taxpayer()->liabilities('A000000010');

// Excise license
$lic = Kra::excise()->checkByNumber('EXC-0001234');

// NIL return (payload from portal spec)
$resp = Kra::returns()->fileNil([
     "TAXPAYERDETAILS" => [
        "TaxpayerPIN" => "A000000000L",
        "ObligationCode" => "4",
        "Month" => "04",
        "Year" => "2000"
     ]
    /* ... other fields per API spec ... */
]);

Roadmap

  • Add Import Certificate Checker
  • Add Excise License by PIN
  • Add E-Slip Checker
  • Add eTIMS (OSCU/VSCU) support

License

MIT © 2025 – ASAD ALI SIDOW

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-17