ibragimoff26/crypto-pay-api
Composer 安装命令:
composer require ibragimoff26/crypto-pay-api
包简介
Crypto pay api for @CryptoBot
关键字:
README 文档
README
Crypto Pay is a payment system based on @CryptoBot, which allows you to accept payments in cryptocurrency using the API. This library help you to work with Crypto Pay via Crypto Pay API.
Install
composer require ibragimoff26/crypto-pay-api
Usage
Just create an instance of CryptoPayApi
$httpClient = new \Ibragimoff\CryptoPayApi\Client\HttpClient(
'API_HOST_NAME', // https://pay.crypt.bot/ for mainnet and https://testnet-pay.crypt.bot/ for testnet
'YOUR_API_KEY',
new \Symfony\Component\HttpClient\CurlHttpClient()
);
$api = new \Ibragimoff\CryptoPayApi\CryptoPayApi($httpClient);
$me = $api->getMe();
$balance = $api->getBalance();
$currencies = $api->getCurrencies();
$exchangeRate = $api->getExchangeRate();
$invoices = $api->getInvoices(
new \Ibragimoff\CryptoPayApi\Model\GetInvoices\GetInvoicesRequest(
asset: "TON"
)
);
$newInvoice = $api->createInvoice(
new \Ibragimoff\CryptoPayApi\Model\CreateInvoice\CreateInvoiceRequest(
asset: "TON",
amount: "0.01"
)
);
统计信息
- 总下载量: 758
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-08