PayPal API-验证帐户是否有效/存在/已验证



是否有人能够仅通过电子邮件地址验证PayPal帐户的有效性?

AdaptiveAccounts GetVerifiedStatus(用PayPal自己的话说)只供其关键战略客户使用(见下文),我找不到任何其他方法来根据电子邮件地址检查帐户是否存在并验证。

即使使用提供的所有字段进行有效的NAME搜索也不起作用,请自己尝试:

https://devtools-paypal.com/apiexplorer/AdaptiveAccounts

我已经使用他们的自适应支付很长一段时间了,我们的卖家中有多少人在我们的网站上错误地输入了他们的PayPal账户,我对此感到惊讶。

PayPal似乎很乐意提供服务来收取我们的付款和佣金,但不愿意提供核心和非常基本的功能来在处理之前验证接收者。

PayPal支持回复我对他们的询问:

我们唯一的API是GetVerifiedStatus API,用于查看PayPal帐户是否已验证。matchCriteria的NONE值是受支持的,但仅适用于非常大的战略合作伙伴和/或实际的金融机构。我们的应用程序审查团队对提供该价值的访问权限有严格的要求。遗憾的是,我们目前没有任何API可以简单地告诉您电子邮件地址是否在帐户上得到确认。

谢谢你的耐心。

希望有某种黑客攻击,其他人已经设法执行了这个功能??

<?php
// create a new cURL resource
$ch = curl_init();
$ppUserID = "******************"; //Take it from   sandbox dashboard for test mode or take it from paypal.com account in production mode, help: https://developer.paypal.com/docs/classic/api/apiCredentials/
$ppPass = "*************"; //Take it from sandbox dashboard for test mode or take it from paypal.com account in production mode, help: https://developer.paypal.com/docs/classic/api/apiCredentials/
$ppSign = "********************"; //Take it from sandbox dashboard for test mode or take it from paypal.com account in production mode, help: https://developer.paypal.com/docs/classic/api/apiCredentials/
$ppAppID = "***********"; //if it is sandbox then app id is always: APP-80W284485P519543T
$sandboxEmail = "********************"; //comment this line if you want to use it in production mode.It is just for sandbox mode
$emailAddress = "sunil@rudrainnovatives.com"; //The email address you wana verify
//parameters of requests
$nvpStr = 'emailAddress='.$emailAddress.'&matchCriteria=NONE';
// RequestEnvelope fields
$detailLevel    = urlencode("ReturnAll");
$errorLanguage  = urlencode("en_US");
$nvpreq = "requestEnvelope.errorLanguage=$errorLanguage&requestEnvelope.detailLevel=$detailLevel&";
$nvpreq .= "&$nvpStr";
curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);
$headerArray = array(
"X-PAYPAL-SECURITY-USERID:$ppUserID",
"X-PAYPAL-SECURITY-PASSWORD:$ppPass",
"X-PAYPAL-SECURITY-SIGNATURE:$ppSign",
"X-PAYPAL-REQUEST-DATA-FORMAT:NV",
"X-PAYPAL-RESPONSE-DATA-FORMAT:JSON",
"X-PAYPAL-APPLICATION-ID:$ppAppID",
"X-PAYPAL-SANDBOX-EMAIL-ADDRESS:$sandboxEmail" //comment this line in production mode. IT IS JUST FOR SANDBOX TEST 
);
$url="https://svcs.sandbox.paypal.com/AdaptiveAccounts/GetVerifiedStatus";
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headerArray);
$paypalResponse = curl_exec($ch);
//echo $paypalResponse;   //if you want to see whole PayPal response then uncomment it.
curl_close($ch);
echo $data = json_decode($paypalResponse);

?>

作为一个选项,您可以使用"忘记密码?"选项输入电子邮件,如果不存在该电子邮件的帐户,您将收到通知。

该表单包含一个CAPTCHA,因此如果您正在寻找编码解决方案,它可能没有多大用处。

您可以向Pay API发出请求,尝试将待测试的电子邮件设置为第二接收者来进行连锁支付。由于连锁支付不接受向没有帐户的收款人付款,当输入的电子邮件与PayPal帐户不对应时,API将返回错误(否则,它将返回一个付款密钥,您将丢弃)。

最新更新