我想根据我的应用程序在 strip 上创建一个计划。这种情况是,用户需要以不同的价格来支付经常性付款。因此,这就是为什么我要为每个用户创建计划。
我正在使用 laravel 5 并使用"laravel/cashier": "~5.0"
最佳答案
laravel/cashier只是没有嵌入此功能。尽管您很容易使用Stripe的API,但应运而生,因为Stripe的API应该作为依赖项下载到您的供应商文件夹中。如果没有,您可以使用 Composer 下载它。
composer require stripe/stripe-php 2.*
您可以将其与
use \Stripe\Plan;
Plan::create(array(
"amount" => 2000,
"interval" => "month",
"name" => "Amazing Gold Plan",
"currency" => "usd",
"id" => "gold")
);
您可以在此处阅读更多信息-https://stripe.com/docs/api#create_plan
关于laravel - 通过laravel在 Stripe 上创建计划,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30817249/