Мы используем letsencrypt с Nginx для SSL.
Мы используем letsencrypt с Nginx для SSL.
Мы используем letsencrypt с Nginx. p>
Когда мы вызываем URL-адрес PayPal для процесса оплаты на https://api-m.sandbox.paypal.com/, приложение выдает ошибку, говоря:
Код: Выделить всё
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.
Код: Выделить всё
bool RemoteCertificateValidationCallback(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
// Always return true to bypass SSL certificate validation
sslPolicyErrors = SslPolicyErrors.None;
return true;
}
// Set the certificate validation callback before making the API call
ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(RemoteCertificateValidationCallback);
Заранее большое спасибо.
Подробнее здесь: https://stackoverflow.com/questions/784 ... -dotnet-li