Author

Topic: Callback on receive payment (Read 1585 times)

newbie
Activity: 6
Merit: 0
October 24, 2014, 06:02:18 PM
#9
I am working currently on something similar.

My setup consists of one background daemon that monitors the bitcoin network and reacts to incoming transactions. If a transaction matches a given pattern, it is published to a Redis PubSub channel. On the other end a NodeJS application gets the message and forwards it to all connected clients (via socket.io). By using Redis publish/subscribe, it is possible to extend that approach with any notification mechanism, e.g. e-mail, mobile push notifications, SMS, you name it.
newbie
Activity: 7
Merit: 0
October 23, 2014, 11:25:14 PM
#8
Hi,
i had alot of problems with this Bitcoin API too, specialy the callback URL
after 2 nights of Headaches,i finaly found the problem :p
this is a DEMO, who is interesting to integrate this LOVELY API on his website he can "Check before Buy" here is the link : http://ex-currency.com/btc/index.php
Payment Sent/Recieved/Confirmed IMMEDIATLY
the price of curiosity is 1 USD
legendary
Activity: 2058
Merit: 1431
June 01, 2013, 04:50:38 PM
#7
Thanks, I did a lot of reading up and it looks like its what I'm after. I'm surprised that there are no pre-written classes to handle this as its something that almost every bitcoin retailer would find useful. The closest I've found is:

https://github.com/hostvpn/whmcs-coinbase-bitcoin/blob/master/modules/gateways/callbacks/coinbase.php

If anyone else out there has written a few functions / classes to handle this then I'd love to see it.
Considering it's a new feature, there aren't going to be prewriten classes for it.

The description says "Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)". So I would imagine you set the command to a .php/.pl/.py/.sh script that fetches the full transaction info and updates your database.
donator
Activity: 848
Merit: 1078
June 01, 2013, 08:32:51 AM
#6
In what way are you finding notifications from blockchain unreliable? The speed of forwarding payments or the notifications each new block?

Hey piuk,

Yeah, that was a major issue a few weeks back but even since your fix it still seems to happen sporadically.

Two other issues as well. It appears that the callback url isn't called consistently... Also the logs tell me that my site is returning 'Invalid Server Response'. I'm certain that my response is developed corectly (to not echo anything until 6 confs, then return *ok*)

I will PM you two callback URL's you can check the logs to see what I'm talking about.

Is the server load balanced or traffic throttled in any way? Maybe there are too many outbound/inbound connections? Just thinking out aloud...
hero member
Activity: 910
Merit: 1005
June 01, 2013, 06:10:37 AM
#5
In what way are you finding notifications from blockchain unreliable? The speed of forwarding payments or the notifications each new block?
donator
Activity: 848
Merit: 1078
June 01, 2013, 04:58:50 AM
#4
it's in 0.8.2
Quote
Command-line options
--------------------

* -walletnotify will call a command on receiving transactions that affect the wallet.

Thanks, I did a lot of reading up and it looks like its what I'm after. I'm surprised that there are no pre-written classes to handle this as its something that almost every bitcoin retailer would find useful. The closest I've found is:

https://github.com/hostvpn/whmcs-coinbase-bitcoin/blob/master/modules/gateways/callbacks/coinbase.php

If anyone else out there has written a few functions / classes to handle this then I'd love to see it.
legendary
Activity: 2058
Merit: 1431
May 31, 2013, 09:42:31 PM
#3
it's in 0.8.2
Quote
Command-line options
--------------------

* -walletnotify will call a command on receiving transactions that affect the wallet.
donator
Activity: 848
Merit: 1078
May 31, 2013, 09:16:42 PM
#2
Anybody?

Coinbase also offers the same functionality: https://coinbase.com/docs/merchant_tools/callbacks
donator
Activity: 848
Merit: 1078
May 31, 2013, 10:19:40 AM
#1
I'm in the process of setting up a receive payment server that can make calls when a payment is received.

Essentially I'd like to emulate the behaviour of instant payment notifications as seen on btc-e with live updating confirmations.

Blockchain.info provides something similar (which I'm using at the moment) but their service is unreliable: https://blockchain.info/api/api_receive
Jump to: