Skip to content

Commit 0e0b6b1

Browse files
committed
2 parents 8a4770c + 2fc25e3 commit 0e0b6b1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/Webhook/Webhook.php‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public static function parse(string $webhookJsonStr=null) : self {
151151
}
152152

153153
$isSignatureValid = Webhooks::validateWebhookSignature($webhook, $signature);
154-
var_dump("VALID: ", $isSignatureValid);
154+
//var_dump("VALID: ", $isSignatureValid);
155155

156156
if (!$isSignatureValid) {
157157
throw new ApiException("Invalid webhook signature", 403);
@@ -248,9 +248,9 @@ public function validateIp(string $ipHeaderName = "REMOTE_ADDR"): bool
248248
*/
249249
public function validateSignature(string $expectedSignature, string $webhookSecret): bool
250250
{
251-
$calculatedSignature = hash_hmac('sha256', hash('sha256', $this->_encodedJson), $webhookSecret);
251+
$calculatedSignature = hash_hmac('sha256', hash('sha256', $this->_rawJson), $webhookSecret);
252252
$result = (strcmp($calculatedSignature, $expectedSignature) == 0);
253-
var_dump("Result: ", $result);
253+
//var_dump("Result: ", $result);
254254
return $result;
255255
}
256-
}
256+
}

0 commit comments

Comments
 (0)