How does your route look like? Does your application receive any call at all from stripe?
Feb 9, 2018
2
Level 3
Cashier - handleInvoicePaymentSucceeded not working
Good morning all,
Any thoughts as to why the invoice.payment_succeeded POST from Stripe isn't "going into" my handleInvoicePaymentSucceeded method?
I checked the docs, and things look right, I just can't figure out what I'm doing wrong (https://laravel.com/docs/5.5/billing#handling-stripe-webhooks)
<?php
namespace App\Http\Controllers\Cashier;
use \Laravel\Cashier\Http\Controllers\WebhookController as BaseController;
use Log;
class WebhookController extends BaseController
{
// When a first-time or recurring payment is successful
function __construct()
{
Log::debug('In Custom Webhook Controller');
}
// Stripe Event: invoice.payment_succeeded
public function handleInvoicePaymentSucceeded($payload)
{
// Problem: Stripe POST does not go into this method
Log::debug('In handleInvoicePaymentSucceeded');
// If in production
// TODO: change 'dev' to 'production'
if (App::environment('dev')) {
// Debug Log
Log::debug('Webhook Notification Received from Stripe');
Log::debug('Webhook Payload: '.implode( ", ", $payload ) );
// Look thins up, depending on payload
// Send details to Google Analytics
return response('Webhook Handled', 200);
}
}
}
Please or to participate in this conversation.