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

ActiveLibrary[Payment Processing](/categories/payments)

pawelsome/laravel-dotpay
========================

Laravel 5 Dotpay

0.0.7(9y ago)0142PHPPHP &gt;=5.5.9

Since Aug 12Pushed 8y ago1 watchersCompare

[ Source](https://github.com/pawelsome/laravel-dotpay)[ Packagist](https://packagist.org/packages/pawelsome/laravel-dotpay)[ RSS](/packages/pawelsome-laravel-dotpay/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (6)Used By (0)

Laravel Dotpay Wrapper
======================

[](#laravel-dotpay-wrapper)

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

[](#installation)

Require this package with composer:

```
composer require alzo02/laravel-dotpay
```

After updating composer, add the ServiceProvider to the providers array in config/app.php

### Laravel 5.x:

[](#laravel-5x)

```
Alzo\LaravelDotpay\ServiceProvider::class,
```

If you want to use the facade, add this to your facades in app.php:

```
'Dotpay' => Alzo\LaravelDotpay\Facade::class
```

Configure .env file, add these lines

```
DOTPAY_ID=XXXXXX
```

```
DOTPAY_EMAIL=YOUR@EMAIL.COM
```

```
DOTPAY_INFO="STORE INFO"
```

```
DOTPAY_PIN=YOUR_DOTPAY_PIN
```

Publish configuration file

```
php artisan vendor:publish
```

Set up settings in config/dotpay.php

```
array(
    //route name for success redirect
    'success_url'=> 'dotpay.success',

    //route name for URLC notification
    'notification_url' => 'dotpay.notification',

    //default test mode is enabled, available: dev, prod
    'environment' => 'dev',

    //array of allowed IP, verified during URLC request
    'allowed_servers' => [
        '195.150.9.37'
    ]
);
```

Usage
-----

[](#usage)

### Create form in controller

[](#create-form-in-controller)

```
    $data = [
        'description'       => "Description",
        'control'           => "SOME RANDOM STRING HERE - ORDER TOKEN ETC",
        'channel'           => 73,
        'amount'            => 9999,
        'firstname'         => "CustomerName",
        'lastname'          => "CustomerSurname",
        'email'             => "Customer@Email",
        'button'            => "Pay Now",
    ];

    $form = Dotpay::createForm($data);

    return view('dotpay.payment', [
        'form' => $form
    ]);
```

### In your view type something like

[](#in-your-view-type-something-like)

```
    @if (isset($form) && $form)
        {!! $form !!}
    @endif
```

### Will be rendered

[](#will-be-rendered)

```

        Pay Now

```

### Create auto submitted form

[](#create-auto-submitted-form)

```

        window.onload = function () {
            var form = document.getElementsByClassName("dotpay-form")[0];
            form.submit();
        };

```

### Handle action for URLC notification

[](#handle-action-for-urlc-notification)

```
    public function notification(Request $request)
    {
        $data = $request->all();
        $ip = $request->getClientIp();

        // additional callback when validation fails
        Dotpay::failed(function ($data) {
            Log::debug("DOTPAY FAILED");
            Log::debug("DATA" . json_encode($data, JSON_PRETTY_PRINT));

            // do some stuff when data verification fails (hash is invalid)
        });

        // additional callback when validation passes
        Dotpay::success(function ($data) {
            Log::debug("DOTPAY SUCCESS");
            Log::debug("DATA" . json_encode($data, JSON_PRETTY_PRINT));

             // do some stuff when data verification passes
             // compare amount, control field etc.
        });

        // validate request IP and hash
        if (Dotpay::validateIP($ip)) {
            if (Dotpay::validate($data)) {
                Log::debug("Request is valid");
            } else {
                Log::debug("Request is invalid");
            }
        } else {
            Log::debug("Request IP is INVALID: {$ip}");
        }

        return "OK";
    }
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.9% 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 ~7 days

Total

5

Last Release

3533d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3be941e7f0273efbf8139a732189ae5cea8a9e5762237f7adc705c294ba39d8a?d=identicon)[pawelsome](/maintainers/pawelsome)

---

Top Contributors

[![alzo02](https://avatars.githubusercontent.com/u/20721274?v=4)](https://github.com/alzo02 "alzo02 (23 commits)")[![pawelsome](https://avatars.githubusercontent.com/u/18335382?v=4)](https://github.com/pawelsome "pawelsome (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)
