Aug 30, 2018
0
Level 6
No such customer: cus_DW8c96lmiJ6L2e - Laravel Cashier
When create my test account it show me as Exception "no such customer", i want to create customer on stripe with Subscription. My controller method code:
public function orderPost(Request $request)
{
$user = User::find(8);
$input = $request->all();
$token = $input['stripeToken'];
try {
$user->newSubscription('main',$input['plane'])->create($token,[
'email' => $user->email,
]);
return back()->with('success','Subscription is completed.');
} catch (Exception $e) {
return back()->with('success',$e->getMessage());
}
}
Please or to participate in this conversation.