amritms / cashier-braintree
Laravel Cashier 提供了 Braintree 订阅计费服务的流畅、表达式式的接口。
4.3
2023-03-19 04:54 UTC
Requires
- php: ^7.2 | ^8.0
- braintree/braintree_php: ~4.6
- dompdf/dompdf: ^2.0.3
- illuminate/contracts: ^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/database: ^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/http: ^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/routing: ^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/view: ^6.0|^7.0|^8.0|^9.0|^10.0
- nesbot/carbon: ^2.0
- symfony/http-kernel: ^5.0
Requires (Dev)
- ext-json: *
- mockery/mockery: ~1.0
- phpunit/phpunit: ~8.0
This package is auto-updated.
Last update: 2024-09-05 17:06:41 UTC
README
简介
Laravel Cashier Braintree 提供了对 Braintree 订阅计费服务的流畅、表达式式的接口。它几乎处理了你所害怕编写的大部分订阅计费代码。除了基本的订阅管理外,Cashier Braintree 还可以处理优惠券、交换订阅、宽限期,甚至生成发票 PDF。
支持
支持 php ^7.2, Laravel ~5.7.0|~5.8.0|~5.9.0|^6.0|^7.0 和 phpunit ~8.0
测试
为了运行库的测试,你需要在本地和 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 许可证。