legionhq / laravel-payrex
Laravel package for the PayRex payment platform
Fund package maintenance!
v1.1.0
2026-03-24 12:50 UTC
Requires
- php: ^8.2
- guzzlehttp/psr7: ^2.0
- illuminate/contracts: ^11.0|^12.0|^13.0
- illuminate/http: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
- laravel/prompts: ^0.3.15
- psr/http-message: ^1.1|^2.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
README
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.