Reputation: 319
I am using the Apple IAP. I want to add some addtional paprameters like the user id, the server id, and the money of a product when requesting a payment using the StoreKit
:
NSDictionary* requestDataDic = @{ @"userId": userId, @"serverId": serverId, @"money": money };
NSData* requestData = [NSJSONSerialization dataWithJSONObject:requestDataDic
options:NSJSONWritingPrettyPrinted
error:nil];
SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:productIdentifier];
payment.requestData = requestData;
if ([SKPaymentQueue defaultQueue]) {
[[SKPaymentQueue defaultQueue] addPayment:payment];
}
However, after my server side has validate the receipt, it doesn't receive the information which was sended to the Apple Server in the requestData
. Did I misunderstand the usage of the requestData
?
Upvotes: 1
Views: 598