This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ValidateGooglePlaySignature( $responseData, $signature, $publicKey, &$status, &$response ) | |
{ | |
$responseData = trim( $responseData ); | |
$signature = trim( $signature ); | |
$response = json_decode( $responseData ); | |
// Create an RSA key compatible with openssl_verify from our Google Play sig | |
$key = "-----BEGIN PUBLIC KEY-----\n". | |
chunk_split($publicKey, 64,"\n"). | |
'-----END PUBLIC KEY-----'; |