PHP code example of litegoio / litego-php

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

    

litegoio / litego-php example snippets




use Litego\Litego;

$litego = new Litego();

$litego = new Litego('test');

$result = $litego->authenticate($merchantId, $secretKey);

$result = $litego->reauthenticate($refreshToken $merchantId, $secretKey);

$result = $litego->createCharge($authToken, $description, $amount_satoshi);
print_r($result);

$result = $litego->chargesList($authToken, array(
'page' => 1,
'pageSize' => 5,
'paidOnly' => true,
));
print_r($result);

$result = $litego->getCharge($authToken, $chargeId);
print_r($result);

"  "litegoio/litego-php": "1.1.*"
}