我想从我的 stripe 应用程序创建一个计划。场景是用户被收取不同的价格作为定期付款。所以,这就是为什么我想为每个用户创建计划。
我在用拉拉维尔 5并使用"laravel/cashier": "~5.0"
laravel/cashier 只是没有内置此功能。不过,您也不是运气不好,因为使用 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 https://stripe.com/docs/api#create_plan
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)