News for hackers. Stuff that matters.
Re:How Bitcoin Works by gojomo on Saturday April 16, 2011 @07:55PM (#2455188)
What's the easiest way to accept BTC as payment on the web?

For example, are there drop-in examples for common web-app frameworks? Would it involve the customer cutting & pasting a few long BTC strings between the browser and some separate wallet app?

Would the web-app keep polling a separate Bitcoin service to achieve confirmation/confidence that a payment has gone through?

Re:How Bitcoin Works by weavejester on Saturday April 16, 2011 @11:05PM (#2455463)
The process goes something like this.

1. A user clicks on a link to buy an item

2. Web application generates a new bitcoin address. This can be done by sending a command to the official BitCoin daemon, or by calling a method on the BitCoinJ Java library.

3. The web application asks the user to send a sum of money to the recently generated address. If the user is using the official Bitcoin client, they'd do this by clicking "Send Coins", then copy-pasting the address and the correct amount of money into the dialog box.

4. The web application then either polls the Bitcoin daemon to see if the transaction has come through yet, or sets up an event handler if the web app is using BitcoinJ. The transaction must obviously be sent to the right address with the right amount of bitcoins.

5. When the transaction has come through, you can now deliver the product to the user. If there's no particular hurry, or if the product is high-value, you may want to wait until a certain number of Bitcoin nodes have confirmed the transaction.

As far as I'm aware, there aren't yet any drop-in plugins for common web frameworks, but it wouldn't be hard to make one.

Re:How Bitcoin Works by ericflo on Sunday April 17, 2011 @01:32PM (#2456503)
Does step three involve copy-pasting by design, or can that experience be improved?
Re:How Bitcoin Works by weavejester on Sunday April 17, 2011 @04:07PM (#2456876)
It could be improved with a browser plugin, or perhaps by registering a URL protocol with the browser.

For instance, there could be a link like:

  bitcoin://1MvtfpuCtfDb2EfbevDB1Ep6Z2X1h5nskf?amount=10.00
This could open up your Bitcoin client with the "Send Coins" dialog box open with the address and amount already filled out. Then the user could just hit the "Send" button to confirm the transaction.

However, this is just an example, and nothing like this has been implemented yet to my knowledge.

Re:How Bitcoin Works by mike_esspe on Sunday April 17, 2011 @01:01AM (#2455595)
Currently the easiest way is to use Mtgox's API: https://mtgox.com/merch/about
Re:How Bitcoin Works by thailandstartup on Sunday April 17, 2011 @07:02AM (#2455931)
"We also accept Bitcoin. Please e-mail to arrange payment via this method."