PHP code example of arniro / laravel-paybox

1. Go to this page and download the library: Download arniro/laravel-paybox library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arniro / laravel-paybox example snippets


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();
    }
}

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