hotmeteor / receiver

Receiver is a drop-in webhook handling library for Laravel.
MIT License
384 stars 21 forks source link

Stripe Driver Not Recognized? #2

Closed nkeena closed 2 years ago

nkeena commented 2 years ago

I've installed the latest version running on Laravel 9 and PHP 8.1.

I'm getting this error message when trying to use the stripe driver:

InvalidArgumentException: Driver [stripe] not supported.

Not sure what I'm doing wrong or if this is a bug.

My implementation:

<?php

namespace App\Http\Controllers\Webhooks;

use Illuminate\Http\Request;
use Receiver\Facades\Receiver;
use App\Http\Controllers\Controller;

class WebhooksController extends Controller
{
    public function store(Request $request)
    {
        Receiver::driver('stripe')
            ->receive($request)
            ->ok();
    }
}
hotmeteor commented 2 years ago

It's easy to miss, but I mentioned in the docs that the Stripe receiver requires you to install the SDK:

https://github.com/hotmeteor/receiver#installation

nkeena commented 2 years ago

Hey, thanks for replying. I do have the Stripe SDK installed already. Is it a specific version?

Here's what's in my composer.json file

"stripe/stripe-php": "^7.113",
hotmeteor commented 2 years ago

@nkeena Fixed it, there was a regression in the Manager. Thanks!