1. Go to this page and download the library: Download yellow/php-sdk 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/ */
yellow / php-sdk example snippets
use Yellow\Bitcoin\Invoice;
$api_key = "Your API public key";
$api_secret = "Your API Private key";
$yellow = new Invoice($api_key,$api_secret);
/// this will return an array with invoice data
$paylaod = array(
"base_price" => 10,
"base_ccy" => "USD",
"callback" => "http://yourstore.local/checkout/status/"
);
$invoice = $yellow->createInvoice($payload);
var_dump($invoice);
/// this will return an array with invoice status data
$status = $yellow->checkInvoiceStatus($invoice["id"]);
var_dump($status);
use Yellow\Bitcoin\Invoice;
$api_key = "Your API public key";
$api_secret = "Your API Private key";
$yellow = new Invoice($api_key,$api_secret);
$isValidIPN = $yellow->verifyIPN($url, $signature, $key, $nonce, $body); //bool
var_dump($isValidIPN);