PHP code example of codetech / laravel-eupago

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

    

codetech / laravel-eupago example snippets


use CodeTech\EuPago\Traits\HasMbWayReferences;

class Order extends Model
{
    use HasMbWayReferences;
}

$order = Order::find(1);

$reference = $order->createMbwayReference($order->value, $order->id, '912345678');
bash
php artisan vendor:publish --provider="CodeTech\EuPago\Providers\EuPagoServiceProvider" --tag=migrations
bash
php artisan migrate
ini
EUPAGO_ENV=test
EUPAGO_API_KEY=demo-xxxx-xxxx-xxxx-xxx
EUPAGO_CHANNEL=demo