Why does tlstest.paypal.com work from browser but not from my PHP code (useful for Paypal IPN)?

后端 未结 2 714
清歌不尽
清歌不尽 2021-01-17 05:58

After 2018 June 30th, Paypal won\'t accept non-TLS 1.2 + HTTP 1.1 requests anymore.
They created the URL https://tlstest.paypal.com/ to test if connections are OK. If we

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-17 06:36

    For completeness, here is a working code (full credit to PatrickMevzek's answer):

    
    

    Here is the answer from server:

    # php -f test.php
    HTTP/1.1 200 OK
    Content-Type: text/html
    Content-Length: 20
    Date: Fri, 22 Jun 2018 20:19:56 GMT
    Connection: keep-alive
    
    PayPal_Connection_OK
    

提交回复
热议问题