Bitcoin Forum
April 19, 2024, 09:19:48 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: Easiest way to accept BTC and test  (Read 3471 times)
jlp (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 264


View Profile
January 09, 2014, 11:16:19 PM
 #1

We are building an online game and planning to enable our players to play for bitcoins.  Therefore, we need to enable players to deposit and withdraw bitcoins.

Which way is the easiest to start accepting bitcoins from users?  Use the bitcoin API call list (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list) or use Blockchain.info's "receive payment API" (http://blockchain.info/api/api_receive)?

On Blockchain.info's page for "receive payment API", it gives a PHP example:  https://github.com/blockchain/receive_payment_php_demo.  The example enables your website to prompt the user to send bitcoins to us, via Blockchain.info.  I like to test this out.  Which way is the best way to test it out?  Send real bitcoins or send testnet bitcoins?

If the best way to test is to use real bitcoins, I'm assuming that we should send one Satoshi (0.00000001 BTC) each time?  But how much transaction or network fee will I have to pay (since it is likely that I'll need to send BTC many times)?

If the best way to test is to use Testnet coins, then how does one use them?  I cannot find good information on how to use them to answer questions such as:  Can we use testnet coins to test out the bitcoin API call list or Blockchain.info's "receive payment API" and their PHP example?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713518388
Hero Member
*
Offline Offline

Posts: 1713518388

View Profile Personal Message (Offline)

Ignore
1713518388
Reply with quote  #2

1713518388
Report to moderator
1713518388
Hero Member
*
Offline Offline

Posts: 1713518388

View Profile Personal Message (Offline)

Ignore
1713518388
Reply with quote  #2

1713518388
Report to moderator
kostagr33k
Full Member
***
Offline Offline

Activity: 309
Merit: 100


View Profile
January 10, 2014, 03:54:35 AM
 #2

Id start looking here:

http://bitcoin.stackexchange.com/questions/4445/is-there-a-blockchain-info-for-testnet


kosta
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
January 11, 2014, 04:39:39 AM
 #3

Use blockchain

Here's a sending example https://bitcointalk.org/index.php?topic=409372.0

I would receive to an armory wallet and manually fill and send hot wallet

jlp (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 264


View Profile
January 11, 2014, 05:25:32 AM
 #4

Use blockchain

Here's a sending example https://bitcointalk.org/index.php?topic=409372.0

I would receive to an armory wallet and manually fill and send hot wallet

Thanks for your reply.  Let me reiterate what you wrote, so I understand you fully.

You gave a sending example, but you are recommending that I do not use it.  Instead, I should "manually fill and send" to my users.  Is that correct?

What is a "hot wallet"?
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
January 11, 2014, 06:07:02 AM
 #5

Use blockchain

Here's a sending example https://bitcointalk.org/index.php?topic=409372.0

I would receive to an armory wallet and manually fill and send hot wallet

Thanks for your reply.  Let me reiterate what you wrote, so I understand you fully.

You gave a sending example, but you are recommending that I do not use it.  Instead, I should "manually fill and send" to my users.  Is that correct?

What is a "hot wallet"?

The example also shows the database going through pending sends. You would modify it to do a dry run to tell you how much to deposit then send for real.

A hot wallet is a wallet your server can send from, eg. The example BUT has funds. Keep it empty until sending.

Also watch out for a hack where they change your deposit address.

Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
January 11, 2014, 09:15:31 AM
 #6

Blockchain.info will not work for small amounts. They only forward payments greater than a certain amount. For a game I imagine small amounts will be the rule rather than the exception?

I suggest using an electrum MPK. See my post here:

https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
January 11, 2014, 09:26:30 AM
 #7

Blockchain.info will not work for small amounts. They only forward payments greater than a certain amount. For a game I imagine small amounts will be the rule rather than the exception?

I suggest using an electrum MPK. See my post here:

https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742

Problem is no callback

Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
January 11, 2014, 09:32:53 AM
 #8

Blockchain.info will not work for small amounts. They only forward payments greater than a certain amount. For a game I imagine small amounts will be the rule rather than the exception?

I suggest using an electrum MPK. See my post here:

https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742

Problem is no callback

If you know python (unfortunately I don't) you can get a callback too. There is a script in the electrum repo

https://github.com/spesmilo/electrum/blob/master/scripts/merchant/merchant.readme
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
January 11, 2014, 11:11:08 AM
 #9

I only know php too

jlp (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 264


View Profile
January 11, 2014, 02:12:55 PM
 #10

Use blockchain

Here's a sending example https://bitcointalk.org/index.php?topic=409372.0

I would receive to an armory wallet and manually fill and send hot wallet

Thanks for your reply.  Let me reiterate what you wrote, so I understand you fully.

You gave a sending example, but you are recommending that I do not use it.  Instead, I should "manually fill and send" to my users.  Is that correct?

What is a "hot wallet"?

The example also shows the database going through pending sends. You would modify it to do a dry run to tell you how much to deposit then send for real.

A hot wallet is a wallet your server can send from, eg. The example BUT has funds. Keep it empty until sending.

Also watch out for a hack where they change your deposit address.

Nevertheless, to start, we may not have that many customers.  Therefore, shouldn't we avoid the send programs?  Shouldn't we send manually whenever a user requests withdrawal?

Do you have any suggestions on how to prevent hacks to change the deposit address?

jlp (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 264


View Profile
January 11, 2014, 05:02:00 PM
 #11

Blockchain.info will not work for small amounts. They only forward payments greater than a certain amount. For a game I imagine small amounts will be the rule rather than the exception?

I suggest using an electrum MPK. See my post here:

https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742

Problem is no callback

If you know python (unfortunately I don't) you can get a callback too. There is a script in the electrum repo

https://github.com/spesmilo/electrum/blob/master/scripts/merchant/merchant.readme


Thanks for your input.  Unfortunately, we do not know Python.
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
January 11, 2014, 05:12:59 PM
 #12

Thanks for your input.  Unfortunately, we do not know Python.

It is possible to use bitcoind then. You can generate addresses using open source php code that I linked to before. To find out about transactions to those addresses you can use bitcoind. Bitcoind has a feature where it runs a command each time it learns of a new transaction. All you have to do is watch for transactions to addresses you've handed out to your customers.
jlp (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 264


View Profile
January 11, 2014, 06:00:08 PM
 #13

It is possible to use bitcoind then. You can generate addresses using open source php code that I linked to before. To find out about transactions to those addresses you can use bitcoind. Bitcoind has a feature where it runs a command each time it learns of a new transaction. All you have to do is watch for transactions to addresses you've handed out to your customers.

Thanks for your input Abdussamad.  Which open source php code did you link to?  Are you referring to the following link that you provided?

https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742

The above link shows PHP code for using Blockchain.info, which I already have and want to test.
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
January 12, 2014, 01:20:22 AM
 #14

Here https://en.bitcoin.it/wiki/PHP_developer_intro

Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
January 12, 2014, 04:42:03 AM
 #15

It is possible to use bitcoind then. You can generate addresses using open source php code that I linked to before. To find out about transactions to those addresses you can use bitcoind. Bitcoind has a feature where it runs a command each time it learns of a new transaction. All you have to do is watch for transactions to addresses you've handed out to your customers.

Thanks for your input Abdussamad.  Which open source php code did you link to?  Are you referring to the following link that you provided?

https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742

The above link shows PHP code for using Blockchain.info, which I already have and want to test.


jlp (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 264


View Profile
January 12, 2014, 04:59:35 AM
 #16

Blockchain.info will not work for small amounts. They only forward payments greater than a certain amount. For a game I imagine small amounts will be the rule rather than the exception?

I suggest using an electrum MPK. See my post here:

https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742

The maximum amount that we will accept as deposit from an user is likely going to be 1 BTC and the minimum amount will be 0.001 BTC.  Is this still too small for Blockchain.info?
jlp (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 264


View Profile
January 12, 2014, 05:11:39 AM
 #17


bitpop:  Thanks for your input.

Your link explains how to use JSON-RPC PHP to call bitcoind.  I assume that bitcoind uses the "bitcoin API call list" (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list).  Does this mean that you think this method is an easier way to accept bitcoin from users than to use Blockchain.info's "receive payment API"?

The benefits of Blockchain.info's "receive payment API" are that we only need to generate one address and can keep our private key offline.  Doesn't this "JSON-RPC PHP calling bitcoind" method imply that my bitcoin wallet will be running on my server?  If so, how do we keep our private keys off of our server?

I run MAMP (Mac Apache MySQL PHP) on my localhost to do development and testing.  I assume that I can run bitcoin in the background on my Mac and have it communicate with JSON-RPC PHP as per https://bitcointalk.org/index.php?topic=21956.0 ?
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
January 12, 2014, 05:44:20 AM
 #18

Blockchain.info will not work for small amounts. They only forward payments greater than a certain amount. For a game I imagine small amounts will be the rule rather than the exception?

I suggest using an electrum MPK. See my post here:

https://bitcointalk.org/index.php?topic=404228.msg4379742#msg4379742

The maximum amount that we will accept as deposit from an user is likely going to be 1 BTC and the minimum amount will be 0.001 BTC.  Is this still too small for Blockchain.info?

You know you really should do your own searching and reading.

Quote
The minimum supported transaction size is 0.001 BTC. Forwarding transactions will include a network fee paid by blockchain.info.
https://blockchain.info/api/api_receive

Make of the above what you will.
bitpop
Legendary
*
Offline Offline

Activity: 2912
Merit: 1060



View Profile WWW
January 12, 2014, 07:09:38 AM
 #19


bitpop:  Thanks for your input.

Your link explains how to use JSON-RPC PHP to call bitcoind.  I assume that bitcoind uses the "bitcoin API call list" (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list).  Does this mean that you think this method is an easier way to accept bitcoin from users than to use Blockchain.info's "receive payment API"?

The benefits of Blockchain.info's "receive payment API" are that we only need to generate one address and can keep our private key offline.  Doesn't this "JSON-RPC PHP calling bitcoind" method imply that my bitcoin wallet will be running on my server?  If so, how do we keep our private keys off of our server?

I run MAMP (Mac Apache MySQL PHP) on my localhost to do development and testing.  I assume that I can run bitcoin in the background on my Mac and have it communicate with JSON-RPC PHP as per https://bitcointalk.org/index.php?topic=21956.0 ?

Yes that will be a hot wallet. But I'd cron it to transfer a certain amount out every hour.

There's nothing stopping you from using coinbase either

jlp (OP)
Sr. Member
****
Offline Offline

Activity: 266
Merit: 264


View Profile
January 12, 2014, 01:17:15 PM
 #20

Quote
The minimum supported transaction size is 0.001 BTC. Forwarding transactions will include a network fee paid by blockchain.info.

I already had searched and looked into this.  I should've posted what I had found, which was the above and the following:

Quote
The minimum size has now been lowered to 0.0005 BTC.
http://www.reddit.com/r/Bitcoin/comments/1r329e/

The comment on reddit casted confusion onto what the real minimum was for Blockchain, hence I asked my question.  Then I thought about it and decided that our minimum should be 0.001 BTC anyways.

Thanks for your help!
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!