Hey guys, so im trying to use the sendmany command via the jsonRPCClient.php script, however it keeps failing. Iv tried running the same command through the command line, but I keep getting a JSON parsing error:
# bitcoind sendmany "Main Account" {"1GawMPab9B7Bbt5FXPVDbHt6T2NrfH2EgC":0.0001}
error: Error parsing JSON:{1GawMPab9B7Bbt5FXPVDbHt6T2NrfH2EgC:0.0001}
iv tried wrapping the command in tripple quotes as well (read it on some other posts with similar problems), but it seems to change nothing.
As for the PHP end, here is the code I have:
$senders = array();
foreach($getPayouts as $payout){
if(!isset($senders[$payout['address']])){
$senders[$payout['address']] = floatval($payout['amount']);
}
else{
$senders[$payout['address']] += floatval($payout['amount']);
}
}
try{
$payoutMoney = $bitcoin->sendmany("Main Account", json_encode($senders));
}
catch(Exception $e){
return false;
}
this section of code also fails, and gives me a bunch of failed http request errors.
Anyone have any ideas? Im pretty sure im formatting the queries correctly.. but I feel like theres something simple im missing here