我正在尝试在收到btc时运行回调,但显示错误,请帮助。
<?php
$secret = 'secret12345';
$my_xpub = 'xpub6CtBowk1kyogwVsfyi92C8HkcyemJ4jYaaXEbXbF15KeTyyihkjhkpUpgmN2TtmDiyPoF
6T4epFg1pEYpeF76jn7FY3kK5NEF5JUvyWJrb';
$my_api_key = '48d3798792-047e-4870-96c6-d15a798890a9404';
$my_callback_url = 'https://mystore.com?
invoice_id=058921123&secret=' . $secret;
$root_url = 'https://api.blockchain.info/v2/receive';
$parameters = 'xpub=' . $my_xpub . '&callback=' . urlencode($my_callback_url) . '&key=' . $my_api_key;
$response = file_get_contents($root_url . '?' . $parameters);
$object = json_decode($response);
echo 'Send Payment To : ' . $object->address;
?>