FKWallet PHP Class

FKWallet PHP Class 1.0.0

Нет прав для скачивания
Автор
pligin
PHP класс для взаимодействия с API кошелька FKWallet

переименовать FKWallet.php в _class.FKWallet.php и загрузить в каталог classes
В файл /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 добавить
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
Usage
PHP:
require 'FKWallet.php';
$fk = new FKWallet('wallet_id','api_key',1);//1 - return string json, 0 - return array php
Check Balances
PHP:
$balances = $fk->getBalance();
Response example
JSON:
{"status":"info","desc":"Wallet balance","data":{"RUB":"50.00","USD":"0.00","EUR":"0.00"}}
Withdrawals
PHP:
$fk->cashout('purse','id_payment_system','amount','description');
Response example
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 СБП
Getting the status of a withdrawal operation from a wallet
PHP:
$fk->getPaymentStatus('paymentId');
Response example
JSON:
{"status":"info","desc":"Order status","data":{"payment_id":"543273","status":"Canceled"}}
Get List Banks for SBP
PHP:
$fk->getListSBP();
Transfer to another wallet
PHP:
$fk->transfer('purse','amount');
Response example
JSON:
{"status":"info","desc":"Payment send"}
Payment for online services
PHP:
$fk->onlinePayment('serviceId','account|purse','amount');
Response example
JSON:
{"status":"info","desc":"Payment send","data":{"payment_id":"543273"}}
Getting a list of services for online payment
PHP:
$fk->getProviders();
Response example
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"
            },
        ]
    }
Checking the status of an online payment
PHP:
$fk->checkOnlinePayment('paymentId');
Response example
JSON:
{"status":"info","desc":"Order status","data":{"payment_id":"6532323","status":"Canceled"}}
Creating a BTC/LTC/ETH address
PHP:
$fk->createCryptoAddress('type');//type - btc,ltc,eth
Response example
JSON:
{"status":"info","desc":"Address created","data": [{"address": "4eftk98j9h76g5454er5ty8uh3dwec"}]}
Getting a BTC/LTC/ETH address
PHP:
$fk->getCryptoAddress('type');//type - btc,ltc,eth
Response example
JSON:
{"status":"info","desc":"","data":{"address":"46D98a09Fd204C9C72d2A2Dd3563fF5495aD41D0","valid":"2020-05-16 14:54:52"}}
Getting information on Bitcoin/Litecoin/Ethereum transactions
PHP:
$fk->getCryptoTransaction('type','transactionId');//type - btc,ltc,eth
Response example
JSON:
{
    "status":"info",
    "desc":"",
    "data": [
        {
            "address": "4eftk98j9h76g5454er5ty8uh3dwec",
            "transaction_id": "gb56yu3txdy237dy2xu8d2983tdxy23dux2873d7yx20d",
            "amount": "0.001",
            "fee": "0",
            "confirmations": "4",
            "date": "2017-01-01 23:32:33"
        }
    ]
    }
Автор
pligin
Скачивания
10
Просмотры
387
Первый выпуск
Обновление
Рейтинг
0,00 звезд Оценок: 0

Другие ресурсы пользователя pligin

Верх