Can someone help me understand why the send BTC blockchain api isn't working for me?
Nothing happens. The only errors I get is when I try to call the array for transaction id and it indicates nothing exists.
<?php
$guid="removed for obvious reasons";
$main_password="removed for obvious reasons";
$amount= "10000";
$address = "1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd"; // seans outpost
$from = "1B95ndjwJG8VtiHVfoVHJwhUZ62VpnCxvr"; // a test wallet with a little BTC in it
$fee = "10000";
$note = "Donating to seansoutpost";
function makeDonation($url){
$decode = file_get_contents($url);
return json_decode($decode, true);
}
$donateURL = makeDonation('https://blockchain.info/merchant/$guid/payment?password=$main_password&to=$address&amount=$amount&from=$from&fee=$fee¬e=$note');
$donateMsg = $donateURL["tx_hash"];
echo "Success transaction ID " .$donateMsg;
?>
I changed the json part a little and I took out the second password since I don't have a second password.
No idea what I'm missing here...
I'm working off of this:
https://blockchain.info/api/blockchain_wallet_apiNote there's an error on their list of variables. They list $to but there is no $to, it's $address according to their url.