cartalyst / stripe-laravel

Cartalyst Stripe package integration for Laravel.
BSD 3-Clause "New" or "Revised" License
336 stars 58 forks source link

Create stripe.php #64

Closed Traqza closed 4 years ago

Traqza commented 4 years ago

Add additional layer to allow keys to be dynamically pulled from the .env file rather than thru static text required inside controllers. This is a proper method to handle the keys.

To get the keys dynamically inside controllers use the following. $STRIPE_KEY= config::get('stripe.stripe_keys.key'); $STRIPE_SECRET = config::get('stripe.stripe_keys.secret'); $STRIPE_WEBHOOK_SECRET=config::get('stripe.stripe_keys.webhook_secret');

use Illuminate\Support\Facades\Config;

will be required to be added on each controller that uses the keys listed above.

brunogaspar commented 4 years ago

Thanks, but this does not work as is and it would be a breaking change.

You can just use the config/services.php file on your Laravel application to store these and it works as expected then.