What is the right way to accept bitcoin payments using bitcoind?
You should check out walletnotify: everytime a transaction hits your wallet it will fire a command or script off.


  Walletnotify will run a shell command everytime something changes in your wallet.


I like this repo.