我正在开发一个Laravel应用程序。我正在使用收银台安装条纹支付方法。现在,我有一个关于创建新订阅的条带计划设置质量的一点问题。这就是我创建新订阅的方式。
auth()->user()->newSubscription('prod_xxx', 'plan_x')-xx>create(request('stripeToken'));
上面的代码运行得很好。但是当我试着像这样设置质量时
auth()->user()->newSubscription('prod_xxx', 'plan_x')->updateQuality(5)->create(request('stripeToken'));
它不起作用。它是说updateQuality方法不存在。如何使用newSubscription一次设置质量?
发布于 2019-02-01 11:56:42
https://laravel.com/docs/5.7/billing#subscription-quantity
我相信你想要的是updateQuantity
。
发布于 2020-07-17 03:48:35
迟做总比不做好,这可能会帮助其他人。
auth()->user()
->newSubscription('prod_xxx', 'plan_x')
->quantity(5)
->create(request('stripeToken'));
https://stackoverflow.com/questions/54478440
复制相似问题