Steps:
Configure iOS App IAP
Run the app and purchasing
finished with sandbox account
Get the receipt data from Bundle.main.appStoreReceiptURL
Verify the receipt
Result: receipt data error 21002
Analysis: the base64Encoding should be ok. It seems that the receipt data itself is wrong. How to find the root cause? Thanks!