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?

mahal tertin
  • 3,239
  • 24
  • 41
Brian Rak
  • 4,912
  • 6
  • 34
  • 44

1 Answers1

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
AliRehman7141
  • 873
  • 3
  • 12
  • 33