【问题标题】:Why is PayPal GetVerifiedStatus API not working for certain account为什么 PayPal GetVerifiedStatus API 不适用于某些帐户
【发布时间】:2016-08-04 05:42:47
【问题描述】:

我正在使用this 库通过电子邮件 ID 验证 PayPal 用户。我使用的 API 是 GetVerifiedStatus。该库的开发人员在代码中提供了一个电子邮件地址,它工作正常。该代码将他的电子邮件 ID 的状态返回为“已验证”。

但是,每当我尝试使用我的电子邮件 ID 时,它都会显示“无法确定 PayPal 帐户状态”,错误 ID 为 --580023。我尝试了另一个人的电子邮件 ID,但它仍然不起作用。我确信电子邮件、名字、姓氏字段中没有错字。

看来,这些链接解决了同样的问题。 PayPal GetVerifiedStatus not working with other accountsDoes PayPal's GetVerifiedStatus `belong' to the api caller's country?

这是库附带的代码。 (添加了我的贝宝电子邮件 ID 和姓名)

require_once('../includes/config.php');
require_once('../autoload.php');
    // Create PayPal object.
$PayPalConfig = array(
                      'Sandbox' => $sandbox,
                      'DeveloperAccountEmail' => $developer_account_email,
                      'ApplicationID' => $application_id,
                      'DeviceID' => $device_id,
                      'IPAddress' => $_SERVER['REMOTE_ADDR'],
                      'APIUsername' => $api_username,
                      'APIPassword' => $api_password,
                      'APISignature' => $api_signature,
                      'APISubject' => $api_subject, 
                      'PrintHeaders' => $print_headers,
                      'LogResults' => $log_results, 
                      'LogPath' => $log_path,
                    );

$PayPal = new angelleye\PayPal\Adaptive($PayPalConfig);

// Prepare request arrays
$GetVerifiedStatusFields = array(
                                'EmailAddress' => 'xxxxxx',                     // Required.  The email address of the PayPal account holder.
                                'FirstName' => 'xxxxxx',                        // The first name of the PayPal account holder.  Required if MatchCriteria is NAME
                                'LastName' => 'xxxxxx',                         // The last name of the PayPal account holder.  Required if MatchCriteria is NAME
                                'MatchCriteria' => 'NAME'                   // Required.  The criteria must be matched in addition to EmailAddress.  Currently, only NAME is supported.  Values:  NAME, NONE   To use NONE you have to be granted advanced permissions
                                );

$PayPalRequestData = array('GetVerifiedStatusFields' => $GetVerifiedStatusFields);

// Pass data into class for processing with PayPal and load the response array into $PayPalResult
$PayPalResult = $PayPal->GetVerifiedStatus($PayPalRequestData);

// Write the contents of the response array to the screen for demo purposes.
echo '<pre />';
print_r($PayPalResult);

我不知道为什么会这样。有人可以帮忙吗?

【问题讨论】:

    标签: php paypal


    【解决方案1】:

    您正在沙盒模式下进行测试。您必须通过 https://developer.paypal.com/docs/classic/lifecycle/sb_about-accounts/#create-and-manage-sandbox-accounts 或使用 https://www.sandbox.paypal.com/us/home 上的标准用户流创建沙盒帐户。

    【讨论】:

    • 我意识到了这一点。它适用于沙盒,我希望它也适用于生产环境。但是,由于其他原因,该项目停滞不前,我无法继续进行下去。无论如何感谢您的回答!
    猜你喜欢
    • 2020-07-15
    • 2019-01-13
    • 2011-12-12
    • 1970-01-01
    • 2015-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-21
    相关资源
    最近更新 更多