定制 azima/tabby 二次开发

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

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

azima/tabby

最新稳定版本:1.0.0

Composer 安装命令:

composer require azima/tabby

包简介

The package acts as a Laravel integration for the Tabby API, allowing developers to easily create sessions, handle payments, and manage webhooks in their applications.

README 文档

README

Image 2

laravel-tabby-integration is a Laravel package designed to simplify the integration of the Tabby API into your Laravel applications. It provides an easy-to-use interface for creating checkout sessions, handling payments, managing webhooks, and more.

Features

  • Create, retrieve, update, and capture payments
  • Register, retrieve, update, and remove webhooks
  • Integrated logging for API requests and responses
  • Simple and intuitive interface

Installation

To install the package, use Composer:

composer require azima/tabby

Configuration

Publish the configuration file:

php artisan vendor:publish --provider="Azima\Tabby\Providers\TabbyServiceProvider"

In your .env file, add the following configurations:

TABBY_PUBLIC_KEY=your_public_key
TABBY_SECRET_KEY=your_secret_key
TABBY_MERCHANT_CODE=your_merchant_code

Usage

Create a Checkout Session

Create a new checkout session with the given data.

use Azima\Tabby\Facades\Tabby;

$data = [
    // your checkout session data
];

$response = Tabby::createCheckoutSession($data);

Reference: Post Checkout Session

Retrieve a Payment

Retrieve a payment by its ID.

$paymentId = 'your_payment_id';
$response = Tabby::getPayment($paymentId);

Reference: Get Payment

Update a Payment

Update a payment by its ID with new data.

$paymentId = 'your_payment_id';
$data = [
    // your update data
];

$response = Tabby::updatePayment($paymentId, $data);

Reference: Update Payment

Capture a Payment

Capture a payment by its ID.

$paymentId = 'your_payment_id';
$data = [
    // your capture data
];

$response = Tabby::capturePayment($paymentId, $data);

Reference: Capture Payment

Refund a Payment

Refund a payment by its ID.

$paymentId = 'your_payment_id';
$data = [
    // your refund data
];

$response = Tabby::refundPayment($paymentId, $data);

Reference: Refund Payment

List Payments

Retrieve a list of payments with optional parameters.

$params = [
    // your query parameters
];

$response = Tabby::listPayments($params);

Reference: List Payments

Register a Webhook

Register a new webhook with the given data.

$data = [
    // your webhook data
];

$response = Tabby::registerWebhook($data);

Reference: Post Webhook

List Webhooks

Retrieve a list of webhooks.

$response = Tabby::listWebhooks();

Reference: Get Webhooks

Retrieve a Webhook

Retrieve a specific webhook by its ID.

$webhookId = 'your_webhook_id';
$response = Tabby::getWebhook($webhookId);

Reference: Get Webhook

Update a Webhook

Update a specific webhook by its ID with new data.

$webhookId = 'your_webhook_id';
$data = [
    // your update data
];

$response = Tabby::updateWebhook($webhookId, $data);

Reference: Update Webhook

Remove a Webhook

Remove a specific webhook by its ID.

$webhookId = 'your_webhook_id';
$response = Tabby::removeWebhook($webhookId);

Reference: Delete Webhook

Logging

The package integrates with Laravel's logging system to provide detailed logs of API requests and responses. Ensure you have a logger configured in your Laravel application to capture these logs.

License

This package is licensed under the MIT License. See the LICENSE file for more details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-10