PHPackages                             blinkpay/laravel - 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. blinkpay/laravel

ActiveLibrary[Payment Processing](/categories/payments)

blinkpay/laravel
================

BlinkPay payment gateway integration for Laravel

v1.2.1(12mo ago)02MITPHPPHP ^8.1

Since May 22Pushed 12mo ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (6)Used By (0)

BlinkPay Laravel
================

[](#blinkpay-laravel)

A Laravel package for integrating BlinkPay payment gateway into your Laravel applications.

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

[](#installation)

You can install the package via composer:

```
composer require blinkpay/laravel
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="BlinkPay\Laravel\BlinkPayServiceProvider"
```

Add the following to your `.env` file:

```
BLINK_PAYMENTS_USERNAME=your_username
BLINK_PAYMENTS_PASSWORD=your_password
BLINK_PAYMENTS_MERCHANT_ID=your_merchant_id
BLINK_PAYMENTS_MERCHANT_PASSWORD=your_merchant_password
BLINK_PAYMENTS_API_URL=your_api_url
BLINK_PAYMENTS_BANKING_API_URL=your_banking_api_url
BLINK_PAYMENTS_DEFAULT_EXCHANGE_RATE=3700
BLINK_PAYMENTS_EXCHANGE_RATE_KEY=your_exchange_rate_key
BLINK_PAYMENTS_CONVERT_TO_UGX=false
```

Usage
-----

[](#usage)

### Mobile Money Payments

[](#mobile-money-payments)

```
use BlinkPay\Laravel\Facades\BlinkPay;

class PaymentController extends Controller
{
    public function processMobileMoneyPayment(Request $request)
    {
        try {
            $result = BlinkPay::mobileMoney([
                'order_id' => $request->order_id,
                'amount' => $request->amount,
                'currency' => $request->currency,
                'phone_number' => $request->phone_number
            ]);

            return response()->json($result);
        } catch (\Exception $e) {
            return response()->json(['error' => $e->getMessage()], 400);
        }
    }
}
```

### Credit Card Payments

[](#credit-card-payments)

```
use BlinkPay\Laravel\Facades\BlinkPay;

class PaymentController extends Controller
{
    public function processCreditCardPayment(Request $request)
    {
        try {
            $result = BlinkPay::processCreditCardPayment([
                'order_id' => $request->order_id,
                'amount' => $request->amount,
                'currency' => $request->currency,
                'card_number' => $request->card_number,
                'expiry_month' => $request->expiry_month,
                'expiry_year' => $request->expiry_year,
                'cvv' => $request->cvv,
                'card_holder_name' => $request->card_holder_name,
                'billing_address' => $request->billing_address,
                'billing_city' => $request->billing_city,
                'billing_country' => $request->billing_country,
                'billing_postal_code' => $request->billing_postal_code
            ]);

            return response()->json($result);
        } catch (\Exception $e) {
            return response()->json(['error' => $e->getMessage()], 400);
        }
    }
}
```

Features
--------

[](#features)

### Mobile Money

[](#mobile-money)

- Supports various mobile money providers
- Automatic phone number validation and formatting
- Currency conversion to UGX (configurable)
- Minimum amount validation (500 UGX)
- Transaction status checking

### Credit Cards

[](#credit-cards)

- Supports major card types (Visa, Mastercard, Amex, Discover)
- Card number validation using Luhn algorithm
- Automatic card type detection
- Billing address support
- Currency conversion to UGX (configurable)

Currency Conversion
-------------------

[](#currency-conversion)

The package supports automatic currency conversion to UGX. This can be enabled by setting `BLINK_PAYMENTS_CONVERT_TO_UGX=true` in your `.env` file.

When enabled:

- All amounts will be converted to UGX using the configured exchange rate
- Minimum amount validation (500 UGX) is automatically applied
- The exchange rate can be configured using `BLINK_PAYMENTS_DEFAULT_EXCHANGE_RATE`
- Custom exchange rates can be implemented using `BLINK_PAYMENTS_EXCHANGE_RATE_KEY`

Response Format
---------------

[](#response-format)

All payment methods return a response in the following format:

```
{
    "status": "SUCCESS|FAILED|PENDING",
    "message": {
        "reference_code": "transaction_reference",
        "status": "transaction_status",
        "details": "Additional transaction details"
    }
}
```

Error Handling
--------------

[](#error-handling)

The package throws exceptions for various error conditions:

- Invalid phone number format
- Invalid credit card number
- Minimum amount requirement not met (500 UGX)
- Currency conversion errors
- API communication errors
- Invalid or missing configuration

All exceptions include detailed error messages to help identify the issue.

Testing
-------

[](#testing)

```
./vendor/bin/phpunit
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

```

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance50

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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 ~0 days

Total

4

Last Release

361d ago

PHP version history (2 changes)v1.0.0PHP ^7.4|^8.0

v1.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/e570679a2e732e4195adfec6657516a63d3847886091fddc65fdb08b2155dde9?d=identicon)[givan256](/maintainers/givan256)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/blinkpay-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/blinkpay-laravel/health.svg)](https://phpackages.com/packages/blinkpay-laravel)
```

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

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

PHPackages © 2026

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