Author

Topic: walletnotify problem (Read 294 times)

legendary
Activity: 1062
Merit: 1020
November 02, 2017, 09:46:30 AM
#4
Thanks, the problem continues


root@ubuntu-2gb-nyc3-01:~/.litecoin# litecoin-cli getblockcount
1305846

root@ubuntu-2gb-nyc3-01:~/.litecoin#  litecoin-cli getreceivedbyaccount LVFRdQkMetYwPWw4Gzh9tjozzz284Da4br
0.00000000

You should try getreceivedbyaddress instead of getreceivedbyaccount which sums the total received amount by an account (collection of bitcoin address). Besides that, make sure the address belongs to the wallet where you set up the walletnotify configuration.
jr. member
Activity: 35
Merit: 10
November 02, 2017, 03:16:31 AM
#3
Thanks, the problem continues


root@ubuntu-2gb-nyc3-01:~/.litecoin# litecoin-cli getblockcount
1305846

root@ubuntu-2gb-nyc3-01:~/.litecoin#  litecoin-cli getreceivedbyaccount LVFRdQkMetYwPWw4Gzh9tjozzz284Da4br
0.00000000
legendary
Activity: 1062
Merit: 1020
November 01, 2017, 04:38:04 PM
#2
Did you sync your Litecoin Wallet fully with the network? It seems not because it would not return zero as account balance when entering the command. Please check using the command getblockcount how many blocks the client has.
jr. member
Activity: 35
Merit: 10
November 01, 2017, 02:04:12 PM
#1
Hello I use API litecoin

https://live.blockcypher.com/ltc/address/LVFRdQkMetYwPWw4Gzh9tjozzz284Da4br/

The amount keeps track of the past;

root@ubuntu-2gb-nyc3-01:~# litecoin-cli getreceivedbyaccount LVFRdQkMetYwPWw4Gzh9tjozzz284Da4br
0.00000000

in addition

litecoin conf
walletnotify=curl http://127.0.0.1:80/walletnotifiy.php?transactionhash=%s


walletnotifiy.php
require_once('easybitcoin.php');
$bitcoin = new Bitcoin("XXX","XXX");
$txid=$_GET['transactionhash'];
$txinfo=$bitcoin->gettransaction($txid);

$amount=$txinfo["amount"];

$newfile= fopen("yazi.txt", "w");
fwrite($newfile, $amount);
fclose($newfile);

?>


no data arrives


Thanks
Jump to: