PHP code example of btcpayserver / btcpayserver-greenfield-php
1. Go to this page and download the library: Download btcpayserver/btcpayserver-greenfield-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/ */
btcpayserver / btcpayserver-greenfield-php example snippets
composer
// Require the autoload file.
.
$apiKey = '';
$host = ''; // e.g. https://your.btcpay-server.tld
try {
$client = new \BTCPayServer\Client\Store($host, $apiKey);
var_dump($client->getStores());
} catch (\Throwable $e) {
echo "Error: " . $e->getMessage();
}