【问题标题】:App Store Server API: both transaction history and lookup customer order id return 404App Store 服务器 API:交易历史记录和查找客户订单 ID 均返回 404
【发布时间】:2021-07-19 12:22:57
【问题描述】:

我们可以通过这个(API)[https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history]获取客户​​的交易历史记录

https://api.storekit.itunes.apple.com/inApps/v1/history/{transactionid}

并通过wwdc21 的客户订单 ID 获取购买交易

https://api.storekit.itunes.apple.com/inApps/v1/lookup/customer_order_id

但是,我们得到了 404,这两个 API 的响应正文为空,curl 响应为

* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 404
< server: daiquiri/3.0.0
< date: Mon, 19 Jul 2021 12:03:24 GMT
< content-length: 0
< x-apple-jingle-correlation-key: EJJPZLFC7B3NTSO3PLZNUVVIXY
< x-apple-request-uuid: 2252fcac-a2f8-76d9-c9db-7af2da56a8be
< b3: 2252fcaca2f876d9c9db7af2da56a8be-ad831e3618544a32
< x-b3-traceid: 2252fcaca2f876d9c9db7af2da56a8be
< x-b3-spanid: ad831e3618544a32
< apple-seq: 0.0
< apple-tk: false
< apple-originating-system: CommerceGateway
< x-responding-instance: CommerceGateway:010116:::
< apple-timing-app: 0 ms
< strict-transport-security: max-age=31536000; includeSubDomains
< x-daiquiri-instance: daiquiri:45824002:st44p00it-hyhk15104701:7987:21HOTFIX14
<

如何调试这个问题或我遗漏了什么?

更新

此 API inApps/v1/lookup 将于今年在每个应用商店中发布。

【问题讨论】:

  • 我不认为这是答案,但以防万一:如果您请求沙盒订阅,您应该使用“api.storekit-sandbox.itunes.apple.com”基本网址,如下所述:developer.apple.com/documentation/appstoreserverapi
  • 您是否有响应的正文,您应该获得有关 404 的更多信息:例如,4040001 表示 AccountNotFoundError4040005 表示 OriginalTransactionIdNotFoundError,...(参见文档:developer.apple.com/documentation/appstoreserverapi/…,靠近 404 部分)
  • @romainsalles,我们尝试读取响应正文,但是,响应正文为空。太奇怪了。
  • @romainsalles,我们通过产品购买对其进行测试,因此使用 api.storekit.itunes.apple.com
  • 确实:content-length: 0 在响应标头中。是的,这就是我的想法:如果您已经完成所有工作来生成 JWT,这意味着您已经看到有 2 个基本 url ^^' 但是......我们永远不知道 :)

标签: ios in-app-purchase app-store-connect storekit


【解决方案1】:

目前看来这个API只能在沙盒环境下使用:

source

这就是为什么你有一个通用的404 错误,我想没有任何响应的正文。

【讨论】:

  • 感谢您的回答。错过了这个重要的讨论,我的错...
  • 沙盒环境中好像没有客户订单id,所以我们无法在沙盒中测试这个APIinApps/v1/lookup
猜你喜欢
  • 2021-06-28
  • 1970-01-01
  • 2019-09-27
  • 2023-03-14
  • 1970-01-01
  • 1970-01-01
  • 2016-04-10
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多