Hi,
I am writing a php code to process bitcoin withdrawal. I want the recipient to bear the transaction fees of all the withdrawals. I came to know that i have to use the command "subtractfeefromamount".
I saw that i have to run the following command:
sendtoaddress "bitcoinaddress" amount ( "comment" "comment-to" subtractfeefromamount )
Please tell me how do write the above code in php to process the transaction..
I currently have the below code to process transaction:
$amount1=(double)$_POST['amount_w1'];
$wind = $bitcoin->sendtoaddress($address,$amount1);
Please tell me how do i include subtractfeefromamount in the above code?
if (isset($_POST["addr"]) && isset($_POST["amount"]) && isset($_POST["fee"]))
{
$wind = $bitcoin->sendtoaddress($_POST["addr"], (double)$_POST["amount"], (double)$_POST["fee"])
}
Maybe something like this? I can't tell it without seeing the class.