Код: Выделить всё
{
"notification_id": "..."
"delivery_attempt": 1,
"created_at": 1426104819,
"type": "address",
"data": {
"network": "BTC",
"address": "3cBraN1Q...",
"balance_change": "0.01000000", // net balance change, can be negative
"amount_sent": "0.00000000",
"amount_received": "0.01000000",
"txid": "7af5cf9f2...", // the transaction's identifier (hash)
"confirmations": X, // see below
"is_green": false // was the transaction sent by a green address?
}
}
Код: Выделить всё
require_once 'block.io/block_io.php';
$data = json_decode(file_get_contents('php://input'), true);
$type = $data['type'];
$network = $data['data']['network'];
$address = $data['data']['address'];
$balence_change = $data['data']['balance_change'];
$tx = $data['txid'];
$confirmations = $data['confirmations'];
echo 'Type: ' . $type;
echo 'Network: ' . $network;
echo 'Address: ' . $address;
echo 'Balance change: ' . $balance_change;
echo 'Confirmations: ' . $confirmations;
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/390 ... io-webhook
Мобильная версия