Title: Instawallet API Post by: hamburger on August 08, 2011, 09:10:28 AM Hi,
Do anyone have an example in PHP to a make a payment with the instawallet API? This is the code that I use and it result in a 404: Not Found instead of the expected response such as {"successful": true, "message": "Sent 0.01 BTC to 14Z1mazY4HfysZyMaKudFr63EwHqQT2njz", "message_code": 0} Code:
More info on the API is available here: https://www.instawallet.org/static/api.html?v=e2406 Thank you, Hamburger Title: Re: Instawallet API Post by: payb.tc on August 08, 2011, 09:15:20 AM have you double-checked the $wallet var to make sure it contains what you expect? (not empty?)
just before your curl, echo or log $url and take a look at exactly how it's been formed. also: it says on that instawallet page that the url you're trying to connect to should be done with a POST. so look at curl options and CURLOPT_POST: curl_setopt($ch, CURLOPT_POST, 1); Title: Re: Instawallet API Post by: payb.tc on August 08, 2011, 09:27:04 AM try this:
Code: $url = "https://www.instawallet.org/api/v1/w/$wallet/payment"; Title: Re: Instawallet API Post by: hamburger on August 08, 2011, 09:39:36 AM Hi,
Post #3 work perfect. Thank you, Hamburger |