2016-05-02 7 views
0

現在、アダプティブペイメントSDTを使用して連鎖支払いを実装しようとしています。私はPaypalアダプティブペイメントPPHttpConnection.phpのPPConnectionException

PPConnectionException in PPHttpConnection.php line 91: 
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure 

私のサンプルコードが...私が見つけた解決策が動作していないようです。この

$payRequest = new \PayPal\Types\AP\PayRequest(); 

    $receiver = array(); 
    $receiver[0] = new \PayPal\Types\AP\Receiver(); 
    $receiver[0]->amount = '7.50'; 
    $receiver[0]->email = "[email protected]"; 

    $receiver[1] = new \PayPal\Types\AP\Receiver(); 
    $receiver[1]->amount = '2.50'; 
    $receiver[1]->email = "[email protected]"; 
    $receiver[1]->primary = "true"; 
    $receiverList = new \PayPal\Types\AP\ReceiverList($receiver); 
    $payRequest->receiverList = $receiverList; 

    $requestEnvelope = new \PayPal\Types\Common\RequestEnvelope("de_DE"); 
    $payRequest->requestEnvelope = $requestEnvelope; 
    $payRequest->actionType = "PAY"; 
    $payRequest->cancelUrl = "http://example.de:8080/payment/cancel"; 
    $payRequest->returnUrl = "http://example.de:8080?returned"; 
    $payRequest->currencyCode = "EUR"; 
    $payRequest->ipnNotificationUrl = "http://example.de:8080"; 

    $sdkConfig = array(
     'mode' => 'sandbox', 
     "acct1.UserName" => "jb-us-seller_api1.paypal.com", 
     "acct1.Password" => "WX4WTU3S8MY44S7F", 
     "acct1.Signature" => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy", 
     "acct1.AppId" => "APP-80W284485P519543T" 
    ); 

    $adaptivePaymentsService = new \PayPal\Service\AdaptivePaymentsService($sdkConfig); 
    $payResponse = $adaptivePaymentsService->Pay($payRequest); 

    if ($payResponse->responseEnvelope->ack == "Success") 
    { 
     redirect('Location: ' . 'https://sandbox.paypal.com/webscr?cmd=_ap-payment&paykey=' . $payResponse->payKey); 
    } 
    else{ 
     die('error'); 
    } 

のように任意のアイデアを探します。このエラーが発生しますか?現在localhostからテスト中です。

答えて

0

私は実際の解決策やエラーの原因を認識していません。

ローカルホスト環境ではなく、実際のサーバでテストしてみました。

また、tlsに関して多くの変更があったので、パッケージを最新バージョンに更新しました。これまでの例では作業用ライブラリを参照していません。

関連する問題