Биткойн — как интегрировать api-монеты в php для перевода биткойна

Я хочу перевести биткойн через биткойн-адрес в PHP, пожалуйста, поделитесь соответствующей ссылкой.

https://developers.coinbase.com/docs/merchants/payment-buttons

-2

Решение

Попробуйте этот код для перевода BTC

$transaction = Transaction::send();
$transaction->setToBitcoinAddress('here btc address to transfer');
$transaction->setAmount(new Money(0.0010, CurrencyCode::BTC));
$transaction->setDescription('this is optional');

Надеюсь, это сработает:

https://github.com/coinbase/coinbase-php

1

Другие решения

Вот код для php
пожалуйста, посмотрите

<?php
$guid = "GUID_HERE";
$firstpassword = "PASSWORD_HERE";
$secondpassword = "PASSWORD_HERE";
$amounta = "10000000";
$amountb = "400000";
$addressa = "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq";
$addressb = "1ExD2je6UNxL5oSu6iPUhn9Ta7UrN8bjBy";
$recipients = urlencode('{
"' . $addressa . '": ' . $amounta . ',
"' . $addressb . '": ' . $amountb . '
}');

$json_url = "http://blockchain.info/merchant/$guid/sendmany?password=$firstpassword&second_password=$secondpassword&recipients=$recipients";

$json_data = file_get_contents($json_url);

$json_feed = json_decode($json_data);

$message = $json_feed->message;
$txid = $json_feed->tx_hash;
?>
0

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector