We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Всем привет пытаюсь проверить хеш с заголовка выдает false
$billPayments = new BillPayments(env("QIWI_SECRET")); $head = getallheaders(); $sha256_hash_header = $head['X-Api-Signature-Sha256']; $notificationData = [ 'bill' => [ 'siteId' => $request->input('bill.siteId'), 'billId' => $request->input('bill.billId'), 'amount' => [ 'value' => $request->input('bill.amount.value'), 'currency' => $request->input('bill.amount.currency') ], 'status' => [ 'value' => $request->input('bill.status.value') ] ], 'version' => $request->input('version') ]; $check = $billPayments->checkNotificationSignature( $sha256_hash_header, $notificationData, base64_decode(env("QIWI_SECRET")) );
Результат
$check === false;
The text was updated successfully, but these errors were encountered:
у меня так работает
$secretKey = QSTOKEN; $billPayments = new Qiwi\Api\BillPayments($secretKey); //получем тело ответа $postbody = json_decode(file_get_contents('php://input'),true); $notificationData = [ 'bill' => [ 'siteId' => $postbody['bill']['siteId'], 'billId' => $postbody['bill']['billId'], 'amount' => ['value' => $postbody['bill']['amount']['value'], 'currency' => 'RUB'], 'status' => ['value' => $postbody['bill']['status']['value']] ], 'version' => $postbody['version'] ]; //получем заголовки ответа $headers = apache_request_headers(); $validSignatureFromNotificationServer = $headers['X-Api-Signature-SHA256']; //проверяем подпись $checksigna = $billPayments->checkNotificationSignature($validSignatureFromNotificationServer,$notificationData,$secretKey);
обновил у меня работает как у вас не знаю
Sorry, something went wrong.
No branches or pull requests
Всем привет пытаюсь проверить хеш с заголовка
выдает false
Результат
The text was updated successfully, but these errors were encountered: