Total Complexity | 2 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class WebhookController extends Controller |
||
14 | { |
||
15 | /** |
||
16 | * Verify a webhook. |
||
17 | * |
||
18 | * @see https://developer.vivawallet.com/webhooks-for-payments/#generate-a-webhook-verification-key |
||
19 | */ |
||
20 | 3 | public function verify(Webhook $webhook): JsonResponse |
|
21 | { |
||
22 | 3 | return response()->json($webhook->getVerificationKey()); |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * Handle requests from Viva Wallet. |
||
27 | * |
||
28 | * @see https://developer.vivawallet.com/webhooks-for-payments/#handle-requests-from-viva-wallet |
||
29 | */ |
||
30 | 9 | public function handle(Request $request): JsonResponse |
|
44 | } |
||
45 | } |
||
46 |