Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
lanlin committed Jun 27, 2020
1 parent 45eee48 commit 3f3555f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Webhooks/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* ----------------------------------------------------------------------------------
*
* @author lanlin
* @change 2020/04/27
* @change 2020/06/27
*/
class Webhook
{
Expand All @@ -39,22 +39,22 @@ public function __construct(Options $options)
// ------------------------------------------------------------------------------

/**
* echo chanllenge to validate webhook
* echo challenge to validate webhook
*
* TIPS: you'd better use the output method from your framework.
*/
public function echoChallenge(): void
{
$chanllenge = $_GET['challenge'] ?? null;
$challenge = $_GET['challenge'] ?? null;

if (empty($chanllenge))
if (empty($challenge))
{
return;
}

\header('Content-Type: text/html; charset=utf-8', true, 200);

die($chanllenge);
die($challenge);
}

// ------------------------------------------------------------------------------
Expand Down

0 comments on commit 3f3555f

Please sign in to comment.