Bitcoin Forum
December 08, 2016, 12:14:07 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: instawallet api functionality problem, plz help!  (Read 827 times)
drknow012
Member
**
Offline Offline

Activity: 98


Fairy Tale + Fact = Unregulated Virtual Currency!


View Profile WWW
May 08, 2012, 04:39:04 AM
 #1

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

BTCChess Affiliate Program: Earn 50% on all commissions from referrals at btcchess.tk

Just sign up, post your affiliate link in your sig, and take part in the community's discussions! It's that easy!

Donations and Investors: 1F6yYdQ7rWVaH9Nqv7gbBw5FbZUuhL9smh
1481199247
Hero Member
*
Offline Offline

Posts: 1481199247

View Profile Personal Message (Offline)

Ignore
1481199247
Reply with quote  #2

1481199247
Report to moderator
1481199247
Hero Member
*
Offline Offline

Posts: 1481199247

View Profile Personal Message (Offline)

Ignore
1481199247
Reply with quote  #2

1481199247
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
kangasbros
Hero Member
*****
Offline Offline

Activity: 811



View Profile
May 08, 2012, 06:00:41 AM
 #2

The bitcoin address fails to validate, double-check it.

davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
May 08, 2012, 07:47:53 AM
 #3

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).

drknow012
Member
**
Offline Offline

Activity: 98


Fairy Tale + Fact = Unregulated Virtual Currency!


View Profile WWW
May 08, 2012, 02:33:15 PM
 #4

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

BTCChess Affiliate Program: Earn 50% on all commissions from referrals at btcchess.tk

Just sign up, post your affiliate link in your sig, and take part in the community's discussions! It's that easy!

Donations and Investors: 1F6yYdQ7rWVaH9Nqv7gbBw5FbZUuhL9smh
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!