kfoobar/laravel-kivra 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

kfoobar/laravel-kivra

最新稳定版本:v1.0.0

Composer 安装命令:

composer require kfoobar/laravel-kivra

包简介

Laravel package for the Kivra Sender API

README 文档

README

A lightweight Laravel package for interacting with the Kivra Sender API, supporting both live and sandbox environments.

Note: This package currently covers a limited subset of the Kivra API. Additional endpoints may be added in future releases.

Requirements

  • PHP 8.0 or higher
  • Laravel 9.0 or higher

Installation

Install the package via Composer:

composer require kfoobar/laravel-kivra

Publish the configuration file:

php artisan vendor:publish --tag=kivra-config

This will create a kivra.php file in your config directory.

Configuration

Add the following variables to your .env file:

KIVRA_CLIENT_ID=
KIVRA_CLIENT_SECRET=
KIVRA_TENANT_KEY=
KIVRA_TEST_MODE=

KIVRA_TEST_MODE is optional and defaults to false. Set it to true to route all requests to the Kivra sandbox API.

Usage

Authenticate

Authentication uses the OAuth 2.0 client credentials flow. Call auth() before any other method:

use KFoobar\Kivra\Facades\Kivra;

$kivra = Kivra::auth();

Find a Company

Look up a company by VAT number:

use KFoobar\Kivra\Facades\Kivra;

$company = Kivra::auth()->company('556000-0000');

Returns an array with the company data, or an empty array if not found.

Contribution

Contributions are welcome! If you'd like to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Make your changes and ensure tests pass.
  4. Submit a pull request with a detailed description of your changes.

License

This package is open-source and released under the MIT License. See LICENSE for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-02