Post
Topic
Board Service Discussion
Re: Blockchain.info API confirmation is so long ?
by
mad68
on 28/03/2013, 18:09:49 UTC
i had a problem wherei got 1 callback as soon as they sent payment but never again. I found a way around this tho.

i made a php page that gets any waiting confirmation from the database and calls "http://blockchain.info/q/getreceivedbyaddress/{$addressTheyPaid}&confirmations=6"

this will return 0 until 6 confirmations have happened (assuming its not a shared address)

so
if file_get_contents($url) == "0")
// not confirmed
else
// confirmed

i curl this in a cron job every 10 minutes.

hope this helps

Ho yes, I understand what you did there, this is some sort of solution.

I don't know if a blockchain.info API dev will read this but, wouldn't this be a good thing :
Currently, the callback attempts are made when the second transaction (from Receiving Address to Final Address) gets confirmations right ? But this can take up to 24 hours since that transaction has 0 fees.
And the first transaction (From Customer Address to Receiving Address) is confirmed more often since the customer will include fees to his transaction (if he actually does).
So why the callback attempts are not made when the first transaction gets confirmation ?
Am I clear ?  Undecided