We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d67159 commit f14ce08Copy full SHA for f14ce08
examples/callback_example/telesign_callback.php
@@ -26,7 +26,7 @@ function _log($log_level, $log_message) {
26
// Generate a signature based on the contents of the callback request body signing with your API Secret Key.
27
$postBody = file_get_contents('php://input');
28
$signature = base64_encode(
29
- hash_hmac("sha256", utf8_encode($postBody), base64_decode(API_KEY), true)
+ hash_hmac("sha256", mb_convert_encoding($postBody, "UTF-8", mb_detect_encoding($postBody)), base64_decode(API_KEY), true)
30
);
31
list($authType, $authToken) = explode(' ', getallheaders()['Authorization'], 2);
32
list($requestCustomerID, $requestSignature) = explode(':', $authToken, 2);
0 commit comments