Bitcoin Forum

Economy => Service Discussion => Topic started by: coinableS on October 12, 2014, 01:48:01 AM



Title: Sending payments with blockchain API
Post by: coinableS on October 12, 2014, 01:48:01 AM
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.

Code:
<?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($decodetrue);
}

$donateURL makeDonation('https://blockchain.info/merchant/$guid/payment?password=$main_password&to=$address&amount=$amount&from=$from&fee=$fee&note=$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_api

Note there's an error on their list of variables. They list $to but there is no $to, it's $address according to their url.


Title: Re: Sending payments with blockchain API
Post by: coinableS on October 12, 2014, 01:50:29 AM
Oh yea
I even tried something super simple such as getting a balance and I'm getting no response. Do I have to get whitelisted to use their API?

Code:
Fetching the wallet balance

Fetch the balance of a wallet. This should be used as an estimate only and will include unconfirmed transactions and possibly double spends.

https://blockchain.info/merchant/$guid/balance?password=$main_password



Title: Re: Sending payments with blockchain API
Post by: PotatoPie on October 12, 2014, 04:53:51 AM
Oh yea
I even tried something super simple such as getting a balance and I'm getting no response. Do I have to get whitelisted to use their API?

Code:
Fetching the wallet balance

Fetch the balance of a wallet. This should be used as an estimate only and will include unconfirmed transactions and possibly double spends.

https://blockchain.info/merchant/$guid/balance?password=$main_password



It's probably something on your side, I didn't have to when I set the API up on my VPS. Are you trying this on a shared host?


Title: Re: Sending payments with blockchain API
Post by: coinableS on October 12, 2014, 01:49:58 PM
Oh yea
I even tried something super simple such as getting a balance and I'm getting no response. Do I have to get whitelisted to use their API?

Code:
Fetching the wallet balance

Fetch the balance of a wallet. This should be used as an estimate only and will include unconfirmed transactions and possibly double spends.

https://blockchain.info/merchant/$guid/balance?password=$main_password



It's probably something on your side, I didn't have to when I set the API up on my VPS. Are you trying this on a shared host?

I'm using my web server, it's hossted similar to godaddy. I pay monthly it has been a decent service, been using them for ~10 years.
I have no issues calling the buy/sell APIs from bitstamp and btc-e, finex. This is the first time I've tried blockchain API...

I found an example on stackexchange as well and even that won't work...
I'm starting to think I need to request an API code (https://blockchain.info/api/api_create_code)


Title: Re: Sending payments with blockchain API
Post by: coinableS on October 13, 2014, 03:47:12 AM
Ok I requested and received my API key. Still I get nothing when I run it. No errors, just a blank page.
Not sure why I can't figure this out.  ???  I think I'm going to try coinbase API instead


Title: Re: Sending payments with blockchain API
Post by: PotatoPie on October 14, 2014, 09:29:35 AM
Blockchain may have possibly blocked your IP with godaddy or godaddy may have possibly blocked blockchains IP.


Title: Re: Sending payments with blockchain API
Post by: l1za on October 15, 2014, 01:00:17 AM
Blockchain may have possibly blocked your IP with godaddy or godaddy may have possibly blocked blockchains IP.

How can one unblock your bitstamp account? Should we call customer support?