iOS PHP 인앱 구매 영수증 서버 검증 예제

2016-05-16

iOS side ```objc //iOS -(void)serverVerification:(SKPaymentTransaction*)transaction andRestore:(BOOL)isRestore { NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults]; NSString *user_id = [userDefault objectForKey:@”uid”]; NSString *item_id = transaction.payment.productIdentifier;

// 추가된 order_id(구글과 맞추기 위해서 용어를 변경하였다.)
NSString *order_id;
int restore = 0;
if(isRestore == YES) {
    order_id = transaction.originalTransaction.transactionIdentifier;
    restore = 1;
}
else {
    order_id = transaction.transactionIdentifier;
}
Read More