PHP code example of sebacarrasco93 / laravel-payku

1. Go to this page and download the library: Download sebacarrasco93/laravel-payku 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/ */

    

sebacarrasco93 / laravel-payku example snippets


// In your controller, web.php or equivalent

$order = 'unique-order-'.rand(11111,99999);
$subject = 'Your order';
$amount = 1000; 
$email = '[email protected]';

return LaravelPayku::create($order, $subject, $amount, $email);
dotenv
APP_ENV=local # will set https://des.payku.cl/api
bash
php artisan vendor:publish --provider="SebaCarrasco93\LaravelPayku\LaravelPaykuServiceProvider"