![apple sandbox test cards apple sandbox test cards](http://what-when-how.com/wp-content/uploads/2011/08/tmp8011.jpg)
Using (var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json")) Var jsonPayload = JsonConvert.SerializeObject(payload)
![apple sandbox test cards apple sandbox test cards](https://embeddedcomputing.weebly.com/uploads/1/1/6/2/11624344/8597997_orig.jpg)
Using (var httpClient = CreateHttpClient(certificate)) for two-way TLS authentication over HTTPS. Create an HTTP client with the merchant certificate Create the JSON payload to POST to the Apple Pay merchant validation URL.ĭomainName = .,ĭisplayName = "" Var merchantIdentifier = GetMerchantIdentifier(certificate) Get the merchant identifier from the certificate to send in the validation payload. Var certificate = LoadMerchantCertificate() Load the merchant certificate for two-way TLS authentication with the Apple Pay server. Public async Task GetApplePaySession( string url)
#APPLE SANDBOX TEST CARDS CODE#
You can find the github repo of the source I used here (), but here is my code that I needed to put in my solution to make things work (I also had to export my merchant certificate from my mac's keychain that gave me a. Additionally, we have to include the merchant id certificate in our request to apple (which isn't mentioned in the docs very well). net 4.6, and also forced tls 1.2 for our request. net 4.5, which does not use tls 1.2 by default (apple requires tls 1.2 to be used). There are a few things that needed to happen. Enabling TLS 1.2 and disabling TLS 1.0 fixed the issue - Win 2008
![apple sandbox test cards apple sandbox test cards](https://j4i2w7h7.stackpathcdn.com/wp-content/uploads/2018/06/Achaem-game-download.gif)
The issue was that our server did not have TLS 1.2 enabled by default. If you look at the ServerHello message, you can see the server found and accepted the cipher suite that matches the client, which also matches one of the required ciphers that apple pay supports , so something else is going on and I don't know where to look As you can see from my image, I'm communicating to the apple pay sandbox server, passing in the same supported tls protocol and cipher suite that the error would suggest -> Phase, after the server sends back the cipher spec to the client. I've been using Wireshark to check what's going on, and I seem to be failing once the server is in the Server does support tls 1.2, since I send requests on tls 1.2 to apple pay's development server (below) Your server must support the Transport Layer Security (TLS) 1.2 protocol and one of the cipher suites listed in Table 1. To enable merchant validation, your server must allow access over HTTPS (TCP over port 443) to the Apple Pay IP addresses provided in Listing 1 below.ĭone, server is open to all ips on port 443 As listed on the apple page (), I need the following requirements met:Īll pages that include Apple Pay must be served over HTTPS. I've dug around and this 500 error is happening somewhere in the network layer. Server then calls the Start Session endpoint at the provided URL I am having trouble validating the merchant in my apple pay sandbox environment.