Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6182689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:14:34+00:00 2026-05-24T01:14:34+00:00

I am using in App purchases in my application. I am sending a request

  • 0

I am using in App purchases in my application.
I am sending a request to the server for verifying the transaction receipt for the purchased product using the following method:

-(void)sendingRequestForReceipt: (SKPaymentTransaction *)transaction{
    networkQueue = [ASINetworkQueue queue];
    [networkQueue retain];
    NSString *serverUrl = @"https://sandbox.itunes.apple.com/";
    NSString *receiptStr= [Base64Encoding base64EncodingForData:(transaction.transactionReceipt) WithLineLength:0];
NSString *str = [NSString stringWithFormat:@"%@verifyReceipt", serverUrl];
    NSURL *url = [NSURL URLWithString:[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
    ASIHTTPRequest *request = [[[ASIHTTPRequest alloc] initWithURL:url] autorelease];

    NSDictionary* data = [NSDictionary dictionaryWithObjectsAndKeys:receiptStr,@"receipt-data", nil];
[request appendPostData: [[data JSONRepresentation] dataUsingEncoding:NSUTF8StringEncoding]];
    [request setRequestMethod:@"POST"];
    [request setDelegate:self];
    [request setDidFinishSelector: @selector(gotReceiptResponse:)];


    [networkQueue addOperation: request];
    [networkQueue go];
}

After this the following gotReceiptResponse method is called:

- (void)gotReceiptResponse:(ASIHTTPRequest *)req{

    NSString *response=[req responseString];
NSDictionary *jsonResp = [response JSONValue];
    NSString *receiptValue = [jsonResp valueForKey:@"status"];
    int receiptCheck=[receiptValue intValue];
if( receiptCheck ==0){
        //mark item as purchased
        //show alert that item was purchased and will be downloaded
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle :@"In-App-Purchase:"
                                                         message:@"The instrumental was purchased successfully and will now be downloaded. "
                                                                 "Please do not close the app till download is complete"
                                                       delegate :self cancelButtonTitle:@"OK"otherButtonTitles:nil];
        [alert show];
        [alert release];
}
}

The value I get in response is for example : \u008bb\u0095\u008f\u00b1\u008e\u00c20D{\u00be”rM\u0082bc\u00d2\u009f\u00a8\u00e8\u00e8\u00a3=\u00c7\u00ca\u00adD\u00ec\u009c\u00bdFB(\u00ffN\u00ae\u00a1B\u00b7\u00dd\u00ce>\u00cd\u00ec<6,Xcq”\u00d6>\u0092;\u00ecY\u00cb\u009aF)\u00a5\u00eb\u00c3\u0091m\u00e6\u00e8\u00e0\u00daQ\u00c1z\u00f7\u00c2\u00ff\u009bFH-\u00a4\u00cc\u00f4\u00f7-\u00c4|\u00aax\u00de\u00a6\u00e0\u00fbd\u00e8\u0085\u00ef\u008fJ\u00adb

\u00e6a\u00a2\u00edz \u00bb\u00e85\u00a2\u00e4\u0087\u00b2\u0096\u00d7\u00ad\u00d0\u00ad\u00d4\u00c5\u0099\u00dd\u00e9|\u00c9\u00f8oGH\u00f7\u00ec\u00ba&\u00acf\u00c6\u008f\u00d5\u00ef\u00b0\u00fd\u0090\u00ae\u0091R\u008f\u00fe\u00ed\u00e3 &}.8/T$\u00a0\u00b4t\u00e4\u00f3M\u00f9`?

and in jsonResp the value is null.
So just wanted to know how can I encode this unicode string. So that I can understand what is the response I am getting and also the reason for null value in jsonResp.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:14:34+00:00Added an answer on May 24, 2026 at 1:14 am

    Use [req responseData] to get the raw data an encode the data manually by using:

    NSString *resultString = [[NSString alloc] initWithData:[req responseData] encoding:NSUTF8StringEncoding];
    //This is a simple validation. It's only checking if there is a '"status":0' string in the resultString.
    if([resultString rangeOfString:@"\"status\":0"].location != NSNotFound)
      resultStatus = 0;
    
    [resultString release];
    return (resultStatus == 0);
    

    If you need further validation information you have to use a JSON parser and parse the resultString.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My iphone application has in-app purchases and those have been tested using the iTunes
I am developing an application and using in-app purchases in it. i have created
In my application i am using In - App purchases to provide a subscription
I have an application using in-app purchase. Apparently, if the user has a jailbroken
I have created in-app purchase for non-consumable object application in iPhone using with store
I'm using StoreKit for in-app purchases. I'm finding that the API is quirky in
Using Terminal.app on OS X 10.5, often you see the commands get garbled when
I'm using Google App Engine and Django templates. I have a table that I
I have an app using PHP and the PayPal API. The basic way it
I'm writing an app using asp.net-mvc deploying to iis6. I'm using forms authentication. Usually

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.