Problem with Wave and Stripe API keys
I'm setting up my Wave SaaS framework with Stripe. I have entered my stripe API keys into the .env file as described here: https://wave.devdojo.com/docs/1.0/features/billing When I go to the registration page I get this error:
Stripe\Exception\AuthenticationException No API key provided. (HINT: set your API key using "Stripe::setApiKey(<API-KEY>)". You can generate API keys from the Stripe web interface. See https://stripe.com/api for details, or email [email protected] if you have any questions.
It seems like it is not finding my stripe keys that I put in the .env file?
Hi there Michael,
I tried to recrate this at my end on a fresh new Wave installation but it worked as expected.
There are a couple of things that I could suggest:
- Make sure that the
pk_test_
part is not duplicated, your Key;s should look like this:
STRIPE_MODE=test
STRIPE_TEST_KEY=pk_test_pTgwyGVzdDEyMzU2N2dmZGYKdDEyMzU2N2dmZGYK
STRIPE_TEST_SECRET=sk_test_dGVzdDEyMzU2N2dmZGYKdGVzdDEyMzU2N2dm
- If your keys are correct, try clearing your config's cache:
php artisan config:clear
Let me know how it goes! Regards, Bobby
Hi Bobby,
Thanks so much for your reply.
It was indeed a problem loading the .env file.
I was using config:cache which seemed to be creating null variables.
config:clear worked. Thanks!
Hi Michael,
No problem at all! Happy to hear that you've got it all working!
Regards,
Bobby