我正在实施应用程序内购买。我正在苹果沙箱中完成交易,并且当我验证收据时苹果正在返回response = 0
,但我的问题是我在哪里看收到成功付款。哪个电子邮件ID我将收到“你收到user1的金额”的邮件。 ?或者我应该看看itune连接?
这是我接收回复的代码:
- (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];}
答案 0 :(得分:0)
您需要查看iTunes Connect。 Apple会在月份结束后的某个时间按地区(他们将发送给注册帐户管理员)生成报告。
这些报告有点不透明,不会为您提供特定的设备uniqueIdentifiers。