Author

Topic: Blockchain Receive API v2 Callback Logs (Read 370 times)

newbie
Activity: 6
Merit: 0
November 11, 2017, 05: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...
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
October 26, 2017, 05: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.
newbie
Activity: 6
Merit: 0
October 26, 2017, 04: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.
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
October 26, 2017, 12: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
newbie
Activity: 6
Merit: 0
October 26, 2017, 10:13:04 AM
#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
legendary
Activity: 3122
Merit: 2178
Playgram - The Telegram Casino
October 26, 2017, 08:25:22 AM
#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;
newbie
Activity: 6
Merit: 0
October 26, 2017, 03:38:46 AM
#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);
Jump to: