PayPal 自适应付款 - 错误 520009 - 帐户受限 [英] PayPal Adaptive Payments - Error 520009 - Account is restricted

查看:43
本文介绍了PayPal 自适应付款 - 错误 520009 - 帐户受限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果这是一个愚蠢的问题,请提前道歉.我确实尝试过挖掘,但找不到答案.

Apologies in advance if this is a silly question. I did try digging around, but couldn't find an answer.

我正在尝试设置链式支付(在沙盒环境中),但收到错误 520009(帐户受限).尝试了几个电子邮件地址,他们都给我这个错误.电子邮件地址未在 Paypal 注册,但据我所知,这应该不是问题,因为自适应支付模块不要求接收者提前拥有 Paypal 帐户(尽管他们需要帐户才能实际获得资金),当然).

I'm trying to set up a chained payment (at the sandbox environment), but am getting error 520009 (Account is restricted). Tried several email addresses, and they all give me this error. The email addresses are not registered with Paypal, but as far as I know this shouldn't be an issue as the adaptive payments module doesn't require the receivers to have Paypal accounts in advance (though they will need accounts to actually get the money, of course).

我做错了什么?我确实将费用支付者设置为 EACHRECEIVER(按照某些线程的建议),但错误仍然存​​在.

What am I doing wrong? I did set the fee payer to EACHRECEIVER (as suggested on some threads), but the error remains.

这是我得到的:错误代码:520009错误消息:帐户someone1@gmail.com 受到限制

This is what I get back: ERROR Code: 520009 ERROR Message: Account someone1@gmail.com is restricted

这是我的代码:

// Config
$endpoint = trim("https://svcs.sandbox.paypal.com/AdaptivePayments/Pay"); 
$API_UserName = "MY_USERNAME_FROM_SANDBOX";
$API_Password = "MY_PASSWORD_FROM_SANDBOX"; 
$API_Signature = "MY_SIGNATURE_FROM_SANDBOX";
$API_AppID = "APP-80W284485P519543T";    
$API_RequestFormat = "NV";
$API_ResponseFormat = "NV";

    // Create request payload with minimum required parameters
$bodyparams = array (   
        "requestEnvelope.errorLanguage" => "en_US",
        "actionType" => "PAY_PRIMARY",
        "cancelUrl" => 'http://www.beta.com/cancel',
        "returnUrl" => 'http://www.beta.com/return',
        "currencyCode" => 'USD',
        "feesPayer" => "EACHRECEIVER",
        "actionType" => "PAY_PRIMARY",
        "receiverList.receiver[0].email" => 'someone1@gmail.com',
        "receiverList.receiver[0].amount" => '10',
        "receiverList.receiver[0].primary" => 'true', 
        "receiverList.receiver[1].email" => 'someone2@gmail.com',
        "receiverList.receiver[1].amount" => '5',
        "receiverList.receiver[1].primary" => 'false', 
    );

    // Convert payload array into url encoded query string
    $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 . "
" .
        "X-PAYPAL-SECURITY-SIGNATURE: " . $API_Signature . "
" .
        "X-PAYPAL-SECURITY-PASSWORD: " . $API_Password . "
" .
        "X-PAYPAL-APPLICATION-ID: " . $API_AppID . "
" .
        "X-PAYPAL-REQUEST-DATA-FORMAT: " . $API_RequestFormat . "
" .
        "X-PAYPAL-RESPONSE-DATA-FORMAT: " . $API_ResponseFormat . "
" 
        ));

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

    //open the stream and send request
 $fp = @fopen($endpoint, "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);

    //parse the ap key from the response 
$keyArray = explode("&", $response);

    foreach ($keyArray as $rVal){
        list($qKey, $qVal) = explode ("=", $rVal);
            $kArray[$qKey] = $qVal;
    }

    //print the response to screen for testing purposes
If ( $kArray["responseEnvelope.ack"] == "Success") {

         foreach ($kArray as $key =>$value){
        echo $key . ": " .$value . "<br/>";
}
 }
else {
    echo 'ERROR Code: ' .  $kArray["error(0).errorId"] . " <br/>";
  echo 'ERROR Message: ' .  urldecode($kArray["error(0).message"]) . " <br/>";
    }

   } 
catch(Exception $e) {
    echo "Message: ||" .$e->getMessage()."||";
  }

谢谢!

推荐答案

我可以通过删除feesPayer"参数来解决问题,该参数需要是默认值(即 EACHRECEIVER),以防万一单方面付款.

我也被这个问题困扰.

我想知道如何实现单边支付",PayPal是这样描述的:

I wonder how I could achieve a "unilateral payment", which is described by PayPal as follows:

您可以使用Pay API操作进行单边支付有限的情况.单边付款是一种付款给没有贝宝账户的收款人.单边支付可用于隐性或平行支付预先批准.单边支付并非旨在用于需要通过人工审批的链式支付或支付网络流量.当您发送单边付款时,您发送付款包含收件人电子邮件地址的请求,以及此电子邮件地址未链接到已注册的 PayPal 帐户.收件人收到一封电子邮件,通知收件人创建一个帐户和要求付款.PayPal 持有付款给接收者的电子邮件地址尚未注册或确认,直到接收者创建PayPal 帐户并确认电子邮件地址.如果退款指定电子邮件地址尚未注册或确认的接收者,向收款人付款被取消.

You can use the Pay API operation to make unilateral payments under limited circumstances. A unilateral payment is a payment that is made to a receiver who does not have a PayPal account. Unilateral payments can be used with simple or parallel payments that are implicit or preapproved. Unilateral payments are not designed to be used with chained payments or payments that require manual approval through the web flow. When you send a unilateral payment, you send a payment request that includes an email address for a receiver, and this email address is not linked to a registered PayPal account. The receiver receives an email notifying the receiver to create an account and claim the payment. PayPal holds a payment to a receiver whose email address is not yet registered or confirmed until the receiver creates a PayPal account and confirms the email address. If a refund specifies a receiver whose email address is not yet registered or confirmed, the payment to the receiver is canceled.

任何人都知道需要使用 NVP 进行什么参数设置才能实现此目的而不会收到 错误代码:520009 错误消息:帐户 someone1@gmail.com 受到限制

Anyone having an idea what parameter-setting using NVP is required to achieve this without getting ERROR Code: 520009 ERROR Message: Account someone1@gmail.com is restricted

非常感谢任何提示!

这篇关于PayPal 自适应付款 - 错误 520009 - 帐户受限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆