I'm trying to create a lib that will verify StoreKit receipts connecting straight to Apples servers, without a 3rd party server. This is possible since Apple recommends you first verify against the production server http://buy.itunes.apple.com/verifyReceipt and if that fails with code 21007, try the sandbox server https://sandbox.itunes.apple.com/verifyReceipt.
However, I'm stuck at receiving the error "Could not connect to the server." for the production server, or "The network connection was lost." from the sandbox server.
If i send the same exact post data to either of the URLs using Hurl.it, i get the correct responses.
Am I doing something wrong, or is this simply blocked by Apple to force you to use a middle man server to verify receipts? And if so, why?
Thanks
Maciej