1
SKPaymentTransaction transactionReceiptiOS應用內購買收據:它看起來像什麼?
我一直在試圖NSLog收據,但蘋果的測試用戶系統此刻被破壞。有沒有人有它的樣子的例子?
SKPaymentTransaction transactionReceiptiOS應用內購買收據:它看起來像什麼?
我一直在試圖NSLog收據,但蘋果的測試用戶系統此刻被破壞。有沒有人有它的樣子的例子?
這是我收到的信息(有些東西是出於安全目的刪除)
"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」 。
有一點需要注意的是,有時過期日期是不同的。
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
我真的想知道是否有人知道收據的字符串輸出是什麼樣子。 –