public function handleWebhook(Request $request)
{
try {
$webhook = $this->parseBraintreeNotification($request);
} catch (Exception $e) {
return;
}
$method = 'handle' . studly_case(str_replace('.', '_', $webhook->kind));
if (method_exists($this, $method)) {
return $this->{$method}($webhook);
} else {
return $this->missingMethod();
}
}