Code Monkey home page Code Monkey logo

Comments (5)

richzw avatar richzw commented on July 29, 2024

First, during the review, it should be the orders in the production environment.

Secondly, 21007 is the return value that has been deprecated for the interface Verify.

And for the interface GetTransactionInfo, the distinction between whether it is a production environment is based on the URL.

HostSandBox    = "https://api.storekit-sandbox.itunes.apple.com"
HostProduction = "https://api.storekit.itunes.apple.com"

Based on the documentation of error codes https://developer.apple.com/documentation/appstoreserverapi/error_codes, there is no 21007. @kkfrank2

from go-iap.

kkfrank2 avatar kkfrank2 commented on July 29, 2024

多谢及时回复。
审核期间,apple用什么环境验单有文档吗。我从之前的文档中看,他们是用的sandbox环境验单(可能已经deprecated)。
https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase/validating_receipts_with_the_app_store?language=objc

Use the test environment URL https://sandbox.itunes.apple.com/verifyReceipt when testing your app in the sandbox and while your app is in review

然后最新的文档中我并没有找到审核期间用的什么环境,不过文档中说
(https://developer.apple.com/documentation/appstoreserverapi?language=objc)

If you don’t have environment information, follow these steps:

  1. Call the endpoint using the production URL. If the call succeeds, the transaction identifier belongs to the production environment.
  2. If you receive an error code 4040010 TransactionIdNotFoundError, call the endpoint using the sandbox environment.

那我是不是可以在call GetTransactionInfo的时候,处理下4040010,如果在prod没找到transaction,再去sanbox环境去找
@richzw

from go-iap.

richzw avatar richzw commented on July 29, 2024

多谢及时回复。 审核期间,apple用什么环境验单有文档吗。我从之前的文档中看,他们是用的sandbox环境验单(可能已经deprecated)。 https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase/validating_receipts_with_the_app_store?language=objc

Use the test environment URL https://sandbox.itunes.apple.com/verifyReceipt when testing your app in the sandbox and while your app is in review

Sorry for misunderstanding your question before. I thought your question was about the sandbox receipt validation in the production environment. IMO, since whether the sandbox order is used in the review mode in the document, both the sandbox receipt and non-sandbox receipt should be verified on the server side.

然后最新的文档中我并没有找到审核期间用的什么环境,不过文档中说 (https://developer.apple.com/documentation/appstoreserverapi?language=objc)

If you don’t have environment information, follow these steps:

  1. Call the endpoint using the production URL. If the call succeeds, the transaction identifier belongs to the production environment.
  2. If you receive an error code 4040010 TransactionIdNotFoundError, call the endpoint using the sandbox environment.

那我是不是可以在call GetTransactionInfo的时候,处理下4040010,如果在prod没找到transaction,再去sanbox环境去找

Yes, you are right. You can follow the documentation to implement it.

from go-iap.

kkfrank2 avatar kkfrank2 commented on July 29, 2024

多谢。不过感觉苹果这个机制好low 😂。 @richzw 文档里或许可以补充说明一下,让大家少踩坑(虽然他们审核的时候不一定能测到iap相关的功能..)

from go-iap.

richzw avatar richzw commented on July 29, 2024

多谢。不过感觉苹果这个机制好low 😂。 @richzw 文档里或许可以补充说明一下,让大家少踩坑(虽然他们审核的时候不一定能测到iap相关的功能..)

That's a great suggestion. Let me add it to the documentation. Thank you very much for your suggestion.

from go-iap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.