0

我尝试使用代码验证 pay pal 邮件地址

$this->_errors = array();
        if (empty($method)) {
            $this->_errors = array('Method does not exist');
            return false;
        }

    $requestParams = array(
        'METHOD' => $method,
        'VERSION' => $this->_version
    ) + $this->_credentials;

    if (is_array($params)) {
        $request = http_build_query($requestParams + $params);
    } else {
        $request = http_build_query($requestParams) . $params;
    }

    $curlOptions = array (
        CURLOPT_URL            => $this->_endPoint,
        CURLOPT_VERBOSE        => 1,
        CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_SSL_VERIFYHOST => false,
        CURLOPT_CAINFO         => $this->_certificate,
        CURLOPT_RETURNTRANSFER => 1,
        CURLOPT_POST           => 1,
        CURLOPT_POSTFIELDS     => $request
    );

    $ch = curl_init();
    curl_setopt_array($ch, $curlOptions);
    $response = curl_exec($ch);

代码是正确的-它可以在另一个项目上运行,但是当我尝试从 paypal API 调用 AddressVerify 方法时,出现 10002 错误-“您无权进行此 API 调用”。我使用“ https://api-3t.paypal.com/nvp ”地址进行连接,但仍然存在该错误。有人知道我需要做什么吗?

4

1 回答 1

0

The AddressVerify API call is not enabled on every account by default. If this is for the sandbox, if you can provide me with the email address of the test sandbox seller account that you wish to have this enabled for, I can enable it on your account. If this is for a live account, you would need to contact PayPal Merchant Services and submit a request to have this enabled.

于 2013-05-20T11:46:11.297 回答