PHP code example of blindpay / php

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

    

blindpay / php example snippets


use BlindPay\SDK\BlindPay;

$blindpay = new BlindPay(
    apiKey: 'your-api-key-here',
    instanceId: 'your-instance-id-here'
);

use BlindPay\SDK\BlindPay;

function getAvailableRails(): void
{
    $blindpay = new BlindPay(
        apiKey: 'your-api-key-here',
        instanceId: 'your-instance-id-here'
    );

    $response = $blindpay->available->getRails();

    if ($response->isError()) {
        throw new RuntimeException($response->error->message);
    }

    foreach ($response->data) {
        echo "Rail: {$rail->label} ({$rail->value}) - {$rail->country}\n";
    }
}

getAvailableRails();
bash
composer