Bitcoin Forum
May 13, 2024, 04:38:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Blockchain Receive API v2 Callback Logs  (Read 347 times)
hellobtcon (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
October 26, 2017, 08:38:46 AM
Last edit: October 26, 2017, 08:51:08 AM by hellobtcon
 #1

Hello!
Please help me to see my callback logs because it's becoming a real problem for me.
I tried to do as described in API documentation (https://blockchain.info/api/api_receive) but i got no result.


This is how I generate new Address:
Code:
$blockchain_root = "https://blockchain.info/";
$blockchain_receive_root = "https://api.blockchain.info/";
$mysite_root = "http://my-site.com/";
$secret = "testSecret";
$my_api_key = "testKey";


$user_id = 1111;
$callback_url = $mysite_root . "receive_api.php?user_id=" . $user_id . "&secret=" . $secret;

$my_xpub = "TestXpub";
$resp = file_get_contents($blockchain_receive_root . "v2/receive?key=" . $my_api_key . "&callback=" . urlencode($callback_url) . "&xpub=" . $my_xpub);

 $response = json_decode($resp);
 $address = $response->address;


And here is how I try to get callback logs:
Code:
$mysite_root = "http://my-site.com/";
$secret = "testSecret";
$my_api_key = "testKey";
$user_id = 1111;
$callback_url = $mysite_root . "receive_api.php?user_id=" . $user_id . "&secret=" . $secret;

$resp = file_get_contents($blockchain_receive_root . "v2/receive/callback_log?callback=" . urlencode($callback_url) . "&key=" . $my_api_key);

 echo $response = json_decode($resp);
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
October 26, 2017, 01:25:22 PM
 #2

What's the output when directly echoing the get_file_contents result without trying to parse it through json_decode?

Meaning:

Code:
$resp = file_get_contents($blockchain_receive_root . "v2/receive/callback_log?callback=" . urlencode($callback_url) . "&key=" . $my_api_key);

echo $resp;

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hellobtcon (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
October 26, 2017, 03:13:04 PM
 #3

What's the output when directly echoing the get_file_contents result without trying to parse it through json_decode?

Meaning:

Code:
$resp = file_get_contents($blockchain_receive_root . "v2/receive/callback_log?callback=" . urlencode($callback_url) . "&key=" . $my_api_key);

echo $resp;

Nothing at all
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
October 26, 2017, 05:56:37 PM
 #4

What's the output when directly echoing the get_file_contents result without trying to parse it through json_decode?

Meaning:

Code:
$resp = file_get_contents($blockchain_receive_root . "v2/receive/callback_log?callback=" . urlencode($callback_url) . "&key=" . $my_api_key);

echo $resp;

Nothing at all

Do you get an output if you try accessing other URLs? For example:

Code:
$resp = file_get_contents("http://www.google.com/");

echo $resp;


Are you running the script on a local server? If yes, maybe it's your firewall.

Is allow_url_fopen enabled in your php.ini file? See here: http://php.net/manual/en/filesystem.configuration.php

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hellobtcon (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
October 26, 2017, 09:33:37 PM
 #5

What's the output when directly echoing the get_file_contents result without trying to parse it through json_decode?

Meaning:

Code:
$resp = file_get_contents($blockchain_receive_root . "v2/receive/callback_log?callback=" . urlencode($callback_url) . "&key=" . $my_api_key);

echo $resp;

Nothing at all

Do you get an output if you try accessing other URLs? For example:

Code:
$resp = file_get_contents("http://www.google.com/");

echo $resp;


Are you running the script on a local server? If yes, maybe it's your firewall.

Is allow_url_fopen enabled in your php.ini file? See here: http://php.net/manual/en/filesystem.configuration.php

Everything works when I generate new address. And no output at all when I try to get callback Logs.
HeRetiK
Legendary
*
Offline Offline

Activity: 2926
Merit: 2091


Cashback 15%


View Profile
October 26, 2017, 10:58:05 PM
 #6

Everything works when I generate new address. And no output at all when I try to get callback Logs.

Have you tried echoing the callback_log URL and visiting the link with your browser directly?

Code:
echo $blockchain_receive_root . "v2/receive/callback_log?callback=" . urlencode($callback_url) . "&key=" . $my_api_key;

Maybe the response by blockchain's server is indeed empty and the problem lies somewhere else.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hellobtcon (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
November 11, 2017, 10:05:31 AM
 #7

Everything works when I generate new address. And no output at all when I try to get callback Logs.

Have you tried echoing the callback_log URL and visiting the link with your browser directly?

Code:
echo $blockchain_receive_root . "v2/receive/callback_log?callback=" . urlencode($callback_url) . "&key=" . $my_api_key;

Maybe the response by blockchain's server is indeed empty and the problem lies somewhere else.

I tried, the answer is:
{}

like nothing at all

Blockchain support said that they don't know what's the problem.
My another website has the same problem...
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!