payment regarding in-app purchase

Tag: in-app-purchase , in-app-billing Author: wangshu1989 Date: 2011-09-11

i was implementing the in-app purchase.All i am doing in a apple sandbox i have done transaction completely and also apple is returning the response = 0 when i verify the receipt, but my question is where do i look for successful payment received. Which email id i will get mails like "you have received the amount from user1". ? or should i look to itune connect? here is my code for receiving response:

- (BOOL)verifyReceipt:(SKPaymentTransaction *)transaction {
    NSString *jsonObjectString = [self encode:(uint8_t *)transaction.transactionReceipt.bytes length:transaction.transactionReceipt.length];      
    NSString *completeString = [NSString stringWithFormat:@"http://test.clientarea.in/WS/two.php?receipt=%@", jsonObjectString];                               
    NSLog(@"completestring%@",jsonObjectString);
    NSURL *urlForValidation = [NSURL URLWithString:completeString];               
    NSMutableURLRequest *validationRequest = [[NSMutableURLRequest alloc] initWithURL:urlForValidation];                          
    [validationRequest setHTTPMethod:@"GET"];             
    NSData *responseData = [NSURLConnection sendSynchronousRequest:validationRequest returningResponse:nil error:nil];  
    [validationRequest release];
    NSString *responseString = [[NSString alloc] initWithData:responseData encoding: NSUTF8StringEncoding];

    NSInteger response = [responseString integerValue];
    NSLog(@"response string...%d",response);
    [responseString release];
    return (response == 0);
}

- (NSString *)encode:(const uint8_t *)input length:(NSInteger)length {
    static char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

    NSMutableData *data = [NSMutableData dataWithLength:((length + 2) / 3) * 4];
    uint8_t *output = (uint8_t *)data.mutableBytes;

    for (NSInteger i = 0; i > 18) & 0x3F];
        output[index + 1] =                    table[(value >> 12) & 0x3F];
        output[index + 2] = (i + 1) > 6)  & 0x3F] : '=';
        output[index + 3] = (i + 2) > 0)  & 0x3F] : '=';
    }

    return [[[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding] autorelease];}

Other Answer1

You need to look in iTunes Connect. Apple generates reports by region (which they will send out to the registered account admin) some time after the month closes.

These reports are a bit opaque and will not give you specific device uniqueIdentifiers.