Solved , I have misread the documentation . Just made changes in route file to work with subclass .
Nov 29, 2016
1
Level 3
Unable to Call Methods in custom Stripe Webhook Handler
I have created a Controller to handle additional stripe webhook as instructed at https://laravel.com/docs/5.3/billing#defining-webhook-event-handlers .
But the methods are never got called .
By debugging i found that the problematic section is in cashier's WebhookController Class and handleWebhook Method. The code block is :
if (method_exists($this, $method))
{
return $this->{$method}($payload);
} else {
return $this->missingMethod();
}
The method_exists always returns false. But if i put handleAccountUpdated inside superclass(WebhookController Class of Cashier) it returns true but never works when method is in subclass(WebhookController extends CashierController) .
My WebhookController is :
namespace App\Http\Controllers;
use Laravel\Cashier\Http\Controllers\WebhookController as CashierController;
class WebhookController extends CashierController
{
public function handleAccountUpdated()
{
return 'handleAccountUpdated Called';
}
public function handleCustomerCreated()
{
return 'handleCustomerCreated Called';
}
}
Level 3
Please or to participate in this conversation.