Closed webstarlee closed 6 years ago
Hello @Webdev55486
You don't need to pass an array to the create()
method, just the Stripe Customer Id:
$stripe = Stripe::make('my_security_key');
$customer = $stripe->customers()->create([
'email' => 'my_email',
]);
$key = $stripe->EphemeralKey()->create($customer['id']);
return $key;
Give it a go.
Thanks!
Closing due to lack of activity. Feel free to reopen if you still have issues or other questions.
I used this line but get error
$key = $stripe->EphemeralKey()->create($customer['id']);
Should be
$key = $stripe->ephemeralKey()->create($customer['id']);
$stripe = Stripe::make('my_security_key');
$customer = $stripe->customers()->create([ 'email' => 'my_email', ]);
$key = $stripe->EphemeralKey()->create(['customer' => $customer['id']]);
return $key;