Code:
$amount= (float) number_format($_POST['amount'], 8);
$bitcoin->settxfee(0.0004);
$txid = $bitcoin->sendtoaddress($_POST['sendTo'], $amount);
Doing that when I get txinfo I get a txid and all that but the amount is 0 every time. Same if I used the code like this:
Code:
$amount= $_POST['amount'];
$bitcoin->settxfee(0.0004);
$txid = $bitcoin->sendtoaddress($_POST['sendTo'], (float) $amount);
This is very frustrating as it makes it difficult to test my app. I also hard coded 3.32 for example so it was a float to begin with and still the transaction is sent with a 0 amount. What is going on?
Code:
$bitcoin->settxfee(0.0004);
$txid = $bitcoin->sendtoaddress($_POST['sendTo'], 3.32);
All of them I get a $txid and using $txinfo = gettransaction($txid) I can get the txid using $txinfo['txid'] but $txinfo['amount'] always returns as 0.