osa-eg/laravel-tabby-integration
Composer 安装命令:
composer require osa-eg/laravel-tabby-integration
包简介
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
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 osa-eg/laravel-tabby-integration
Configuration
Publish the configuration file:
php artisan vendor:publish --provider="Osama\TabbyIntegration\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 Osama\TabbyIntegration\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.
osa-eg/laravel-tabby-integration 适用场景与选型建议
osa-eg/laravel-tabby-integration 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.08k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2024 年 08 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 osa-eg/laravel-tabby-integration 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 osa-eg/laravel-tabby-integration 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-25
