PHP
This is the Sellgate PHP SDK. It is a simple SDK that allows you to easily integrate crypto payments into your PHP application.
Installation
composer require sellgate/php-sdk
Usage
<?php
require_once __DIR__ . "vendor/autoload.php";
use \Sellgate\Sellgate;
$sellgate = new Sellgate();
$checkoutData = [
"title" => "Premium Subscription",
"description" => "1-year access to all premium features",
"currency" => "USD",
"price" => "99.99",
"crypto" => [
[
"network" => "ETH",
"coin" => "ETH",
"address" => "0xB1DA646D1cD015d205a99198e809724D5C78109d"
]
],
"webhook" => "https://example.com/webhook",
"return" => "https://example.com/thank-you"
];
$checkoutResult = $sellgate->createCheckout($checkoutData);
print_r($checkoutResult);
$addressData = [
"crypto" => [
"network" => "ETH",
"coin" => "ETH",
"address" => "0xB1DA646D1cD015d205a99198e809724D5C78109d"
],
"webhook" => "https://example.com/webhook"
];
$addressResult = $sellgate->createAddress($addressData);
print_r($addressResult);