iOS 应用内购买收据:它是什么样子的?

发布于 2024-12-12 08:27:47 字数 105 浏览 4 评论 0原文

SKPaymentTransaction transactionReceipt

我一直在尝试 NSLog 收据,但苹果的测试用户系统目前已损坏。有人有一个例子来说明它是什么样子吗?

SKPaymentTransaction transactionReceipt

I've been trying to NSLog the receipt, but Apple's test user system is broken at the moment. Does anyone have an example of what it looks like?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

晨与橙与城 2024-12-19 08:27:47

这是我的收据信息(出于安全目的,删除了一些内容)

“latest_receipt_info”= {
    出价=“YOURBIDGOESHERE”;
    bvrs =“1.0”;
    “过期日期”= 1321356708000;
    "expires_date_formatted" = "2011-11-15 11:31:48 等/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 等/GMT";
    数量=1;
    “transaction_id”=SOMENUMERICCODE;
};
收据={
    出价=“YOURBIDHERE”;
    bvrs =“1.0”;
    “过期日期”= 1321356398234;
    "expires_date_formatted" = "2011-11-15 11:26:38 等/GMT";
    “item_id”= SOMEIDGOESHERE;
    "original_purchase_date" = "2011-11-15 11:21:40 Etc/GMT";
    “original_transaction_id”= SOMENUMERICCODE;
    “product_id” = SOMEProductID;
    “购买日期” = “2011-11-15 11:21:38 等/GMT”;
    数量=1;
    “transaction_id”=SOMENUMERICCODE;
};

有时您会收到“latest_expired_receipt_info”。

需要注意的一件事是,有时过期日期是不同的。

This is my receipt info (some stuff is removed for security purposes)

"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;
};

Sometimes you get "latest_expired_receipt_info".

One thing to be aware of is that sometimes the expired date is different.

没有心的人 2024-12-19 08:27:47
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

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;

For more information, look here : SKPaymentTransaction

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文