简体   繁体   English

具有相同地址的区块链接收 API

[英]Blockchain receive API with same address

I need to accept bitcoins on my website (PHP).我需要在我的网站 (PHP) 上接受比特币。 I'm using blockchain and i have read the api: https://blockchain.info/api/api_receive Is quite simple but i have some questions, but first i will try to explain what i need.我正在使用区块链并且我已经阅读了 api: https : //blockchain.info/api/api_receive很简单,但我有一些问题,但首先我会尝试解释我需要什么。

  • Client send bitcoins to my wallet (Any amount they want)客户将比特币发送到我的钱包(他们想要的任何数量)
  • Server will be notified with confirmations until gets OK.服务器将收到确认通知,直到确定为止。
  • Gets the sent amount and client wallet from callback and store in DB.从回调中获取发送的金额和客户端钱包并存储在数据库中。

Now my questions:现在我的问题:

  1. "You provide a bitcoin address we generate unique addresses that forwards payments to that address instantly notifying a callback URL." “您提供一个比特币地址,我们会生成唯一地址,将付款转发到该地址,并立即通知回调 URL。” Q: Can we reuse that address and all clients use same address to send bitcoins?问:我们可以重复使用该地址并且所有客户端都使用相同的地址来发送比特币吗? Or address will be deleted?或者地址会被删除? The address have a lifetime?地址有生命周期吗?

  2. Instead create address to pay is possible clients pay directly to my wallet and server got notified?而是创建地址来支付是否可能客户直接支付到我的钱包并且服务器得到通知? I don't need extra params like tokens.我不需要像令牌这样的额外参数。

I end up in a website that use always the same wallet/address for each odd: http://bitzillions.com/satoshibones我最终进入了一个网站,该网站始终为每个奇数使用相同的钱包/地址: http : //bitzillions.com/satoshibones

I will like to have a pay system like that, one address per game.我希望有一个这样的支付系统,每场比赛一个地址。

Also should i use blockchain/blockchain ( https://github.com/blockchain/api-v1-client-php ) library or the simple library ( https://github.com/blockchain/receive_payment_php_demo )?我还应该使用区块链/区块链( https://github.com/blockchain/api-v1-client-php )库还是简单的库( https://github.com/blockchain/receive_payment_php_demo )?

Also if you have any suggestion or alternative i will like to hear.另外,如果您有任何建议或替代方案,我很想听听。

I think I can help.我想我可以帮忙。 Disclaimer that I work for BlockTrail.免责声明我为 BlockTrail 工作。

It would not be good to use the same address because people can view the historical transactions associated with that address.使用同一个地址是不好的,因为人们可以查看与该地址相关的历史交易。 It is recommended to use a new address for every transaction.建议为每笔交易使用一个新地址。 These can be under the same wallet or different wallets.这些可以在同一个钱包或不同的钱包下。 That may sound complicated but with the possibilities as long as the universe is old you can make a new address per transactions.这听起来可能很复杂,但只要宇宙是旧的,你就可以为每笔交易创建一个新地址。 Some wallets will do this for you automatically.有些钱包会自动为您执行此操作。 This is called HD Wallets or Hierarchical Deterministic Wallets.这称为 HD 钱包或分层确定性钱包。 You can also use this to have your clients always pay into the same wallet.您还可以使用它让您的客户始终向同一个钱包付款。

You can also use an API to create these wallets.您还可以使用 API 来创建这些钱包。 If you are interested in using BlockTrail's here is the link: https://www.blocktrail.com/如果您有兴趣使用 BlockTrail,请访问以下链接: https ://www.blocktrail.com/

We also have webhooks that will send you notifications for confirmations etc... If you want to learn more about our platform, here is a blog that describes it.我们还有网络钩子,可以向您发送确认通知等……如果您想了解有关我们平台的更多信息,请查看描述它的博客。 BTW it is free!顺便说一句,它是免费的! https://blog.blocktrail.com/2015/06/blocktrails-developer-platform/ https://blog.blocktrail.com/2015/06/blocktrails-developer-platform/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM