same problem here
Apr 11, 2016
2
Level 6
Stripe API Key Error - Laravel 5.1.34 / Cashier 6.0.14
Hi,
I'm having trouble getting Cashier to work. Specifically, I'm getting the following error:
The second argument to Stripe API method calls is
an optional per-request apiKey, which must be a string,
or per-request options, which must be an array.
(HINT: you can set a global apiKey by "Stripe::setApiKey(<apiKey>)")
I'm using:
laravel/framework v5.1.34
laravel/cashier v6.0.14
I have the following in my config:
'stripe' => [
'model' => app\User::class,
'secret' => 'sk_test_[hidden],
'key' => 'pk_test_[hidden],
],
This is where I get the error:
$subscribe = User::where('id', $id)->first();
$subscribe
->newSubscription($input['p'], $input['p'])
->create($input['stripeToken'],
[
'email' => $email,
'description' => $description
]);
I've checked all of the values in each variable and they are correct.
Please or to participate in this conversation.