Blockchain Receive Callback API in callback url not working

0

1

I want to accept payments with the Blockchain Receive Payments API Using create different user different address on get bitcoin but not work Callback api

https://blockchain.info/api/api_receive

&& also try Monitor addresses for received and spent payments api but not work

My problem is, the callback is never called— can anyone check my code and tell me where I the problem is?

i also try to log create but not called and check callbacl log api using not call.

please solved my problem :)

create balance update api using this file create.php

$url = "https://api.blockchain.info/v2/receive/balance_update";
    $secret = $address;
    $post_data = array(
        "key"           => $this->API_KEYCODE,
        "addr"          => $address,
        "callback"      => "https://my-server.com/callback.php?customer_id=".$user_id."&secret=".$secret,
        "onNotification"=> "KEEP",
        "op"            => "RECEIVE",
        "confs"         => $conf
    );

    Log::info('START SERVICE CALL :' . json_encode($url). " : ".json_encode($post_data));
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, count($post_data));
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data));
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HTTPHEADER , array(
        "cache-control: no-cache",
        "content-type: text/plain",
    ));
    $ccc = curl_exec($ch);
    curl_close ($ch);

    Log::info('END SERVICE CALL :' . $ccc);
    $json = json_decode($ccc, true);
    return $json;

this api successful return response in index id , address and callback url

second file callback.php

Log::info('TEST : START (BLOCKCHAIN Callback)========================================');
    Log::info('GET : '.jsone_encode($request));
    Log::info('GET : '.jsone_encode($_GET));
    $res = 'Nothing';

    $out_address = $_GET['secret'];
    $in_address = $_GET['address'];
    $user_id = $_GET['customer_id'];

    $transaction_hash = $_GET['transaction_hash'];
    $confirmations = $_GET['confirmations'];
    $value_in_satoshi = $_GET['value'];
    $value_in_btc = $value_in_satoshi / 100000000;

    $status = true;

    if($status == true) {

                $res = "*ok*";
        } else {
            //Waiting for confirmations


            $res = "Waiting for confirmations";
        }
    }
    Log::info('RES : '.$res);
    Log::info('TEST : END (BLOCKCHAIN Callback)========================================');

Ketcode info

Posted 2018-02-01T11:58:42.203

Reputation: 1

Where is your code?Carlo 2018-02-01T12:01:10.567

i call balance update api and success response return but not callback my url call any log and callback_log api thought check not callbackKetcode info 2018-02-01T12:12:24.677

I presume you have checked your callback address is responding on outside requests? Can you make a manual callback test if you try just key https://my-server.com/callback.php?customer_id=foo&secret=bar?Willtech 2018-02-01T12:41:34.567

yes i also try manual is work and create log and i try to callback log api in check also blank array responseKetcode info 2018-02-02T03:58:34.973

Callback is not really working. But you can use blockchain web socket alternatively.Sulung Nugroho 2018-11-16T23:41:00.393

Answers

0

It's not about your code; it's from Blockchain.info.

I've made a transaction right now and never received the callback.

Blockchain.info always has these types of issues from time to time.

Please aware an issue with gap limit also. They may say that you've created 20 unused addresses and you're not.

Adam

Posted 2018-02-01T11:58:42.203

Reputation: 3 215

Yes We check Callback API But, Every time we get blank(null) response in the callback log.Ketcode info 2018-02-02T04:05:01.057

you have any idea for the other bitcoin send and receive api provider?Ketcode info 2018-02-02T04:06:08.047

block.io would be an alternative, but it sucks as hell since you should pay for each generated address.

Soon we will launch wallet my team, and I was working on for a long time. You can receive LTC, BTC, BCH. No gap limit and many other features, not any other wallet have. – Adam 2018-02-02T04:16:45.023