iOS 应用内购买收据未返回重新下载的original_purchase_date

发布于 2025-01-08 05:47:04 字数 1350 浏览 1 评论 0原文

我正在尝试根据 original_purchase_date 和/或 original_transaction_id 使用 iOS 商店收据来区分购买和重新下载。无论交易是新购买还是重新下载,商店收据始终返回一个新的 original_purchase_date,它等于 purchase_date 值。

这是我收到的真实商店收据(这是现有应用内购买的重新下载 - 因为我目前必须依靠 UDID 跟踪来区分它们),

{
  "product_id": "com.myproduct.id",
  "original_purchase_date_ms": "1329825956382",
  "purchase_date_ms": "1329825956382",
  "original_purchase_date": "2012-02-21 12:05:56 Etc/GMT",
  "purchase_date":          "2012-02-21 12:05:56 Etc/GMT",
  "bvrs": "1.0",
  "original_purchase_date_pst": "2012-02-21 04:05:56 America/Los_Angeles",
  "purchase_date_pst":          "2012-02-21 04:05:56 America/Los_Angeles",
  "original_transaction_id": "1000000028387131",
  "transaction_id":          "1000000028387131",
  "item_id": "452671574",
  "quantity": "1",
  "bid": "com.mybundle.id"
}

无论我是否使用沙箱 URL 并使用测试 itunes 连接帐户,或者是否使用实时 URL 进行收据验证的实时购买,这些值始终相同:

original_purchase_date_ms  ==  purchase_date_ms
original_purchase_date == purchase_date
original_purchase_date_pst == purchase_date_pst
original_transaction_id == transaction_id

我是否错误地认为这些是您应该用来区分新购买和重新下载之间的区别相同购买?显然,跟踪设备的 UDID/制作应用程序 GUID 并跟踪它是一种方法,但它不够准确(例如拥有多个设备的用户)

是否还有其他人遇到这些值始终相同的问题?

非常感谢对此的任何帮助!我已经用尽了所有其他路线,希望这里有人知道答案。

I am trying to use the iOS store receipt to tell the difference between a purchase and a redownload, based on the original_purchase_date and/or original_transaction_id . Regardless of whether a transaction is a new purchase or a redownload, the store receipt always returns a new original_purchase_date which is equal to the purchase_date value.

Here is a real store receipt I got back (which is a redownload of an existing in app purchase - as I am currently having to rely on UDID tracking to tell them apart)

{
  "product_id": "com.myproduct.id",
  "original_purchase_date_ms": "1329825956382",
  "purchase_date_ms": "1329825956382",
  "original_purchase_date": "2012-02-21 12:05:56 Etc/GMT",
  "purchase_date":          "2012-02-21 12:05:56 Etc/GMT",
  "bvrs": "1.0",
  "original_purchase_date_pst": "2012-02-21 04:05:56 America/Los_Angeles",
  "purchase_date_pst":          "2012-02-21 04:05:56 America/Los_Angeles",
  "original_transaction_id": "1000000028387131",
  "transaction_id":          "1000000028387131",
  "item_id": "452671574",
  "quantity": "1",
  "bid": "com.mybundle.id"
}

Regardless of whether I'm using the sandbox URL and testing with a test itunes connect account, or whether its a live purchase using the live URL for receipt verification, these values are always identical:

original_purchase_date_ms  ==  purchase_date_ms
original_purchase_date == purchase_date
original_purchase_date_pst == purchase_date_pst
original_transaction_id == transaction_id

Am I wrong in thinking that these are what you should use to tell the difference between a new purchase and a redownload of the same purchase? Obviously tracking the UDID of the device / making a app GUID and tracking that, is one way to do it but its not accurate enough (e.g. users who have multiple devices)

Does anyone else have this problem where these values are ALWAYS identical?

Any help on this is much appreciated! I've exhausted all other routes and hoping someone on here knows the answer.

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

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

发布评论

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

评论(1

哥,最终变帅啦 2025-01-15 05:47:04

这取决于您所说的“重新下载”的含义。

仅当您恢复购买时,original_purchase_date 才应与 purchase_date 不同,因此 SKPaymentTransaction 会返回 SKPaymentTransactionStateRestored。如果是这样的话,那就有问题了。

否则,例如,如果您要重新购买消耗品,这些日期将始终相同,并且一切正常。

It depends on what you mean by "redownload".

The original_purchase_date should differ from purchase_date only when you are restoring your purchase, so the SKPaymentTransaction returns you SKPaymentTransactionStateRestored. If it's the case, there's something wrong.

Otherwise, for example, if you are repurchasing a consumable purchase, theese dates will be the same all the time, and everything's ok.

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