TLS issue when calling board APIs from my local env

I am implementing Stripe payment gateway in sandbox mode. I have a built-in verification process, as well as a token created, which is used by the server to call the API to create fees.

API Version Used: stripe.api_version = '2017-06-05'

charge = stripe.Charge.create(
   amount=1000,
   currency="usd",
   description="Example charge",
   source=token,
)

When I call this charge, create an api, I get the following error:

b '{\ n "error": {\ n "type": "invalid_request_error", \ n
"message": "Stripe no longer supports API requests made using TLS 1.0. Please initiate HTTPS connections with TLS 1.2 or more later version. You can learn more about this at https://stripe.com/blog/upgrading-tls . " \ n} \ n} \ n '

API- , , :

POST: https://api.stripe.com/v1/charges

?

AWS, .

+4
1

Python OpenSSL, TLS 1.2. :

$ python -c "import ssl; print(ssl.OPENSSL_VERSION)"

TLS 1.2 OpenSSL 1.0.1 .

OS X, - Homebrew :

$ brew update && brew upgrade && brew install openssl && brew install python

python python3 , Python 3.

+4

Source: https://habr.com/ru/post/1691103/


All Articles