2016-01-22 32 views
7

Merhaba Paypal API ile iletişim kurmak için Paypal PHP SDK kullanıyorum. Her şeyin iyi çalışmasından 2 gün öncePaypal ssl handshake faliure

. Ama şimdi bu hatayı geliştirme sunucularında alıyorum. talebinde bulunurken

error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

aşağıdaki CURL seçenekleri kullanıyorum:

public static $DEFAULT_CURL_OPTS = array(
    CURLOPT_SSLVERSION => 1, 
    CURLOPT_CONNECTTIMEOUT => 10, 
    CURLOPT_RETURNTRANSFER => TRUE, 
    CURLOPT_TIMEOUT  => 60, // maximum number of seconds to allow cURL functions to execute 
    CURLOPT_USERAGENT  => 'PayPal-PHP-SDK', 
    CURLOPT_HTTPHEADER  => array(), 
    CURLOPT_SSL_VERIFYHOST => 2, 
    CURLOPT_SSL_VERIFYPEER => 1, 
    CURLOPT_SSL_CIPHER_LIST => 'TLSv1', 
); 

Bu sorun sadece her şey gayet iyi çalışıyor canlı moduna SANDBOX modunu kullanarak oluşan.

Her hangi bir vücut bunun neden olduğunu biliyor mu?

Teşekkür ederiz

+0

Bu bağlantılar size yardımcı olabilir .... http: //stackoverflow.com/questions/26385603/facebook-sdk-for-php-error-curlexception-35-error14094410ssl-routinesssl3 2..http: // stackoverflow.com/questions/26379773/paypal-ipn-acknowledgements-failing-with-ssl-routinesssl3-read-bytessslv3-aler –

cevap

3

Aynı hatayı yaşadım.

curl_setopt($ch, CURLOPT_SSLVERSION , 1);

veya

CURLOPT_SSL_SSLVERSION => 1

DÜZENLEME: https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ1766

Sen CURL seçeneklerine bu ekleyerek bunu düzeltebilirsiniz: Bu PayPal yaptık son güncellemeleri nedeniyle olduğunu Komple çalışma ayarları

curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); 
curl_setopt($ch, CURLOPT_POST, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $req); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); 
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); 
curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); 
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); 
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); 
curl_setopt($ch, CURLOPT_SSLVERSION , 1); 
+0

Merhaba, Cevabınız için teşekkür ederim ama bunu daha önce denedim. Verdiğiniz bağlantıya göre sunucumu güncellemem gerektiğini düşünüyorum. –

+0

Sizden emin değilim, bunu kaldırmayı deneyin: CURLOPT_SSL_CIPHER_LIST => 'TLSv1' ve CURLOPT_SSL_SSLVERSION => 1 ekleyin –