Post

Replies

Boosts

Views

Activity

Comment on Error 21002 - Validating Receipts Server-Side
hi! I used this URL too for verifying the receipts: https://sandbox.itunes.apple.com/verifyReceipt I have also added the password (app's shared secret key) but still the return of the request is 21002. I have tried changing the encoding options from 0 to EndLineWithCarriageReturn -> NSString *base64Receipt = [receiptData base64EncodedStringWithOptions:NSDataBase64EncodingOptions.EncodingEndLineWithCarriageReturn]; Do you know what else can I do? Thank you so much! This would be a big help!
Jul ’24
Comment on Error 21002 - Validating Receipts Server-Side
@vincent123 yes, this is my current code right now NSString *base64Receipt = [receiptData base64EncodedStringWithOptions:0]; NSDictionary *requestContents = @{@"receipt-data": base64Receipt,@"password": @""}; NSError *error; NSData *requestData = [NSJSONSerialization dataWithJSONObject:requestContents options:0 error:&error];} and pass it to the URL: [request setHTTPMethod:@"POST"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:requestData];
Jul ’24
Comment on Error 21002 - Validating Receipts Server-Side
hi again! @vincent123 I have a question, I think I feel like I know why it always returns 21002, but I am not really sure. Right now, I am testing the In app purchases and subscriptions through storekit configuration file. So the receipts are generated from storekit config file. Is it not possible to validate receipts from storekit configuration with xcode? Should I always test with sandbox for validation of receipts? Thank you so much!
Jul ’24