I am working with Stripe payment option for my project. I have a recurring option and that's why I have created plans
in subscription page.
After creating plans
I have defined my plan when a new stripe customer register.
try {
$customer = \Stripe\Customer::create([
'source' => $token,
'email' => $email,
'plan' => '20-39-R',
'metadata' => [
"First Name" => $first_name,
"Last Name" => $last_name
]
]);
} catch (\Stripe\Error\Card $e) {
return redirect()->route('order')
->withErrors($e->getMessage())
->withInput();
}
When I have dump($customer)
variable I am not getting transaction id
.
Any idea why I am not getting transaction id during customer creation?