プロジェクトを Laravel 5.2 と Cashier 6.0 に更新しました。
ドキュメントに従って新しいsubscriptions
テーブルを追加しましたが、テストすると、キャッシャーはトライアル終了列を設定しません。
私のストライプ プランでは 14 日間の試用期間があり、ストライプ アカウントでは、今日新しいコスチュームを追加すると、最初の請求が 14 日後に設定されることがわかります。
これは私の購読コードです:
// Create the user
$user = $this->create( $request->all() );
// Find the plan in the DB
$plan = Plan::find( $request->get( 'plan' ) );
// Charge the user ( 14 days trial )
$user->newSubscription( $plan->slug , $plan->stripe_id )->create( $request->get( 'stripeToken' ),
[
'email' => $request->get( 'email' ),
'description' => ''
] );
は$plan->slug
自分のプランに関連付けた名前です。たとえばannual
、$plan->stripe_id
Stripe ダッシュボードで設定した名前と同じです。
新しい顧客を登録するtrials_ends_at
と、すべてがands_at
設定されます。
私は何を間違っていますか?