final class PortOneWebhookVerifier (View source)

cable8mm/portone-php 검증기로 웹훅 서명을 확인하는 래퍼.

원문(raw body)을 JSON 디코딩 전에 검증해야 한다.

Methods

Webhook
verify(string $rawBody, string|null $webhookId, string|null $webhookSignature, string|null $webhookTimestamp, string $secret)

웹훅 서명을 검증하고 웹훅 객체를 반환한다.

Details

Webhook verify(string $rawBody, string|null $webhookId, string|null $webhookSignature, string|null $webhookTimestamp, string $secret)

웹훅 서명을 검증하고 웹훅 객체를 반환한다.

Parameters

string $rawBody

변조되지 않은 요청 원문

string|null $webhookId

webhook-id 헤더 값

string|null $webhookSignature

webhook-signature 헤더 값

string|null $webhookTimestamp

webhook-timestamp 헤더 값

string $secret

웹훅 Secret

Return Value

Webhook

검증된 포트원 웹훅 객체