2017-05-05 61 views
-2

我想通過PHP中的比特幣地址轉移比特幣,請分享正確的鏈接。如何在PHP中將coinbase api集成到轉移bitcoine中

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

+1

你有什麼麻煩?你有什麼嘗試? – Lolmewn

+0

我嘗試了下面的鏈接代碼「第一個應用程序與Coinbase API」https://www.sitepoint.com/bitcoin-php-coinbases-api-demo-app/ – Priya

+0

你有什麼想法如何使用下面的鏈接在PHP https: //www.sitepoint.com/bitcoin-php-coinbases-api-basic-usage/我運行了作曲家更新命令並得到了文件夾,但我不明白如何在php中使用文件夾 – Priya

回答

0

這裏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

什麼是$ guid,我怎樣才能獲得 – Priya

+0

是第二個密碼強制 – Priya

+0

你需要通過這個https://blockchain.info/api/blockchain_wallet_api –

1

嘗試這個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

相關問題