我正在使用this库通过电子邮件ID验证PayPal用户。我使用的API是GetVerifiedStatus。该库的开发人员在代码中提供了一个电子邮件地址,它工作正常。代码返回状态为" VERIFIED"他的电子邮件ID。
但是,每当我尝试使用我的电子邮件ID时,它都会显示"无法确定PayPal帐户状态"使用ErrorID --580023。我尝试了另一个人的电子邮件ID,但仍无效。我确信电子邮件,名字,姓氏字段中没有拼写错误。
似乎这些链接解决了同样的问题。 PayPal GetVerifiedStatus not working with other accounts和Does 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);
我不知道为什么会这样。有人可以帮忙吗?
答案 0 :(得分:1)