Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS Receipt validation IllegalArgumentException

I use similar code as its shown here in the question. Java and AppStore receipt verification

But I still end up getting

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

Can it be a problem at Base64 encoding?. Do I have to convert the base64 encoded string into hex or something else?.

What i post is similar to following

{"receipt-data" : "eyJzaWduYXR1cmUiOiJBbjNJVER0VVNmZWNhaGMxR.....
like image 740
dinesh707 Avatar asked Nov 25 '25 19:11

dinesh707


1 Answers

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

like image 160
dinesh707 Avatar answered Nov 28 '25 07:11

dinesh707