Bitcoin Forum

Bitcoin => Project Development => Topic started by: jza on July 21, 2016, 03:02:22 AM



Title: Automatically catch transactioon made
Post by: jza on July 21, 2016, 03:02:22 AM
I want to know how does a web checkout 'scan' a transaction once the payment wallet is generated, if anyone can share some code regarding this auto-trade of bitcoins.

I would like to know how does ti work on a checkout app on PHP, JS or Python.


Title: Re: Automatically catch transactioon made
Post by: achow101 on July 21, 2016, 03:14:22 AM
Your question is unclear. Are you asking how the merchant knows that he has been paid? If so, it does it the exact same way that every wallet does. It connects to a node (or is a node) and is notified when the node learns of a transaction which spends to the addresses it is watching for.


Title: Re: Automatically catch transactioon made
Post by: Ned Kelly on July 21, 2016, 03:16:54 AM
If I understood you right. You can use getrawmempool in Bitcoin core.
It also has api with json response, so should be easily implemented with python or any other language.


Title: Re: Automatically catch transactioon made
Post by: jza on July 21, 2016, 05:58:05 AM
I get the way to do this with a local bitcoin node, using the wallet as a daemon, I dont really know if there is a blockchain-less (or SPV) development library that can just connec tto a remote blockchain and perform the scanning and such.


Title: Re: Automatically catch transactioon made
Post by: amaclin on July 21, 2016, 08:43:37 PM
https://github.com/sebicas/bitcoin-sniffer