codeplugtech/creem-payments
最新稳定版本:0.0.6
Composer 安装命令:
composer require codeplugtech/creem-payments
包简介
Laravel Package for Creem.io Payments
README 文档
README
- Add the
Billabletrait to your billable model definition.
use Codeplugtech\CreemPayments\Billable; use Illuminate\Foundation\Auth\User as Authenticatable; class User extends Authenticatable { use Billable; }
- Add API Keys to your
.envfile
CREEM_API_KEY=YOUR_API_KEY
CREEM_SANDBOX=true
CREEM_WEBHOOK_SECRET=YOUR_WEBHOOK_KEY
- You can create a checkout session using the code below:
$user->subscription()->createCheckoutSession([ 'product_id' => 'prod_123', 'customer_email' => $user->email, // other parameters ]);
or via the static method:
use Codeplugtech\CreemPayments\CreemPayments; CreemPayments::createCheckoutSession([ 'product_id' => 'prod_123', 'customer_email' => 'test@example.com' ]);
- Exclude
creem/*from CSRF protection inbootstrap/app.phpfile for Laravel 11
->withMiddleware(function (Middleware $middleware) { $middleware->validateCsrfTokens(except: [ 'creem/*', ]); })
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-11