测试laravel 5.5和出纳员。
Wnant非常短的试用期,用于测试经常性付款和网络挂钩。
在文档示例中,仅设置天数的试用期:
$user->newSubscription('main', 'monthly')
->trialDays(10)
->create($creditCardToken);
如何设置一秒钟或一分钟的试用期?
发布于 2017-09-15 15:21:37
您可以使用trailUntil
$user->newSubscription('main', 'monthly')
->trialUntil(Carbon::now()->addSecounds(60))
->create($creditCardToken);
发布于 2017-09-15 15:23:15
由于在线应用程序的一种常见做法大多是以天为单位的最小订阅时间,设置分钟和秒在这一事实上没有意义。以及在幼小收银机中不提供方法trialInMins
。您可以查看SubscriptionBuilder类https://github.com/laravel/cashier/blob/58efad0548d307426be6d4efbba0193f49285408/src/SubscriptionBuilder.php#L99
尽管如此,您仍然可以使用Carbon object with time尝试trialUntil
https://stackoverflow.com/questions/46233545
复制相似问题