webnets / laravel-cashier-braintree
Laravel Cashier 为 Braintree 的订阅计费服务提供了一个表达性强、流畅的接口。
dev-master
2019-12-07 12:45 UTC
Requires
- php: ^7.2.0
- braintree/braintree_php: ~4.0
- dompdf/dompdf: ^0.8.0
- illuminate/contracts: ^6.6.2
- illuminate/database: ^6.6.2
- illuminate/http: ^6.6.2
- illuminate/routing: ^6.6.2
- illuminate/support: ^6.6.2
- illuminate/view: ^6.6.2
- nesbot/carbon: ^2.0
- symfony/http-kernel: ^4.0|^5.0
Requires (Dev)
- ext-json: *
- mockery/mockery: ~1.0
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-09-07 23:34:22 UTC
README
介绍
很遗憾,我们决定放弃对 laravel/cashier-braintree 库的维护。我们建议从现在开始直接使用 braintree/braintree_php 库。如果您喜欢,您可以自由地进行分支并维护自己的版本。
Laravel Cashier Braintree 为 Braintree 的订阅计费服务提供了一个表达性强、流畅的接口。它处理了您害怕编写的几乎所有样板订阅计费代码。除了基本的订阅管理外,Cashier Braintree 还可以处理优惠券、订阅交换、宽限期取消以及甚至生成发票 PDF。
测试
为了运行库的测试,您需要在本地以及您的 Braintree 账户中设置以下详细信息。
本地
环境变量
BRAINTREE_MERCHANT_ID=
BRAINTREE_PUBLIC_KEY=
BRAINTREE_PRIVATE_KEY=
BRAINTREE_MODEL=Laravel\Cashier\Tests\User
您可以在 phpunit.xml.dist
文件中设置这些变量。
Braintree
计划
* Plan ID: monthly-10-1, Price: $10, Billing cycle of every month
* Plan ID: monthly-10-2, Price: $10, Billing cycle of every month
* Plan ID: yearly-100-1, Price: $100, Billing cycle of every 12 months
折扣
* Discount ID: coupon-1, Price: $5
* Discount ID: plan-credit, Price $1
官方文档
Cashier Braintree 的文档可以在 Laravel 网站 上找到。
许可
Laravel Cashier Braintree 是开源软件,许可协议为 MIT 许可证。