我正在尝试使用 Gigya 的评论通知功能,并遵循以下指南:http: //developers.gigya.com/010_Developer_Guide/18_Plugins/022_Comments_Version_2/Comment_Notifications
我开发了以下代码:
<?php
require_once('GSSDK.php');
$event = $_POST['event'];
$eventData = $_POST['eventData'];
$nonce = $_POST['nonce'];
$timestamp = $_POST['timestamp'];
$signature = $_POST['signature'];
$signatureBase = sprintf("%s_%s_%s_%s", $event, $eventData, $nonce, $timestamp);
$expectedSignature = SigUtils::calcSignature(
$signatureBase,
MY_SECRET_KEY);
if($signature !== $expectedSignature) {
header('HTTP/1.0 403 Forbidden');
die();
}
//Some other stuff
exit();
?>
但它永远不会到达“//其他一些东西”部分。预期的签名总是与 Gigya 服务器提供的签名不同。我究竟做错了什么?