Ich möchte Zahlungen mit der Blockchain Receive Payments API akzeptieren, indem ich verschiedene Benutzeradressen zum Abrufen von Bitcoin erstelle, aber die Callback-API nicht funktioniert
https://blockchain.info/api/api_receive
&& versuchen Sie auch, Adressen für erhaltene und ausgegebene Zahlungen zu überwachen api, aber es funktioniert nicht
Mein Problem ist, dass der Rückruf nie aufgerufen wird – kann jemand meinen Code überprüfen und mir sagen, wo ich das Problem habe?
Ich versuche auch, ein Protokoll zu erstellen, aber nicht angerufen zu werden, und die Callbacl-Protokoll-API mit not call zu überprüfen.
bitte löst mein problem :)
Erstellen Sie die Saldo-Update-API mit dieser Datei 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;
Diese api-Erfolgsantwort in Index-ID, Adresse und Rückruf-URL
zweite Datei 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)========================================');
Es geht nicht um Ihren Code; Es ist von Blockchain.info.
Ich habe gerade eine Transaktion durchgeführt und nie den Rückruf erhalten.
Blockchain.info hat von Zeit zu Zeit immer diese Art von Problemen.
Bitte beachten Sie auch ein Problem mit dem Lückenlimit. Sie können sagen, dass Sie 20 unbenutzte Adressen erstellt haben, und das sind Sie nicht.
Carlo
Ketcode-Info
Willtech
https://my-server.com/callback.php?customer_id=foo&secret=bar
?Ketcode-Info
Sulung Nugroho