Is there any way to create a sandox-specific shared secret for Apple App Store receipt validation?
Asked Answered
M

1

7

I'm getting set up to do validations of App Store in-app purchase receipts from my server, and everything seems to be working fine, except I don't see any way to create separate shared secrets for Apple's Sandbox and Production environments.

I'd like the shared secrets to be separate so that I can safely put the Sandbox one in config files in code repositories, for unit tests, for example. I would keep the Production shared secret only in the config files in our Production environment.

I can't seem to find any way to do this. Am I just missing something?

Maxon answered 20/5, 2018 at 17:40 Comment(0)
E
0

App secret works for both sandbox or production the thing which changes the environment for testing is URL try this.

#if DEBUG
    let urlString = "https://sandbox.itunes.apple.com/verifyReceipt"
#else 
    let urlString = "https://buy.itunes.apple.com/verifyReceipt"
#endif
Erlina answered 14/1, 2022 at 12:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.