Looking to hire Laravel developers? Try LaraJobs

laravel-payrex maintained by legionhq

Description
Laravel package for the PayRex payment platform
Author
Last update
2026/04/13 04:21 (dev-main)
License
Downloads
88

Comments
comments powered by Disqus

PayRex for Laravel

Latest Version on Packagist GitHub Tests Action Status PHPStan Code Coverage GitHub Code Style Action Status Total Downloads

Unofficial Laravel package for PayRex payment platform. Easily accept payments via credit/debit cards, GCash, Maya, BillEase, QR Ph and more.

Documentation

You'll find full documentation on the docs site.

Basic Usage

use LegionHQ\LaravelPayrex\Facades\Payrex;

// Create a payment intent
$paymentIntent = Payrex::paymentIntents()->create([
    'amount' => 10000, // ₱100.00 in cents
    'currency' => 'PHP',
    'payment_methods' => ['card', 'gcash', 'maya'],
    'description' => 'Order #1234',
]);

// Create a checkout session
$session = Payrex::checkoutSessions()->create([
    'currency' => 'PHP',
    'line_items' => [
        ['name' => 'Premium Plan', 'amount' => 99900, 'quantity' => 1],
    ],
    'payment_methods' => ['card', 'gcash'],
    'success_url' => route('checkout.success'),
    'cancel_url' => route('checkout.cancel'),
]);

return redirect()->away($session->url);

Installation

You can install the package via composer:

composer require legionhq/laravel-payrex

Publish the config file:

php artisan vendor:publish --tag="payrex-config"

Add your API keys to .env:

PAYREX_PUBLIC_KEY=your_public_key
PAYREX_SECRET_KEY=your_secret_key
PAYREX_WEBHOOK_SECRET=your_webhook_secret

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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