PHP code example of allstak / sdk-php

1. Go to this page and download the library: Download allstak/sdk-php 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/ */

    

allstak / sdk-php example snippets




llStak\AllStak;
use AllStak\Facade;

AllStak::init([
    'apiKey' => getenv('ALLSTAK_API_KEY'),
    'environment' => getenv('APP_ENV') ?: 'production',
    'release' => getenv('ALLSTAK_RELEASE'),
    'service' => 'checkout-api',
]);

Facade::captureError(new RuntimeException('checkout failed'));
Facade::captureLog('info', 'payment retry', ['orderId' => 'ord_123']);

AllStak\Laravel\AllStakServiceProvider::class,
bash
composer 
bash
php artisan vendor:publish --tag=allstak-config