gpt4 book ai didi

php - 为什么 PayPal GetVerifiedStatus API 不适用于某些帐户

转载 作者:太空宇宙 更新时间:2023-11-03 15:58:45 25 4
gpt4 key购买 nike

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

这是库自带的代码。 (添加了我的 Paypal 电子邮件 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);

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

最佳答案

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

关于php - 为什么 PayPal GetVerifiedStatus API 不适用于某些帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38759267/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com