PHP code example of phenogram / gateway-bindings

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

    

phenogram / gateway-bindings example snippets


interface ClientInterface
{
    /** @param array<string, mixed> $data */
    public function sendRequest(string $method, array $data): ResponseInterface;
}

try {
    $status = $api->checkVerificationStatus($requestId, $code);
} catch (\Phenogram\GatewayBindings\ResponseException $exception) {
    $gatewayError = $exception->gatewayError;
}
bash
php examples/offline.php
bash
php examples/send-verification.php
bash
export TELEGRAM_GATEWAY_TOKEN='your-token'
export TELEGRAM_GATEWAY_PHONE='+12025550123'
php examples/send-verification.php --live