php - Cashier (Stripe) integration in Lumen
问题描述
I have integrated cashier in laravel 8 without any problem but when I am integrating cashier in lumen 8 it has become a panic process I have spent a lot of time integrating it I even googled everywhere but no luck. Can anyone help me integrating cashier in lumen 8. what I have done so far is as follow
- installed cashier by using this command: composer require laravel/cashier
- then run: php artisan migrate
- php artisan vendor:publish --tag="cashier-migrations"
- Added: use Laravel\Cashier\Billable; and use Billable; in User Model
- Set stripe api keys in .env file: STRIPE_KEY=my-stripe-key , STRIPE_SECRET=my-stripe-secret
- in my code when I coded $user->createSetupIntent();
When I execute line#6 I am getting this error
No API key provided. (HINT: set your API key using "Stripe::setApiKey()". You can generate API keys from the Stripe web interface. See https://stripe.com/api for details, or email support@stripe.com if you have any questions.
It seems like lumen is unable to read cashier module can anyone help fixing this issue?
解决方案
推荐阅读
- python - builtins.TypeError 类型错误
- java - 带有反射类的 Java 扩展类
- xml - MarkLogic 8:无法使用 cURL 将 XML 文档加载到 MarkLogic 数据库
- android - 在 Google 眼镜上运行应用程序
- javascript - 打开 clicked li 的子 div
- html - how to align group of images?
- facebook - 只读网站是否需要 FB App Review?
- python - InternalError: (1366, u"Incorrect integer value: Select) Error
- javascript - 重新组合数组 angular 4 中的相似元素
- python - 在python中绘制轮廓