apple / app-store-server-library-node

MIT License
181 stars 37 forks source link

docs: add verification through gettransctioninfo api sample #80

Closed richzw closed 8 months ago

richzw commented 9 months ago

Add one sample codes per this doc https://developer.apple.com/documentation/appstoreserverapi#3820693

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.

  • If the call succeeds, the transaction identifier belongs to the sandbox environment. If the call fails with the same error code, the transaction identifier isn’t present in either environment.

alexanderjordanbaker commented 9 months ago

@richzw We want to focus the README on the various features of the library and not so much potential use cases of the library. As well, in this specific case, our recommendation would be to use the SignedDataVerifier directly to verify the signed JWS from the device, or use an environment passed from the device if that isn't available. The above flow would only be needed if neither of those paths were available.

richzw commented 9 months ago

@alexanderjordanbaker, thank you very much for your detailed explanation.

alexanderjordanbaker commented 8 months ago

Closing based on discussion, please reopen if further discussion is needed