Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | { |
||
19 | $eventPayload = $request->input(); |
||
20 | |||
21 | $eventType = $eventPayload['type']; |
||
22 | |||
23 | $modelClass = config('stripe-webhooks.model'); |
||
24 | |||
25 | $stripeWebhookCall = $modelClass::create([ |
||
26 | 'type' => $eventType, |
||
27 | 'payload' => $eventPayload, |
||
28 | ]); |
||
29 | |||
30 | try { |
||
31 | $stripeWebhookCall->process(); |
||
32 | } catch (Exception $exception) { |
||
33 | $stripeWebhookCall->saveException($exception); |
||
34 | |||
35 | throw $exception; |
||
36 | } |
||
37 | } |
||
39 |