SKPaymentTransaction transactionReceipt
我一直在尝试NSLog收据,但Apple的测试用户系统目前已被打破。有没有人举例说明它的样子?
答案 0 :(得分:4)
这是我的收据信息(出于安全目的删除了一些内容)
"latest_receipt_info" = { bid = "YOURBIDGOESHERE"; bvrs = "1.0"; "expires_date" = 1321356708000; "expires_date_formatted" = "2011-11-15 11:31:48 Etc/GMT"; "item_id" = SOMEIDGOESHERE; "original_purchase_date" = "2011-11-15 11:21:40 Etc/GMT"; "original_transaction_id" = SOMENUMERICCODE; "product_id" = SOMEPRODUCTID; "purchase_date" = "2011-11-15 11:26:48 Etc/GMT"; quantity = 1; "transaction_id" = SOMENUMERICCODE; }; receipt = { bid = "YOURBIDHERE"; bvrs = "1.0"; "expires_date" = 1321356398234; "expires_date_formatted" = "2011-11-15 11:26:38 Etc/GMT"; "item_id" = SOMEIDGOESHERE; "original_purchase_date" = "2011-11-15 11:21:40 Etc/GMT"; "original_transaction_id" = SOMENUMERICCODE; "product_id" = SOMEPRODUCTID; "purchase_date" = "2011-11-15 11:21:38 Etc/GMT"; quantity = 1; "transaction_id" = SOMENUMERICCODE; };
有时你得到“latest_expired_receipt_info”。
有一点需要注意的是,有时过期日期会有所不同。
答案 1 :(得分:0)
SKPaymentTransaction *transaction;
// state of transaction:
int state = transaction.transactionState; // can be equal to SKPaymentTransactionStatePurchasing || SKPaymentTransactionStateFailed || SKPaymentTransactionStatePurchased || SKPaymentTransactionStateRestored
// corresponding product id
NSString *prId = transaction.payment.productIdentifier;
有关详细信息,请查看此处:SKPaymentTransaction