Closed ParadoxalManiak closed 7 years ago
we have tests running (and passing) subscribeAddressTransactions
,
can you paste the snippet of code that you're using? and maybe your webhook indentifier?
if you wanna continue in private then you can also mail support@blocktrail.com
I'm getting this error
{"error":{"type":"Blocktrail\\SDK\\Connection\\Exceptions\\ObjectNotFound","message":"The object you've tried to access does not exist.","file":"\/var\/www\/vendor\/blocktrail\/blocktrail-sdk\/src\/Connection\/RestClient.php","line":336}}
And this is the code I'm using to test the SDK. The phpunit tests are passing but I cannot get this to work. Also is this the only way to make sure that the payment is good ? Checking the webhook event after payment ?
$client = new \Blocktrail\SDK\BlocktrailSDK($blockPay['key'], $blockPay['secret'], "BTC", true);
$wallet = $client->initWallet($blockPay['wallet'], $blockPay['walletPassword']);
$address = $wallet->getNewAddress();
$webhookId = rand('999', '99999999');
$wallet->setupWebhook($reqUrl, $webhookId);
var_dump($client->subscribeAddressTransactions($webhookId, $address, $dbConfig['pay_btc_confirmations']));
wallet webhooks automatically get all past and future generated addresses added to them, that's why it's not possible to manually add any addresses to them.
So what I should do ? How else I can get the events from only one address at a time ? I want to verify the payment from a user and make sure that they paid a certain amount, is there any other way to do this ?
L.E: I've managed to make it work. I should've used the SDK client instead of the wallet class to create a new empty webhook so I can subscribe only the generated address.
I have setup the webhook and when surprisingly when I test it I got an error that says:
Error: Sorry, no new webhooks can be created at this time.
This left me confused. I am using the testnet version of the api. What could be the way out. Kindly help.
Thanks.
Hi, We no longer provide Webhooks service. Apologies for the inconveniences. https://github.com/blocktrail/blocktrail-sdk-php/issues/134
I'm currently testing this SDK to see if it will fit for my next project but it seems that the
subscribeAddressTransactions
function is not working.Every time I'm calling it I get this message
The object you've tried to access does not exist.
and I know for sure that theBTC Address
and theWebhook Identifier
have been created before the call and are valid.