Skip to content

Commit f14ce08

Browse files
author
Igor Kuburovic
committed
TSMD-23137 changed utf8_encode function
1 parent 6d67159 commit f14ce08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/callback_example/telesign_callback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function _log($log_level, $log_message) {
2626
// Generate a signature based on the contents of the callback request body signing with your API Secret Key.
2727
$postBody = file_get_contents('php://input');
2828
$signature = base64_encode(
29-
hash_hmac("sha256", utf8_encode($postBody), base64_decode(API_KEY), true)
29+
hash_hmac("sha256", mb_convert_encoding($postBody, "UTF-8", mb_detect_encoding($postBody)), base64_decode(API_KEY), true)
3030
);
3131
list($authType, $authToken) = explode(' ', getallheaders()['Authorization'], 2);
3232
list($requestCustomerID, $requestSignature) = explode(':', $authToken, 2);

0 commit comments

Comments
 (0)