1
This commit is contained in:
parent
215896534a
commit
cac2a11948
@ -47,9 +47,9 @@ class InAppPurchase {
|
||||
|
||||
public function process()
|
||||
{
|
||||
error_log('InappPurchase:' . json_encode($_REQUEST));
|
||||
error_log('----- inappPurchaseDiamonds -----');
|
||||
$data = json_decode(file_get_contents('php://input'), true);
|
||||
error_log('InappPurchase:' . json_encode($_REQUEST));
|
||||
error_log('----- inappPurchaseDiamonds -----' . json_encode($data));
|
||||
|
||||
if (!$this->verifySign($data)) {
|
||||
myself()->_rspErr(1, "signature error");
|
||||
@ -82,9 +82,9 @@ class InAppPurchase {
|
||||
}
|
||||
}
|
||||
$signStr = 'channel=' . $channel . '&' . implode("&", $strings);
|
||||
error_log('InAppPurchase verify ' . $signStr);
|
||||
|
||||
$signature = hash_hmac('sha256', $sign, BUY_SERVER_PKEY);
|
||||
$signature = hash_hmac('sha256', $signStr, BUY_SERVER_PKEY);
|
||||
error_log('InAppPurchase verify ' . $signStr . ' sign1=' . $sign . ' sign2=' . $signature);
|
||||
return $sign == $signature;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user