New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Default environment as Production for AppStoreServerAPIClient.java, for handling production usecase easily #86
Comments
I propose that we add a similar flag while verifying the signed payload using the
|
@sagar-rai When the app passes signed data to the server, it should also pass the expected environment, negating the need to check which environment is expected. The environment property can be found on-device here https://developer.apple.com/documentation/storekit/transaction/3963920-environment |
@alexanderjordanbaker i completely agree with your point, but i think for maintaining the backward compatibility with the older versions of the app which do not send the signed data but the receipt to the backend, which was earlier used in the In these cases we can still use the Please feel free to close the issue if you think the change is not needed @alexanderjordanbaker , else i can open a pr regarding the same |
Generally, while integrating the app to the production use case, its better to by default use the production api call and switch the endpoint in case the response code is
4040010
. The decoded transaction info will already contain the correct environment, and it will be easier for the end users to integrate the library into their existing code base.This makes the job for the end backend developer easier, as it will not require them to manually switch the context and they can do the separate processing if required for sandbox account based on the response from the client.
The text was updated successfully, but these errors were encountered: