Author

Topic: instawallet api functionality problem, plz help! (Read 1038 times)

member
Activity: 98
Merit: 10
Fairy Tale + Fact = Unregulated Virtual Currency!
i don't know how i did it, but it works now. i guess there was a space in the address input form that i didn't know about. Roll Eyes
legendary
Activity: 1372
Merit: 1007
1davout
Your address failed to validate against the Bitcoin client.

Also your amount is wrong, it must be an integer value expressed in Satoshis. If you want to send 0.01 BTC you must send 0.01 * 10^8 (1000000).
hero member
Activity: 812
Merit: 1006
The bitcoin address fails to validate, double-check it.
member
Activity: 98
Merit: 10
Fairy Tale + Fact = Unregulated Virtual Currency!
i'm using instawallet.org's api using php, and all the other stuff works. creating wallets, getting address from wallet id, and checking wallet balance... but sending payment has not gone too well. here's the script i use to send payments using the api:

Quote
$wallet = $tmpLabelData['labelID'];
$address = $_POST['addr'];
$ammount = "0.01";

$url = "https://www.instawallet.org/api/v1/w/$wallet/payment";
$postdata=array('address'=>$address,'amount'=>$amount);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_USERAGENT, 'Opera/9.23 (Windows NT 5.1; U; en)');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
$result = curl_exec($ch);
exec('echo  "'.$result.'" > send_btc');

and here's the log for the error that occurs
Quote
{"successful":false,"message":"Sorry, this does not look like a valid Bitcoin address.","message_code":4}

help preez Sad
Jump to: