Bitcoin Forum
May 27, 2024, 07:29:02 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sending payments with blockchain API  (Read 1428 times)
coinableS (OP)
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
October 12, 2014, 01:48:01 AM
 #1

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.

coinableS (OP)
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
October 12, 2014, 01:50:29 AM
 #2

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


PotatoPie
Member
**
Offline Offline

Activity: 97
Merit: 10


View Profile
October 12, 2014, 04:53:51 AM
 #3

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?

BTC Address: 13mUzcjYysbgNWstbasJ3PVkPB2nCUEqFg
coinableS (OP)
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
October 12, 2014, 01:49:58 PM
 #4

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)

coinableS (OP)
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
October 13, 2014, 03:47:12 AM
 #5

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.  Huh  I think I'm going to try coinbase API instead

PotatoPie
Member
**
Offline Offline

Activity: 97
Merit: 10


View Profile
October 14, 2014, 09:29:35 AM
 #6

Blockchain may have possibly blocked your IP with godaddy or godaddy may have possibly blocked blockchains IP.

BTC Address: 13mUzcjYysbgNWstbasJ3PVkPB2nCUEqFg
l1za
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
October 15, 2014, 01:00:17 AM
 #7

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?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!