IOS Check Check IllegalArgumentException

I am using similar code as shown here in the question. Java and AppStore validation check

But I still get

{"status":21002, "exception":"java.lang.IllegalArgumentException"}

      

Could this be a Base64 encoding issue? Do I need to convert base64 encoded string to hexadecimal or something?

What I am writing is similar to the following

{"receipt-data" : "eyJzaWduYXR1cmUiOiJBbjNJVER0VVNmZWNhaGMxR.....

      

+3


source to share


2 answers


The problem was with Base64 encoding inside Java. When I do the coding inside IOS and use that as a request from the server without any coding in Java then it worked.



+3


source


I had a similar problem and was getting java.lang.IllegalArgumentException from Apple when trying to validate a receipt on my server. The problem was my base64 encoding logic was to insert strings into the encoded string. Once I updated my code to not insert newlines into the encoded string, I was able to successfully validate my receipts on Apple servers.



+1


source







All Articles