title: IOS Receipt validation IllegalArgumentException
body: <p>I use similar code as its shown here in the question.
  <a href="https://stackoverflow.com/questions/12432147/java-and-appstore-receipt-verification">Java and AppStore receipt verification</a></p>
  
  <p>But I still end up getting </p>
  
  <pre><code>{"status":21002, "exception":"java.lang.IllegalArgumentException"}
  </code></pre>
  
  <p>Can it be a problem at Base64 encoding?. Do I have to convert the base64 encoded string into hex or something else?.</p>
  
  <p>What i post is similar to following</p>
  
  <pre><code>{"receipt-data" : "eyJzaWduYXR1cmUiOiJBbjNJVER0VVNmZWNhaGMxR.....
  </code></pre>