Just ran into the same issue using Laravel Spark. Would love to know why this happens.
cashier apikey error when config:cache used
I have an app that I'm using with Stripe and cashier 6.0 (laravel 5.2). When I use config:cache I get:
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(
When I clear cache (config:clear), it works fine.
Here is my setup: .env file has:
STRIPE_KEY
STRIPE_SECRET
CACHE_DRIVER=file
app\config\services.php has:
'stripe' => [
'model' => \App\User::class,
'secret' => env('STRIPE_SECRET'),
'key' => env('STRIPE_KEY')
]
stripe.js has
Stripe.setPublishableKey
Any thoughts as to why config:cache breaks it? does config:cache help much? My test env on my laptop is IIS and I'll be deploying to Azure that has wincache, but none of the other fancy cache's available to me at the moment.
Please or to participate in this conversation.