- Автор
- pligin
PHP класс для взаимодействия с API кошелька FKWallet
Usage
Check Balances
Response example
Withdrawals
Response example
Getting the status of a withdrawal operation from a wallet
Response example
Get List Banks for SBP
Transfer to another wallet
Response example
Payment for online services
Response example
Getting a list of services for online payment
Response example
Checking the status of an online payment
Response example
Creating a BTC/LTC/ETH address
Response example
Getting a BTC/LTC/ETH address
Response example
Getting information on Bitcoin/Litecoin/Ethereum transactions
Response example
переименовать FKWallet.php в _class.FKWallet.php и загрузить в каталог classes
В файл /classes/_class.config.php добавить
Инициализация (например на странице выплаты)
В файл /classes/_class.config.php добавить
PHP:
# FKWallet
public $fkWalletID = 'F123456789'; // FKwallet
public $fkKeyApi = 'keyApiFKWallet'; // ApiFKwallet
PHP:
$fk = new FKWallet($config->fkWalletID,$config->fkKeyApi,0); //1 - return string json, 0 - return array php
загрузить файл FKWallet.php в каталог core
В файл /core/config.php добавить
Инициализация (например на странице выплаты)
В файл /core/config.php добавить
PHP:
# FKWallet
public $fkWalletID = 'F123456789'; // FKwallet
public $fkKeyApi = 'keyApiFKWallet'; // ApiFKwallet
PHP:
$fk = new FKWallet($config->fkWalletID,$config->fkKeyApi,0); //1 - return string json, 0 - return array php
PHP:
require 'FKWallet.php';
$fk = new FKWallet('wallet_id','api_key',1);//1 - return string json, 0 - return array php
PHP:
$balances = $fk->getBalance();
JSON:
{"status":"info","desc":"Wallet balance","data":{"RUB":"50.00","USD":"0.00","EUR":"0.00"}}
PHP:
$fk->cashout('purse','id_payment_system','amount','description');
JSON:
{"status":"info","desc":"Payment send","data":{"payment_id":"543273"}}
2 WebMoney WMZ
63 QIWI кошелек
64 Perfect Money USD
45 Яндекс.Деньги
69 Perfect Money EUR
82 Мобильный Платеж Мегафон
83 Мобильный Платеж Билайн
84 Мобильный Платеж МТС
94 VISA/MASTERCARD RUB
132 Мобильный Платеж Tele2
115 PAYEER USD
114 PAYEER RUB
133 FK WALLET RUB
136 ADVCASH USD
150 ADVCASH RUB
186 VISA/MASTERCARD KZT
201 СБП
63 QIWI кошелек
64 Perfect Money USD
45 Яндекс.Деньги
69 Perfect Money EUR
82 Мобильный Платеж Мегафон
83 Мобильный Платеж Билайн
84 Мобильный Платеж МТС
94 VISA/MASTERCARD RUB
132 Мобильный Платеж Tele2
115 PAYEER USD
114 PAYEER RUB
133 FK WALLET RUB
136 ADVCASH USD
150 ADVCASH RUB
186 VISA/MASTERCARD KZT
201 СБП
PHP:
$fk->getPaymentStatus('paymentId');
JSON:
{"status":"info","desc":"Order status","data":{"payment_id":"543273","status":"Canceled"}}
PHP:
$fk->getListSBP();
PHP:
$fk->transfer('purse','amount');
JSON:
{"status":"info","desc":"Payment send"}
PHP:
$fk->onlinePayment('serviceId','account|purse','amount');
JSON:
{"status":"info","desc":"Payment send","data":{"payment_id":"543273"}}
PHP:
$fk->getProviders();
JSON:
{
"status": "info",
"desc": "Providers list",
"data": [
{
"id": "1",
"name": "МТС",
"min_amount": "5.00",
"commission": "0"
},
{
"id": "2",
"name": "Билайн",
"min_amount": "5.00",
"commission": "0"
},
]
}
PHP:
$fk->checkOnlinePayment('paymentId');
JSON:
{"status":"info","desc":"Order status","data":{"payment_id":"6532323","status":"Canceled"}}
PHP:
$fk->createCryptoAddress('type');//type - btc,ltc,eth
JSON:
{"status":"info","desc":"Address created","data": [{"address": "4eftk98j9h76g5454er5ty8uh3dwec"}]}
PHP:
$fk->getCryptoAddress('type');//type - btc,ltc,eth
JSON:
{"status":"info","desc":"","data":{"address":"46D98a09Fd204C9C72d2A2Dd3563fF5495aD41D0","valid":"2020-05-16 14:54:52"}}
PHP:
$fk->getCryptoTransaction('type','transactionId');//type - btc,ltc,eth
JSON:
{
"status":"info",
"desc":"",
"data": [
{
"address": "4eftk98j9h76g5454er5ty8uh3dwec",
"transaction_id": "gb56yu3txdy237dy2xu8d2983tdxy23dux2873d7yx20d",
"amount": "0.001",
"fee": "0",
"confirmations": "4",
"date": "2017-01-01 23:32:33"
}
]
}