title: In-app Purchase php validation openssl verify, openssl_get_publickey
body: <p>I have been trying to verify the inapp purchase from server side after getting the response from frontend 
  <strong>android side</strong>. Frontend developer send me below information. I am using openssl_get_publickey() for public key (Get from the google console) and openssl_verify() function but Getting false/0 response each time. Please help me to solve the issue.
  Thanks in advance.</p>
  
  <pre><code>        $signedData =  array(
              "orderId"           =&gt; 'GPA.3333-5628-5675-XXXX',
              "packageName"       =&gt; 'com.xxxxxxxx',
              "productId"         =&gt; 'sample_test_purchase',
              "purchaseTime"      =&gt; 1539165004552,
              "purchaseState"     =&gt; 0,
              "purchaseToken"     =&gt; $purchase_token
          );
      $signedData = json_encode($signedData); 
  
  
      $base64EncodedPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlrVLmLsjKbT+D96evuqmVrMq5FnTVtYOJY5AF2R/sadfasfasdfasdfasdfasdf+DQ3kCxGj+dfgdsxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXx/NZyXxxxxxxxx";
  
  
      $key = "-----BEGIN PUBLIC KEY-----\n" . chunk_split($base64EncodedPublicKey, 64, "\n") . '-----END PUBLIC KEY-----';
      $key = openssl_get_publickey($key);
      $sign=base64_decode($input_fields-&gt;signature);
      $result   = openssl_verify($signedData,$sign,$key,OPENSSL_ALGO_SHA1);
  </code></pre>
  
  <p>output : 0 or false
  result is0error:0906D06C:PEM routines:PEM_read_bio</p>