php - Paypal 错误错误代码: 580022 paypal adaptive parallel payment

标签 php paypal paypal-adaptive-payments

我正在尝试使用 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 

任何人请帮助。

最佳答案

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

关于php - Paypal 错误错误代码: 580022 paypal adaptive parallel payment,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19276743/

相关文章:

php - fopen() 是否受文件系统限制?

php - 使用 Paypal 沙盒逐步创建结帐表单 (PHP)

Paypal 错误 580029 缺少订阅所需的参数之一

javascript - 根据下拉框值统计MySql数据

php - codeigniter 中的浏览器缓存问题

PHP CMS 登录黑客

Android Autofill 仅处理来自 onFillRequest 的响应,而不处理来自 Authentication Activity 的响应

android - 使用 Xamarin 的 Paypal REST API

javascript - PayPal 灯箱无法在 iPhone safari/网络应用程序中打开; 'win.location' 未定义

paypal - 如何更好地为 3rd 方卖家集成 Paypal "Buy Now"按钮?