Pages:
Author

Topic: Bitcoin API with callback function? - page 2. (Read 9045 times)

jr. member
Activity: 77
Merit: 1
January 16, 2013, 05:35:20 AM
#12
The url.com was just a replacement URL. I have full http://www. on my domain, and the callback tool on their API page works perfectly. It is when the money is payed to that address, the callback is never called. I log any visit (before checking IP), and the url is never called.
legendary
Activity: 952
Merit: 1000
January 16, 2013, 04:36:51 AM
#11
Carlos:
That sounds VERY interesting! Could you provide an example of a URL you send?

I send:
https://blockchain.info/api/receive?method=create&address=1Ccypfi3rnXosUgY6p1sQVXFyddFvwLFEJ&anonymous=false&callback=url.com/callbackhandler.ashx&myid=a0613be5-1c05-47ff-a455-a9f597d61ea5&participant=A

(I've tried several others like this)

Did you need to activate anything?

Error no protocol: url.com/callbackhandler.ashx -> This pretty much says everything.

blockchain.info/api/receive?method=create&address=1Ccypfi3rnXosUgY6p1sQVXFyddFvwLFEJ&anonymous=false&callback=http://url.com/callbackhandler.ashx&myid=a0613be5-1c05-47ff-a455-a9f597d61ea5&participant=A
jr. member
Activity: 77
Merit: 1
January 15, 2013, 05:11:36 PM
#10
Carlos:
That sounds VERY interesting! Could you provide an example of a URL you send?

I send:
https://blockchain.info/api/receive?method=create&address=1Ccypfi3rnXosUgY6p1sQVXFyddFvwLFEJ&anonymous=false&callback=url.com/callbackhandler.ashx&myid=a0613be5-1c05-47ff-a455-a9f597d61ea5&participant=A

(I've tried several others like this)

Did you need to activate anything?
legendary
Activity: 952
Merit: 1000
January 15, 2013, 03:25:37 PM
#9
Carlos L:
Blockchain never make a callback, even though my code should work, and their support doesn't answer.

You're doing something wrong then. I have 3 services using that payment method and all 3 callbacks work fine.
hero member
Activity: 836
Merit: 1030
bits of proof
January 15, 2013, 01:34:02 PM
#8
Grau:
If you implement it fast, you have a customer, and maybe, with quite a lot of volume ;-)
It is done. The bitsofproof node offers a message bus where it sends validated transactions and block chain events to authenticated extensions. It accepts transactions for routing towards the net through the same bus.

The API for extensions includes a call to register a callback as simple as:
Code:
public void registerAccountListener (List addresses, TransactionListener listener);
You will receive validated transactions as properly parsed java objects with all information available on the wire. You will receive transactions receiving OR spending involving that set of addresses.

The caveat with bitsofproof is, that although it works stable it needs to pass yet more tests to call it production quality.

If your decision criteria is fastest production deployment, go for something else for now.
In case you build an enterprise, I guess you will come back Smiley

See the wiki for more: https://github.com/bitsofproof/supernode/wiki
jr. member
Activity: 77
Merit: 1
January 15, 2013, 12:46:36 PM
#7
BitcoinHoarder:
Ok, that code is really simple. Even without understanding python, that's so readable. I will look into it.

Carlos L:
Blockchain never make a callback, even though my code should work, and their support doesn't answer.

Thanks a lot for answers so far Smiley
legendary
Activity: 952
Merit: 1000
January 15, 2013, 09:24:16 AM
#6
I am currently developing several applications for bitcoins, but I have problems with the most vital part: Receiving payments!

I need the following two API calls:
- Generating a bitcoin address, providing a callback, which is called with my custom parameters, when the payment is made
- Sending money to a bitcoin address

I've investigated the following:

Blockchain:
They seem to have the perfect API, but after more than a week of silence in a support case, the API simply doesn't seem to work (the callback part).
Therefore, I am not comfortable with these guys.

http://blockchain.info/api/api_receive

https://github.com/blockchain/receive_payment_php_demo/blob/master/callback.php

Add to line 26 -> || $_SERVER['REMOTE_ADDR'] == '91.203.74.202'
(https://bitcointalksearch.org/topic/--119600)
full member
Activity: 146
Merit: 103
January 15, 2013, 07:41:44 AM
#5
If you are developing several applications for bitcoin I highly recommend you learn the bitcoind API.  It does a lot and works really well.  Why would you want to avoid having a local server?  If you post here you will get help very fast.

I will even get you started with this script that sends money in Python:

Code:
from jsonrpc import ServiceProxy

amount = 0.5050
sendToAddress = "1putanaddressheretosendto"

access = ServiceProxy("http://username:[email protected]:8332")
balance = access.getinfo()["balance"]
print "BALANCE: " + str(balance)
transaction_id = access.sendtoaddress(sendToAddress, amount)
print "TRANSACTION ID: " + transaction_id

How easy is that?  Super easy!
jr. member
Activity: 77
Merit: 1
January 15, 2013, 05:11:36 AM
#4
Grau:
If you implement it fast, you have a customer, and maybe, with quite a lot of volume ;-)

Realpra:
Only issue, seems like I need to learn Python first.. ;-)

Thanks for the answers! I would love to hear other thoughts too.

hero member
Activity: 815
Merit: 1000
January 14, 2013, 03:32:34 PM
#3
As far as I know the Electrum client is open source, since this is a lightweight client you can run it without killing your server easily.

Either it will have an API OR you can modify the code to write out the events you need etc..
hero member
Activity: 836
Merit: 1030
bits of proof
January 14, 2013, 01:56:06 PM
#2
I am currently developing several applications for bitcoins, but I have problems with the most vital part: Receiving payments!

I need the following two API calls:
- Generating a bitcoin address, providing a callback, which is called with my custom parameters, when the payment is made
- Sending money to a bitcoin address

The first is a nice idea, I think about adding this to the bitsofproof API, the second should be trivial with bitcoind RPC or bitcoinj functions.
jr. member
Activity: 77
Merit: 1
January 14, 2013, 01:46:00 PM
#1
I am currently developing several applications for bitcoins, but I have problems with the most vital part: Receiving payments!

I need the following two API calls:
- Generating a bitcoin address, providing a callback, which is called with my custom parameters, when the payment is made
- Sending money to a bitcoin address

I've investigated the following:

Blockchain:
They seem to have the perfect API, but after more than a week of silence in a support case, the API simply doesn't seem to work (the callback part).
Therefore, I am not comfortable with these guys.

Coinbase:
Has a minimum transaction of 0.01BTC and no callback function when sending money.

MtGox:
As I see it, it doesn't look to provide what I need, but different things.

Bitcoin RPC:
If I can avoid having a local server it would be great, plus I've no idea how to program against this API ;-)

I would love ANY ideas!
Pages:
Jump to: