satyam147/central-payment-gateway

Modular Central Payment Gateway Package

Maintainers

Package info

github.com/satyam147/central-payment-gateway-sdk

pkg:composer/satyam147/central-payment-gateway

Statistics

Installs: 42

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.0.4 2026-03-09 16:55 UTC

This package is auto-updated.

Last update: 2026-03-09 16:55:53 UTC


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.