-2

I want to transfer bitcoin through bitcoin address in PHP please share the proper link.

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

Priya
  • 1
  • 1
  • 4
  • 1
    What are you having trouble with? What have you tried? – Lolmewn May 05 '17 at 08:14
  • i tried below link code " First Application with the Coinbase API " https://www.sitepoint.com/bitcoin-php-coinbases-api-demo-app/ – Priya May 05 '17 at 08:45
  • have you any idea how to use below link in php https://www.sitepoint.com/bitcoin-php-coinbases-api-basic-usage/ i did run composer update command and got folder but i am not understand how to use folder in php – Priya May 05 '17 at 08:48

2 Answers2

0

Try This code for transfer btc

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

Hope it will work :

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

Harsh Panchal
  • 308
  • 1
  • 8
-1

Here the code for php please have a look

<?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;
    ?>
  • what is $guid and how can i get – Priya May 05 '17 at 08:51
  • is the second password compulsory – Priya May 05 '17 at 08:52
  • How to use this url on live -> Create Wallet API Create blockchain wallets programmatically The create_wallet method can be used to create a new blockchain.info bitcoin wallet. URL: http://localhost:3000/api/v2/create Method: POST or GET – Priya May 05 '17 at 09:40