3

私は、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
)

私が使用しているコード..

$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);

しかし、私はこのエラーが発生しています:

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

誰でも助けてください。

4

1 に答える 1

0

エラー応答を受け取ったら、デバッグ/相関 ID を教えてください。エラーメッセージは、リクエストに受信者リストがまったくないことを示しています。これは、受信者を含むリクエストと矛盾しています。

于 2013-10-22T04:35:39.727 に答える