PHPackages                             yogigr/payment-gateway - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. yogigr/payment-gateway

ActiveLibrary[Payment Processing](/categories/payments)

yogigr/payment-gateway
======================

A simple and versatile Laravel package for integrating multiple payment providers. Easily manage and process payments from various gateways with a unified API.

1.0.1(1y ago)07MITPHP

Since Aug 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/yogigr/payment-gateway)[ Packagist](https://packagist.org/packages/yogigr/payment-gateway)[ RSS](/packages/yogigr-payment-gateway/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

payment-gateway
===============

[](#payment-gateway)

A simple and versatile Laravel package for integrating multiple payment providers. Easily manage and process payments from various gateways with a unified API.

Installation
------------

[](#installation)

To install the `PaymentGateway` package, follow these steps:

1. **Require the Package via Composer**

    Run the following command in your Laravel project directory:

    ```
    composer require yogigr/payment-gateway
    ```
2. **Publish the Configuration File**

    Publish the configuration file using the following command:

    ```
    php artisan vendor:publish --provider="yogigr\PaymentGateway\PaymentGatewayServiceProvider" --tag="config"
    ```
3. **Set Up Environment Variables**

    your .env file:

    ```
     PAYMENT_GATEWAY=duitku
     PAYMENT_CALLBACK_DOMAIN=https://example.app
     PAYMENT_RETURN_DOMAIN=https://example.app

     DUITKU_MERCHANT_CODE=duitku-merchant-code
     DUITKU_MERCHANT_KEY=duitku-merchant-key
     DUITKU_SANDBOX_MODE=true
     DUITKU_SANITIZED_MODE=false
     DUITKU_LOGS=true
     DUITKU_PAYMENT_URL=https://sandbox.duitku.com/TopUp/v2/DuitkuNotification.aspx

     FINPAY_MERCHANT_CODE=finpay-merchant-id
     FINPAY_MERCHANT_KEY=finpay-merchant-key
     FINPAY_PAYMENT_URL=https://devo.finnet.co.id
    ```

Usage
-----

[](#usage)

After installation, you can use the package via the provided Facade. Below are examples of how to fetch categories and items.

### Show Payment Methods

[](#show-payment-methods)

```
use yogigr\PaymentGateway\Facades\PaymentGateway;

$methods = PaymentGateway::getPaymentMethodOptions();
```

### Create Invoice

[](#create-invoice)

```
use yogigr\PaymentGateway\Facades\PaymentGateway;

$data = [
    'amount' => 100000,
    'email' => 'customer@email.com',
    'phone' => '628100000000',
    'product_details' => 'Product details',
    'merchant_order_id' => 'order id / kode',
    'invoice_id' => 'Invoice id',
    'merchant_user_info' => 'Customer info / user id', // (opsional)
    'customer_name' => 'Customer name',
    'callback_path' => '/payment/callback',
    'return_path' => '/invoices',
    'success_path' => '/invoices?status=success',
    'expiry_period' => 60,
    'address' => 'Customer address',
    'city' => 'Customer city',
    'postal_code' => 'Postal code',
    'country_code' => 'ID'
];

$paymentMethod = 'credit_card';

$response = PaymentGateway::createInvoice($data, $paymentMethod);

if ($response->statusCode == '00') {
    redirect($response->paymentUrl);
}
```

### Callback

[](#callback)

```
use yogigr\PaymentGateway\Facades\PaymentGateway;
use Illuminate\Http\Request;

class CallbackController extends Controller
{
    public function callback(Request $request)
    {
        $result = PaymentGateway::callback($request);

        if ($result['resultCode'] === '00') { // success
            // actions if success
        }
    }
}
```

### Check transaction

[](#check-transaction)

```
use yogigr\PaymentGateway\Facades\PaymentGateway;

$transaction = PaymentGateway::checkTransaction($merchantOrderId);

dd($transaction);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Total

2

Last Release

570d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1aab74c0de69639b5581f85e843d3dd54458ab74b00af0d414be0dd6cf238659?d=identicon)[yogigr](/maintainers/yogigr)

---

Top Contributors

[![yogigr](https://avatars.githubusercontent.com/u/13002716?v=4)](https://github.com/yogigr "yogigr (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yogigr-payment-gateway/health.svg)

```
[![Health](https://phpackages.com/badges/yogigr-payment-gateway/health.svg)](https://phpackages.com/packages/yogigr-payment-gateway)
```

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
