Comments (5)
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.
多谢及时回复。
审核期间,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:
- Call the endpoint using the production URL. If the call succeeds, the transaction identifier belongs to the production environment.
- 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.
多谢及时回复。 审核期间,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:
- Call the endpoint using the production URL. If the call succeeds, the transaction identifier belongs to the production environment.
- 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.
多谢。不过感觉苹果这个机制好low 😂。 @richzw 文档里或许可以补充说明一下,让大家少踩坑(虽然他们审核的时候不一定能测到iap相关的功能..)
from go-iap.
多谢。不过感觉苹果这个机制好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)
- Cannot get token from ParseNotificationV2 func HOT 7
- When using App Store Server API, is get_transaction_info enough for a consumable product verification? HOT 1
- Deprecated verifyreceipt appstore HOT 10
- Can we have a webhook called on verification? HOT 3
- Problem with transaction verification HOT 5
- Consider embed jwt.RegisteredClaims to SubscriptionNotificationV2DecodedPayload? HOT 3
- Hope to provide a function to decode JWSRenewalInfo HOT 3
- Consider add error type for request apple store api HOT 1
- PriceIncreaseStatus in JWSRenewalInfoDecodedPayload should be *int32 HOT 6
- Consider implement jwt.Cliams for the structure in path appstore HOT 1
- When encountering overly large receipt data, the returned JSON will be truncated, resulting in JSON validation failure HOT 9
- question related to the naming of playstore VeirfyProduct and VerifySubscriptionV2 methods HOT 2
- AutoRenewStatus const type HOT 1
- 苹果解析ParseSignedTransaction,为什么没有Price HOT 1
- Wrong type of consumptionState field HOT 1
- how to parse transaction id by receipt ?? HOT 3
- offerDiscountType is missing in JWSTransactionDecodedPayload HOT 2
- Is there more detail error msg when verify google iap HOT 4
- can not connect https://oauth2.googleapis.com/token HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-iap.