使用 Laravel 实现比特币

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27226678/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 10:29:45  来源:igfitidea点击:

Bitcoin implementation with laravel

laravelbitcoin

提问by user4311278

I am new in Laravel. I have to use Bitcoin for checkout page. Can anybody help me how to integrate Bitcoin in laravel framework.

我是 Laravel 的新手。我必须在结帐页面使用比特币。任何人都可以帮助我如何将比特币集成到 Laravel 框架中。

回答by OACDesigns

The Blocktrail PHP SDKworks with Laravel, in fact there's an example project to get you started: Simple Block Explorer

Blocktrail PHP SDK可与Laravel,其实有一个示例项目,让你开始:简单的块浏览器

Their API supports payments and webhooks as well as plain blockchain data, check out their API documentation: https://www.blocktrail.com/api/docs

他们的 API 支持支付和 webhooks 以及普通的区块链数据,查看他们的 API 文档:https://www.blocktrail.com/api/docs

Update 1

更新 1

I've added an additional example project - a personal wallet for receiving and making payments (with an integrated block explorer). The project demonstrates the payment api as well as the webhooks api. See it here: Simple Bitcoin Wallet App

我添加了一个额外的示例项目 - 一个用于接收和付款的个人钱包(带有一个集成的区块浏览器)。该项目演示了支付 api 以及 webhooks api。在此处查看:简单的比特币钱包应用程序

回答by Bowersbros

As far as I am aware, there is no library setup for Bitcoin payment processing in Laravel, however the API for Coinbase (https://www.coinbase.com/docs/api/overview) is pretty decent, and shouldn't be too hard to implement yourself.

据我所知,Laravel 中没有用于比特币支付处理的库设置,但是 Coinbase 的 API ( https://www.coinbase.com/docs/api/overview) 相当不错,不应该自己实施太难了。

回答by Opposingthetypicalitrecruiter

<form action="/create_payment" method="POST">
<script
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
data-key=pk_test_6pRNASCoBOKtIshFeQd4XMUh
data-image="/square-image.png"
data-name="Demo Site"
data-description="2 widgets (.00)"
data-amount="2000"
data-currency="usd"
data-bitcoin="true">
</script>
</form>