Bitcoin Forum
July 28, 2017, 03:15:02 PM *
News: BIP91 seems stable: there's probably only slightly increased risk of confirmations disappearing. You should still prepare for Aug 1.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: instawallet api functionality problem, plz help!  (Read 882 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
1501254902
Hero Member
*
Offline Offline

Posts: 1501254902

View Profile Personal Message (Offline)

Ignore
1501254902
Reply with quote  #2

1501254902
Report to moderator
1501254902
Hero Member
*
Offline Offline

Posts: 1501254902

View Profile Personal Message (Offline)

Ignore
1501254902
Reply with quote  #2

1501254902
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: 812



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

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

davout
Legendary
*
Offline Offline

Activity: 1372


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!