簡體   English   中英

PPHttpConnection.php中的Paypal自適應支付PPConnectionException

[英]Paypal Adaptive Payments PPConnectionException in PPHttpConnection.php

我目前嘗試使用自適應付款sdk實施鏈式付款。 我收到此錯誤

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 = "admin@example.de";

    $receiver[1] = new \PayPal\Types\AP\Receiver();
    $receiver[1]->amount = '2.50';
    $receiver[1]->email = "seller@example.de";
    $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');
    }

我發現的解決方案似乎不起作用...有什么想法嗎? 目前正在從本地主機進行測試。

我不知道實際的解決方案或錯誤原因。

對我來說固定的是在實際的服務器上而不是在本地主機環境中對其進行測試。

我也將軟件包更新為最新版本,因為有關tls的更改很多。 較舊的示例未引用可用的庫。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM