Send and receive transactions in bitcoin

How to send and receive a transaction using a bitcoin address.
I use this URL .
I only have bitcoin addresses to send and receive.
Also, I don’t have a My Wallet account.

I used below code.

$to = // Bitcoin address1 $from = // Bitcoin address2 $json_url = "https://blockchain.info/merchant/d15dea6639d24b81e5caefad8aa4b0c6831cdccf1c21f8c234fd568d40e4238d/payment?to=$to&amount=5000&from=$from"; 


I got the error below.

 "You must provide a recipient address" 

Thanks to everyone.

+4
source share
2 answers

Just fill out the information below ... You need an account at BlockChain to send payments. You do not need an account to receive, however. It is just a send, not a callback. If you are looking for a callback, read on in the documentation further.

https://blockchain.info/merchant/ $ Help / payment password = $ main_password & amp ;? Second_password = $ second_password & amp; k = $ address & amp; amount = $ amount & amp; from = $ from & amp; common = $ common and amplifier board = $ fee¬e = $ note

 <?php $guid="GUID_HERE"; $firstpassword="PASSWORD_HERE"; $secondpassword="PASSWORD_HERE"; $amounta = "10000000"; $amountb = "400000"; $addressa = "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq"; $addressb = "1ExD2je6UNxL5oSu6iPUhn9Ta7UrN8bjBy"; $recipients = urlencode(json_encode( array( $addressa => $amounta, $addressb => $amountb ) )); $json_url = "https://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; ?> 
+1
source

You need a wallet on blockchain.info to send / receive funds using the "My Wallet API": https://blockchain.info/api/blockchain_wallet_api

If you are going to use this API, I have a PHP class that I use to interact with my blockchain wallet: https://github.com/lukesims/Blockchain-API-PHP-Class You may find this useful.

If you just want to receive payments, use the "Payee API", which is different. I can't post more than two links, but the blockchain section of the blockchain makes a pretty obvious difference between the two.

0
source

All Articles