Hi
I need to update a number of tables in my db when a invoice.payment_failed webhook is called. I am having issues getting it to work. I have followed the laravel docs and created a class that extends WebhookController like so:
class WebhookController extends Laravel\Cashier\WebhookController {
public function handleInvoicePaymentFailed($payload)
{
return new Response('Webhook Handled', 200);
}
}
I cant even get the response to display in the stripe dashboard. instead i get 'Test webhook error: 500'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Whoops! There was an error.</title>
<style>.cf:before, .cf:after {content: " ";display: table;} .cf:after {clear: both;} .cf {*zoom: 1;}
body {
font: 14px helvetica, arial, sans-serif;
color: #2B2B2B;
background-color: #D4D4D4;
padding:0;
margin: 0;
max-height: 100%;
.......
I have a route
Route::post('webhook/test', 'WebhookController@handleInvoicePaymentFailed');
I have also tried renaming my new controller.
Can anyone see what im missing.
thanks