LaravelPackages.net
Acme Inc.
Toggle sidebar
arniro/laravel-paybox

A Laravel wrapper for Paybox payment

472
1
0.1.2
About arniro/laravel-paybox

arniro/laravel-paybox is a Laravel package for a laravel wrapper for paybox payment. It currently has 1 GitHub stars and 472 downloads on Packagist (latest version 0.1.2). Install it with composer require arniro/laravel-paybox. Discover more Laravel packages by arniro or browse all Laravel packages to compare alternatives.

Last updated

A Laravel wrapper for Paybox Payment Gateway

Only receiving payments are currently supported.

Installation

  • Install the package via composer: composer require arniro/laravel-paybox
  • Publish configuration file: php artisan vendor:publish --tag paybox-config
  • Set merchant_id and secret_key in the config file

Usage

All you need to do is to redirect a user to the generated url of a Paybox website:

use Arniro\Paybox\Facades\Paybox;

class OrdersController extends Controller
{
    public function store()
    {
        ...

        return Paybox::generateUrl([
            'price' => 500,
            'description' => 'Products description',
            'order_id' => 123456,
            'email' => '[email protected]',
            'phone' => '123456789',
            'name' => 'John Doe',
            'address' => 'Dummy address'
        ])->redirect();
    }
}

You can also override any configuration values except merchant_id and secret_key while generating an url:

return Paybox::generateUrl([
    ...,
    'currency' => 'KZT' 
])->redirect();

By default, all payments will be made in the testing mode until you're in production. Feel free to change this behaviour in the configuration file.

Testing

composer test

License

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

Comments