mollie / laravel-mollie

Mollie API client wrapper for Laravel & Mollie Connect provider for Laravel Socialite
https://www.mollie.com/
MIT License
322 stars 62 forks source link

Feature request: Variable API key #224

Closed TVBZ closed 1 year ago

TVBZ commented 1 year ago

Expected Behavior

I would love to be able to set the api key from within the controller.

Current Behavior

API key is set in .env file.

Context

I'm using mollie in a multidomain setup with 1 admin panel. For the mollie api key to work, I need to use different keys for different domains. I have a db table with brands, each brand having it's own domain, logo, etc. The api key could be a column in that table.

Something like mollie()->setApiKey($brand->api_key); would do the trick. The API key in .env file could be used as default.

TVBZ commented 1 year ago

I missed it. That exact function is allready there. 😄 Thank you!

sandervanhooft commented 1 year ago

NP, enjoy!