paypal错误错误代码:580022 paypal自适应并行支付

时间:2022-10-14 14:09:10

I am trying to make parallel payment using palypal adaptive API. I am sending this array.

我正在尝试使用palypal自适应API进行并行付款。我发送这个数组。

Array
(
    [requestEnvelope.errorLanguage] => en_US
    [actionType] => PAY
    [cancelUrl] => http://www.consumersinchrist.org/
    [returnUrl] => http://www.consumersinchrist.org/
    [currencyCode] => USD
    [receiverList.receiver(0).email] => xxx@gxxil.com
    [receiverList.receiver(0).amount] => 3.00
    [receiverList.receiver(1).email] => sxxh.banerjee@xxe.com
    [receiverList.receiver(1).amount] => 56.00
)

The code I am using..

我正在使用的代码..

$body_data = http_build_query($bodyparams, "", chr(38));


                    try
                    {

                    //create request and add headers
                    $params = array("http" => array(
                    "method" => "POST",
                    "content" => $body_data,
                    "header" => "X-PAYPAL-SECURITY-USERID: " . $API_UserName . "\r\n" .
                    "X-PAYPAL-SECURITY-SIGNATURE: " . $API_Signature . "\r\n" .
                    "X-PAYPAL-SECURITY-PASSWORD: " . $API_Password . "\r\n" .
                    "X-PAYPAL-APPLICATION-ID: " . $API_AppID . "\r\n" .
                    "X-PAYPAL-REQUEST-DATA-FORMAT: " . $API_RequestFormat . "\r\n" .
                    "X-PAYPAL-RESPONSE-DATA-FORMAT: " . $API_ResponseFormat . "\r\n"
                    ));


                    //create stream context
                    $ctx = stream_context_create($params);


                    //open the stream and send request
                    $fp = @fopen($url, "r", false, $ctx);

                    //get response
                    $response = stream_get_contents($fp);

                    //check to see if stream is open
                    if ($response === false) {
                    throw new Exception("php error message = " . "$php_errormsg");
                    }

                    //close the stream
                    fclose($fp);

But I am getting this error:

但是我收到了这个错误:

ERROR Code: 580022 
ERROR Message: Invalid request parameter: receiverList cannot be null 

Anyone please help.

有人请帮忙。

1 个解决方案

#1


0  

Can you please share the debug/correlation id when you get the error response ? The error message indicates that you request does not have receiver list at all which is contradictory to your request which has the receivers.

当您收到错误响应时,能否分享调试/关联ID?错误消息表明您请求没有接收器列表,这与您的具有接收器的请求相矛盾。

#1


0  

Can you please share the debug/correlation id when you get the error response ? The error message indicates that you request does not have receiver list at all which is contradictory to your request which has the receivers.

当您收到错误响应时,能否分享调试/关联ID?错误消息表明您请求没有接收器列表,这与您的具有接收器的请求相矛盾。