PHP code example of apoca / laravel-sibs-payments

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

    

apoca / laravel-sibs-payments example snippets


Apoca\Sibs\SibsServiceProvider::class,

'Sibs' => Apoca\Sibs\Facade\Sibs::class,

$request = [
    'brand' => 'CHECKOUT',
    'amount' => 100,
    'currency' => 'EUR',
    'type' => 'DB',
    'optionalParameters' => [],
];

$response = Sibs::checkout($request)->pay();

$request = [
    'amount' => 102.34,
    'currency' => 'EUR',
    'brand' => 'VISA',
    'type' => 'DB',
    'number' => 4200000000000000,
    'holder' => 'Jane Jones',
    'expiry_month' => 05,
    'expiry_year' => 2020,
    'cvv' => 123,
    'optionalParameters' => [],
];
$response = Sibs::checkout($request)->pay();

$request = [
    'amount' => 10.44,
    'currency' => 'EUR',
    'brand' => 'MBWAY',
    'type' => 'PA',
    'accountId' => '351#911222111',
    'optionalParameters' => [],
];
$response = Sibs::checkout($request)->pay();
shell
php artisan vendor:publish --provider="Apoca\Sibs\SibsServiceProvider"

$response = Sibs::status($response->response->id);