While testing In-App-Purchase in the SANDBOX ENVIRONMENT on the device, I\'m logging the following error :
Error Domain=SKErrorDomain Code=0 \"Cannot connect
Maybe the Sandbox servers are down.
I am able to get product info but I get the same error when requesting a purchase
I checked the Apple Developer Forums and more people are having the same issue. https://devforums.apple.com/index.jspa
I hope this saves someone some time some day, as I've spent 4 hours around this.
It also happens if you are logged in with some other iTunes Account. To test the In App purchase in Sandbox box you need to log out from any other account from Setting. Then launch your application and Do in App Purchase. When your account is asked enter the one you created as iTunes Test Account. This way your Sandbox environment would work perfectly. Hope this would be helpful.
This may be ridiculous, but -- if you're certain your code is correct -- do a hard reset (full wipe) of your iPod (Settings => General => Reset => Erase All Content and Settings).