2

I'm trying to get deposits sent to my website to show up in the users balance, inside my bitcoin.conf I have:

walletnotify='http://localhost/blocknotify-update-deposit?trxhash='%s

This is not showing up the users deposited balances however if I put the same line in my url bar the balances show up straight away.

What have I missed from the bitcoin.conf? The person I bought the application from has not been much help regarding the bitcoin integration and I'm learning as I go myself here.

Nick ODell
  • 29,396
  • 11
  • 72
  • 130

1 Answers1

3

walletnotify takes the supplied string and runs it as a command. If you want to make it request a URL, you should pass the URL to a command that can do that.

On linux:

walletnotify=curl 'http://localhost/blocknotify-update-deposit?trxhash='%s

If there's an error while running the command, Bitcoin will append a message to debug.log. It should look like this:

runCommand error: system(curl http://...) returned 3
Nick ODell
  • 29,396
  • 11
  • 72
  • 130
  • Is the apostrophe needed/recommended? I'm wondering because I've always done mine the same way minus the apostrophe walletnotify= curl http://yourdomain.com/newdeposit.php?tx=%s – m1xolyd1an Jul 31 '16 at 01:06
  • @m1xolyd1an Dunno. To be perfectly honest, I just copied the URL from the OP. – Nick ODell Jul 31 '16 at 05:22