【问题标题】:PayPal API - Verify that an account is valid / exists / verifiedPayPal API - 验证帐户是否有效/存在/已验证
【发布时间】:2014-01-01 11:04:54
【问题描述】:

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

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

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

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

我使用他们的自适应付款已经有一段时间了,并且经常惊讶于我们有多少卖家设法将他们的 PayPal 帐户错误地输入我们的网站。

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

PayPal 支持对我向他们提出的问题的回应:

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

感谢您的耐心等待。

希望其他人设法进行某种破解来执行此功能??

【问题讨论】:

  • 类似的问题已在:stackoverflow.com/q/3228963
  • 你找到解决这个问题的方法了吗?
  • 到目前为止你有什么解决办法吗?

标签: paypal paypal-adaptive-payments


【解决方案1】:
<?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);



?>

【讨论】:

    【解决方案2】:

    您可以向 Pay API 发出请求,尝试将要测试的电子邮件设置为链式支付作为辅助接收者。由于链式支付不接受向没有账户的收款人付款,因此当输入的电子邮件与 PayPal 账户不对应时,API 将返回错误(否则它将返回一个支付密钥,您将直接丢弃) .

    【讨论】:

    • 好主意,我试试看。
    • 账号设置不正确会不会也报错? IE。没有经过验证的关联银行/抄送账户?
    【解决方案3】:

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

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

    【讨论】:

      猜你喜欢
      • 2016-06-20
      • 2012-06-18
      • 2011-03-14
      • 1970-01-01
      • 2016-03-01
      • 2013-05-14
      • 2015-04-28
      • 1970-01-01
      • 2021-10-29
      相关资源
      最近更新 更多