satyam147/central-payment-gateway
Composer 安装命令:
composer require satyam147/central-payment-gateway
包简介
Modular Central Payment Gateway Package
README 文档
README
A modular Laravel package for central payment gateway functionality.
Installation
Require the package in your Laravel project (for local development, use Composer path repository):
composer require satyam147/central-payment-gateway
Service Provider
The package registers its own service provider.
Package Requirements
- Laravel Framework >= 12.0
- guzzlehttp/guzzle >= 7.0
Publish the Config
To publish the config file to your app, run:
php artisan vendor:publish --tag=central-payment-gateway-config
SDK Usage Example
Initialize the client
use Satyam147\CentralPaymentGateway\CentralPaymentGatewayClient; // Easiest: Automatically uses config values from config/central-payment-gateway.php $client = new CentralPaymentGatewayClient(); // Or override config values with explicit arguments $client = new CentralPaymentGatewayClient( 'https://your-gateway.example.com', // baseUrl 'your_public_key', // apiKey 'your_secret_key', // apiSecret );
Initiate a payment
$response = $client->initiatePayment([ 'amount' => 1000, 'currency' => 'INR', // ... other fields ]); $data = json_decode($response->getBody(), true);
Get payment status/details
$response = $client->getPaymentStatus('txn_abc123'); // Your transaction reference $status = json_decode($response->getBody(), true);
Check payment status (manual)
$response = $client->checkPaymentStatus('txn_abc123'); $statusCheck = json_decode($response->getBody(), true);
Refund payment
$response = $client->refundPayment('txn_abc123', [ 'amount' => 500, // partial/main refund amount ]); $refund = json_decode($response->getBody(), true);
Get refund summary
$response = $client->getRefundSummary('txn_abc123'); $summary = json_decode($response->getBody(), true);
See src/CentralPaymentGatewayClient.php for more details.
统计信息
- 总下载量: 1.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-09