deftx/laravel5-braintree
Composer 安装命令:
composer require deftx/laravel5-braintree
包简介
Braintree Service Provider for Laravel 5
README 文档
README
Installation
In your Laravel project's composer.json file, add oureastudios/laravel5-braintree as a dependency in the require object:
"oureastudios/laravel5-braintree": "dev-master"
You do not need to add any other dependencies, as oureastudios/laravel5-braintree loads in the other dependencies automatically.
Finally, do a composer update.
Once installed, add the ServiceProvider to your provider array within config/app.php:
'providers' => [ .... /* * Braintree Service Provider */ 'Oureastudios\Laravel\BraintreeServiceProvider', ]
Configuration
To publish a the package configuration file, run:
php artisan vendor:publish
Then open config/oureastudios.braintree.php to setup your environment and keys:
Usage
Once setup, you can use the Braintree PHP classes as spelled out in the documentation.
braintree.js (v2)
If you are using braintree.js (v2), then you can easily output a generated client token using '@braintreeClientToken'.
Below is an example:
<script src="https://js.braintreegateway.com/v2/braintree.js"></script> <script> braintree.setup("@braintreeClientToken", "<integration>", options); </script>
braintree.js (v1)
If you are using the lagacy version braintree.js (v1), you can output your client side encryption key into your blade views.
The service provider extends the blade view to allow you to use the '@braintreeClientSideEncryptionKey' to output the CSE Key from your config file.
Below is an example.
<script type="text/javascript" src="https://js.braintreegateway.com/v1/braintree.js"></script> <script type="text/javascript"> var braintree = Braintree.create("@braintreeClientSideEncryptionKey"); ... </script>
Credits
Thanks to the bradleyboy/laravel-braintree package. I used it as a base and converted it into Laravel 5.
deftx/laravel5-braintree 适用场景与选型建议
deftx/laravel5-braintree 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.34k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 07 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「braintree」 「braintree laravel 5」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 deftx/laravel5-braintree 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 deftx/laravel5-braintree 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 deftx/laravel5-braintree 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Braintree gateway for Omnipay payment processing library
Laravel Cashier provides an expressive, fluent interface to Braintree's subscription billing services.
A Braintree bridge for Laravel
Laravel Cashier provides an expressive, fluent interface to Braintree's subscription billing services.
Braintree for Yii2
A Payum extension for Braintree gateway integration
统计信息
- 总下载量: 11.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-30