PHPackages                             arielmejiadev/pagalogt - 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. arielmejiadev/pagalogt

ActiveLibrary

arielmejiadev/pagalogt
======================

PagaloGT payment processing library that provides a fluent syntax, testing methods and has Cybersource implementation.

5.0.0(5y ago)4751MITPHPPHP ^7.1|^8.0

Since Sep 14Pushed 5y ago2 watchersCompare

[ Source](https://github.com/ArielMejiaDev/pagalogt)[ Packagist](https://packagist.org/packages/arielmejiadev/pagalogt)[ Docs](https://github.com/arielmejiadev/pagalogt)[ RSS](/packages/arielmejiadev-pagalogt/feed)WikiDiscussions master Synced 2d ago

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

Laravel Payment processing library for PagaloGT
===============================================

[](#laravel-payment-processing-library-for-pagalogt)

[![Latest Version on Packagist](https://camo.githubusercontent.com/63dda42e75612986787f5a874ffc76c3c079a1cf547aab8b5c8fc6d69423e72f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617269656c6d656a69616465762f706167616c6f67742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arielmejiadev/pagalogt)[![Total Downloads](https://camo.githubusercontent.com/5e3b725561d44d0a08077ddef564dc7368235da7d579b9f509c37f46ea8e5785/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617269656c6d656a69616465762f706167616c6f67742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arielmejiadev/pagalogt)

It provides a fluent syntax to make payments in Laravel with PagaloGT payment gateway.

To learn more about the package [here the documentation site](https://laravel-pagalogt.netlify.app/)

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

[](#installation)

You can install the package via composer:

```
composer require arielmejiadev/pagalogt
```

Publish config file
-------------------

[](#publish-config-file)

Its not necessary but you can publish the config file:

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

Usage
-----

[](#usage)

- Add your PagaloGT credentials on the app `.env` file:

You can get the credentials [Here](https://app.pagalocard.com/developerint), you need to create an account and follow some steps with PagaloGT.

```
PAGALO_TEST_IDEN_EMPRESA='{TestPagaloIdenEmpresa}'
PAGALO_TEST_TOKEN='{TestPagaloToken}'
PAGALO_TEST_KEY_PUBLIC='{TestPagaloKeyPublic}'
PAGALO_TEST_KEY_SECRET='{TestPagaloKeySecret}'
PAGALO_ENVIRONMENT='test'
```

- For development and testing (to avoid real transactions):

```
$payment = new PagaloGT();
return $payment->add(1, 'Test transaction', 100.00)
    ->setClient('John', 'Doe', 'john@doe.com')
    ->withTestCard('John Doe')
    ->withTestCredentials()
    ->pay();
```

- Using the Facade

```
return PagaloGT::add(1, 'Test transaction', 100.00)
    ->setClient('John', 'Doe', 'john@doe.com')
    ->withTestCard('John Doe')
    ->withTestCredentials()
    ->pay();
```

- On production

```
PAGALO_IDEN_EMPRESA='{LivePagaloIdenEmpresa}'
PAGALO_TOKEN='{LivePagaloToken}'
PAGALO_KEY_PUBLIC='{LivePagaloKeyPublic}'
PAGALO_KEY_SECRET='{LivePagaloKeySecret}'
PAGALO_ENVIRONMENT='live'
```

```
return PagaloGT->add(1, 'Test transaction', 100.00)
    ->setClient('John', 'Doe', 'john@doe.com')
    ->setCard('JOHN JOSEPH DOE DULLIE', 'XXXX XXXX XXXX XXXX', 12, 2022, 742)
    ->pay();
```

Validate response
-----------------

[](#validate-response)

### In Laravel 5.5 to Laravel 6.x

[](#in-laravel-55-to-laravel-6x)

The package provide constants to validate response you can do something like:

```
$response['decision'] === 'ACCEPT';
$response['reasonCode'] === 100;
```

To avoid magic numbers you can do something like this:

```
use \ArielMejiaDev\PagaloGT\PagaloGT;
// ...
$response = PagaloGT::add(1, 'Test transaction from Laravel 5.5', 100.00)
        ->setClient('John', 'Doe', 'john@doe.com')
        ->withTestCard('John Doe')
        ->withTestCredentials()
        ->pay();
    if($response['decision'] === PagaloGT::APPROVE_DECISION &&
       $response['reasonCode'] === PagaloGT::APPROVE_REASON_CODE ) {
        // do something
    }
```

### In Laravel 7 and 8

[](#in-laravel-7-and-8)

You can use the old validation way (since Laravel 5.5 - 6.x)

In laravel 7 and 8 the library change response, so you can validate like this:

```
$response = PagaloGT::add(1, 'product', 100.00)->withTestCard()->withTestCredentials()->pay();
if($response->successful()) {
    // do something
}
```

Other methods to validate:

```
$response->fail();
$response->successful();
$response->ok()
$response->header('single header');
$response->headers();
```

### Support Cybersource:

[](#support-cybersource)

The library is ready to support cybersource transactions, it only needs to add a config variable:

```
PAGALO_USE_CYBERSOURCE=true
```

You need to add a script to generate the `deviceFingerPrint` on your checkout form.

In the docs you can get scripts ready to use for:

- Blade file: [Cybersource Script for blade files](BLADESCRIPT.md)
- VueJS file: (pending)

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

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

Credits
-------

[](#credits)

- [Ariel Mejia Dev](https://github.com/arielmejiadev)
- [Victor Yoalli](https://github.com/victoryoalli)

License
-------

[](#license)

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

5

Last Release

1906d ago

Major Versions

1.0.0 → 2.0.02020-09-14

2.0.0 → 3.0.02020-09-14

3.0.0 → 4.0.02020-09-14

4.0.0 → 5.0.02021-02-22

PHP version history (2 changes)1.0.0PHP ^7.1

5.0.0PHP ^7.1|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31971074?v=4)[ArielMejiaDev](/maintainers/ArielMejiaDev)[@ArielMejiaDev](https://github.com/ArielMejiaDev)

---

Top Contributors

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

---

Tags

arielmejiadevpagalogt

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arielmejiadev-pagalogt/health.svg)

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

###  Alternatives

[arielmejiadev/larapex-charts

Package to provide easy api to build apex charts on Laravel

302445.7k](/packages/arielmejiadev-larapex-charts)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[arielmejiadev/json-api-auth

It adds authentication scaffold for api authentication by tokens for packages like Passport or Sanctum.

264.2k](/packages/arielmejiadev-json-api-auth)[arielmejiadev/jetbar

It adds a sidebar dashboard theme for Laravel applications with Jetstream.

171.4k](/packages/arielmejiadev-jetbar)

PHPackages © 2026

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