vendredi 28 août 2015

Stripe - No API key provided (Laravel 5.1)

I have problem with providing the Stripe API key. Everything is included, packages, all dependencies...

The error message I get: 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.

Controller:

    public function upgradeBronze() {

        $bid = Session::get('builderId');

        Stripe::setApiKey(env('KEY_SECRET'));
        $token = $_POST['stripeToken'];

        // Create the charge on Stripe's servers - this will charge the user's card

        try {

            $user = \App\User::find($bid);
            $user->subscription('monthly')->create($token);
            return Redirect::route('builders-packages');

        } catch(\Stripe\Error\Card $e) {
            return Redirect::route('builders-packages');
        }

}

Error SS: http://ift.tt/1N17X2f



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Jr97A7
via IFTTT

Aucun commentaire:

Enregistrer un commentaire