From 95491538135ab2317b5b210866e4fb44799b5b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20Saborit?= Date: Wed, 1 May 2024 11:04:07 +0200 Subject: [PATCH] Docs: New example of how to verify a webhook when framework does not support PSR7 (#53) --- .github/CODEOWNERS | 2 +- examples/webhook_verification_PSR7.php | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 examples/webhook_verification_PSR7.php diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1d2ee7f..ea6b244 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @PaddleHQ/dx +* @PaddleHQ/developer-experience \ No newline at end of file diff --git a/examples/webhook_verification_PSR7.php b/examples/webhook_verification_PSR7.php new file mode 100644 index 0000000..9e25cd2 --- /dev/null +++ b/examples/webhook_verification_PSR7.php @@ -0,0 +1,26 @@ +verify($request, new Secret('WEBHOOK_SECRET_KEY')); + +if ($isVerified) { + echo "Webhook is verified\n"; +} else { + echo "Webhook is not verified\n"; +}