dashed-slug.net › Forums › Full Node Multi Coin Adapter extension support › Deposit notification not working for Bitcoin wallet › Reply To: Deposit notification not working for Bitcoin wallet
Hello,
OK, sounds like you’re already half way there.
You should now check to see if the walletnotify command works:
Let’s say user 1 has BTC address 1SOMEADDRESS
. And let’s say also you have sent a deposit to that address, with a TXID of 0123456789ABCDEF
. Finally, let’s say your site’s hostname is example.com
.
You can check to see if the transaction is known by your wallet, by issuing the following shell command in the machine where the wallet is running:
bitcoin-cli gettransaction 01234567890ABCDEF
You should see the transaction data in JSON form. If not, then the wallet may not be fully synced yet.
To notify the plugin about this transaction, the notification URL would be:
https://www.example.com/wallets/api3/notify/BTC/wallet/01234567890ABCDEF
When you visit this URL in your browser, the plugin should now go ask the wallet about that transaction. If the transaction is found, the plugin will create a deposit for this user. The deposit will be shown in the admin screens in “Wallets” -> “Transactions”. You will get a {"result":"success"}
even if the transaction is not found.
Once you determine that the transaction is known by the wallet, and that the above notify URL creates the deposit in the plugin, then it’s time to check the automation of the above:
You should be able to achieve the same effect by issuing the following curl command:
curl -k https://www.example.com/wallets/api3/notify/BTC/wallet/01234567890ABCDEF
If you get command not found
, you must install curl. If you get some other error, let me know.
Once you determine that this works, finally it’s time to set the walletnotify argument in your bitcoin.conf
file:
walletnotify=curl -sk https://www.example.com/wallets/api3/notify/BTC/wallet/%s >/dev/null
(The %s
part is replaced with the TXID by the bitcoin wallet).
Check the above and let me know how far you got.
with regards