Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidConfig #66

Closed
ghost opened this issue Jun 18, 2020 · 1 comment
Closed

InvalidConfig #66

ghost opened this issue Jun 18, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 18, 2020

Spatie\WebhookClient\Exceptions\InvalidConfig
`App\Jobs\WooCommerce\ProcessWebhookJob` is not a valid process webhook job class. A valid class should implement `Spatie\WebhookClient\ProcessWebhookJob`.
http://127.0.0.1:8000/api/webhook-receiving-url

webhook-client.php:
'process_webhook_job' => app\Jobs\WooCommerce\ProcessWebhookJob::class,
ProcessWebhookJob.php:

namespace App\Jobs;

use App\Category;
use \Spatie\WebhookClient\ProcessWebhookJob as SpatieProcessWebhookJob;

class ProcessWebhookJob extends SpatieProcessWebhookJob
{
    public function handle()
    {
        // $this->webhookCall // contains an instance of `WebhookCall`
        $payload = json_decode($this->webhookCall->payload);
        // do stuff
    }
}
@freekmurze
Copy link
Member

Seems like you are using a wrong casing in your config file. Our tests prove that custom webhook jobs are working as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant