PHPackages                             korozcolt/payments - 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. korozcolt/payments

ActiveLibrary[Payment Processing](/categories/payments)

korozcolt/payments
==================

A payment gateway package for Laravel supporting Wompi, MercadoPago, and ePayco. Designed for Colombian and Latin American markets.

v1.0.0(3mo ago)293↓50%[1 issues](https://github.com/korozcolt/payments/issues)MITPHPPHP ^8.2

Since Jan 23Pushed 3mo agoCompare

[ Source](https://github.com/korozcolt/payments)[ Packagist](https://packagist.org/packages/korozcolt/payments)[ Docs](https://github.com/korozcolt/payments)[ RSS](/packages/korozcolt-payments/feed)WikiDiscussions master Synced 1mo ago

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

Korozcolt Payments
==================

[](#korozcolt-payments)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8c069c32118e9b4ea0b0865fdf238b5903e4d425fe77b12572766445a1e1dae9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f726f7a636f6c742f7061796d656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/korozcolt/payments)[![Total Downloads](https://camo.githubusercontent.com/82a5606bde85a6715ff230fd96437bb733a21a93e7a0f1478fc70820e84f569d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f726f7a636f6c742f7061796d656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/korozcolt/payments)[![License](https://camo.githubusercontent.com/e00d575bede665285f46e868b8d2c2bc8305232b0a260fdd1b62cff6dbfd63f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b6f726f7a636f6c742f7061796d656e74732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/korozcolt/payments)

A unified payment gateway package for Laravel supporting **Wompi**, **MercadoPago**, and **ePayco**. Designed for Colombian and Latin American markets.

Features
--------

[](#features)

- **Unified API** - Single interface for multiple payment providers
- **Three Providers** - Wompi, MercadoPago, and ePayco out of the box
- **Driver Architecture** - Easily extensible for custom providers
- **Event-Driven** - Listen to payment events for business logic
- **Webhook Handling** - Built-in webhook controller with signature verification
- **Flexible Configuration** - Database or config-based credential management
- **Laravel 10/11/12** - Full compatibility with recent Laravel versions

Supported Providers
-------------------

[](#supported-providers)

ProviderCountryMethods**Wompi**ColombiaCards, PSE, Nequi, Bancolombia, Efecty**MercadoPago**Latin AmericaCards, Bank Transfer, Cash**ePayco**ColombiaCards, PSE, Efecty, BalotoRequirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, or 12

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

[](#installation)

```
composer require korozcolt/payments
```

Publish the configuration:

```
php artisan vendor:publish --tag=payments-config
```

Run the migrations:

```
php artisan vendor:publish --tag=payments-migrations
php artisan migrate
```

Quick Start
-----------

[](#quick-start)

### 1. Configure Environment

[](#1-configure-environment)

```
PAYMENTS_DEFAULT=wompi
PAYMENTS_ENABLED=wompi,mercadopago,epayco

WOMPI_PUBLIC_KEY=pub_test_xxx
WOMPI_PRIVATE_KEY=prv_test_xxx
WOMPI_INTEGRITY_KEY=test_integrity_xxx
```

### 2. Create a Payment

[](#2-create-a-payment)

```
use Korbytes\Payments\Facades\Payments;
use Korbytes\Payments\DTOs\PaymentData;

$paymentData = new PaymentData(
    referenceId: $order->id,
    amount: 150000, // Amount in cents (1,500.00 COP)
    currency: 'COP',
    customer: [
        'name' => 'John Doe',
        'email' => 'john@example.com',
    ],
    returnUrl: 'https://yourapp.com/payment/complete',
);

// Use default driver
$result = Payments::charge($paymentData);

// Or specify a driver
$result = Payments::driver('wompi')->charge($paymentData);
```

### 3. Handle the Result

[](#3-handle-the-result)

```
if ($result->success) {
    return view('payment.widget', [
        'widgetUrl' => $result->widgetUrl,
        'publicKey' => $result->publicKey,
        'reference' => $result->reference,
        'signature' => $result->signature,
        'amount' => $result->amountInCents,
    ]);
}
```

### 4. Listen to Events

[](#4-listen-to-events)

```
// In EventServiceProvider
use Korbytes\Payments\Events\PaymentApproved;

protected $listen = [
    PaymentApproved::class => [
        \App\Listeners\HandlePaymentApproved::class,
    ],
];
```

```
// app/Listeners/HandlePaymentApproved.php
class HandlePaymentApproved
{
    public function handle(PaymentApproved $event): void
    {
        $transaction = $event->transaction;

        // Update your order, send emails, etc.
        Order::where('id', $transaction->reference_id)
            ->update(['status' => 'paid']);
    }
}
```

Documentation
-------------

[](#documentation)

- [Installation Guide](INSTALL.md) - Detailed installation instructions
- [Usage Guide](USAGE.md) - Complete usage examples and patterns
- [Changelog](CHANGELOG.md) - Version history

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

[](#configuration)

### Environment Variables

[](#environment-variables)

```
# General
PAYMENTS_DEFAULT=wompi
PAYMENTS_ENABLED=wompi,mercadopago,epayco
PAYMENTS_USE_DATABASE=true
PAYMENTS_RETURN_URL=https://yourapp.com/payment/complete
PAYMENTS_WEBHOOK_URL=https://yourapp.com/payments/webhooks

# Wompi
WOMPI_SANDBOX=true
WOMPI_PUBLIC_KEY=pub_test_xxx
WOMPI_PRIVATE_KEY=prv_test_xxx
WOMPI_INTEGRITY_KEY=test_integrity_xxx
WOMPI_EVENTS_SECRET=test_events_xxx

# MercadoPago
MERCADOPAGO_SANDBOX=true
MERCADOPAGO_ACCESS_TOKEN=TEST-xxx
MERCADOPAGO_PUBLIC_KEY=TEST-xxx

# ePayco
EPAYCO_SANDBOX=true
EPAYCO_PUBLIC_KEY=xxx
EPAYCO_PRIVATE_KEY=xxx
EPAYCO_P_CUST_ID=xxx
EPAYCO_P_KEY=xxx
```

### Webhook URLs

[](#webhook-urls)

Configure these in your payment provider dashboards:

ProviderURLWompi`https://yourapp.com/payments/webhooks/wompi`MercadoPago`https://yourapp.com/payments/webhooks/mercadopago`ePayco`https://yourapp.com/payments/webhooks/epayco`Events
------

[](#events)

EventDescription`PaymentCreated`Payment intent created`PaymentApproved`Payment approved by provider`PaymentRejected`Payment rejected/failed`WebhookReceived`Webhook received from providerAPI Reference
-------------

[](#api-reference)

### Facades

[](#facades)

```
// Get a driver
Payments::driver('wompi');

// Charge using default driver
Payments::charge($paymentData);

// Check availability
Payments::isAvailable('wompi');
Payments::hasAvailableDriver();

// Get enabled drivers
Payments::enabledDrivers();

// Get active gateways from database
Payments::activeGateways();

// Extend with custom driver
Payments::extend('custom', CustomDriver::class);
```

### PaymentData DTO

[](#paymentdata-dto)

```
$paymentData = new PaymentData(
    referenceId: string,       // Your order/reference ID
    amount: int,               // Amount in cents
    currency: string,          // ISO 4217 code (default: COP)
    customer: array,           // [name, email, phone?]
    returnUrl: ?string,        // Redirect after payment
    webhookUrl: ?string,       // Webhook notification URL
    description: ?string,      // Payment description
    metadata: array,           // Custom data
    items: array,              // Line items
);
```

### PaymentResult DTO

[](#paymentresult-dto)

```
$result->success;           // bool
$result->transaction;       // PaymentTransaction model
$result->provider;          // PaymentProvider enum
$result->widgetUrl;         // Widget script URL
$result->publicKey;         // Provider public key
$result->amountInCents;     // Amount
$result->currency;          // Currency code
$result->reference;         // Transaction reference
$result->signature;         // Payment signature
$result->redirectUrl;       // Redirect URL
$result->extra;             // Provider-specific data
$result->errorCode;         // Error code (if failed)
$result->errorMessage;      // Error message (if failed)
```

Extending
---------

[](#extending)

Create a custom driver:

```
use Korbytes\Payments\Drivers\AbstractDriver;
use Korbytes\Payments\Contracts\PaymentDriverInterface;

class CustomDriver extends AbstractDriver implements PaymentDriverInterface
{
    public function getName(): string
    {
        return 'custom';
    }

    // Implement other required methods...
}

// Register in a service provider
Payments::extend('custom', CustomDriver::class);
```

Testing
-------

[](#testing)

```
composer test
```

Security
--------

[](#security)

If you discover any security-related issues, please open an issue on the [GitHub repository](https://github.com/korozcolt/payments/issues).

Credits
-------

[](#credits)

- [Korozcolt](https://github.com/korozcolt)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance69

Regular maintenance activity

Popularity16

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

109d ago

### Community

Maintainers

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

---

Tags

laravelpaymentsmercadopagocheckoutpayment gatewayepaycoWompicolombiapse

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/korozcolt-payments/health.svg)

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[laravel/cashier-paddle

Cashier Paddle provides an expressive, fluent interface to Paddle's subscription billing services.

264778.4k3](/packages/laravel-cashier-paddle)[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)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[asciisd/knet

Knet package is provides an expressive, fluent interface to KNet's payment services.

141.1k](/packages/asciisd-knet)

PHPackages © 2026

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