我正在将Paypal付款方式集成到我的软件中,但是将钱从一个帐户转移到另一个帐户时出现问题。资金的转移是使用电子邮件地址在两个帐户之间进行的,但是贝宝端点在检查电子邮件是否有效时会花费一些时间。因此,要检查电子邮件是否已验证,我已经在Google上进行了搜索,并到达了stackoverflow问题链接,这是php的简短代码。链接Is a valid paypal email address or not (PHP)。但是在这个可接受的答案中,他们正在标题中发送数据,如下所示:
$url = trim("https://svcs.sandbox.paypal.com/AdaptiveAccounts/GetVerifiedStatus"); //set PayPal Endpoint to sandbox
$API_UserName = // I'm taking it as client id from the application which I have created in this link after login https://developer.paypal.com ;
$API_Password = // I'm passing it as secret of the same application from same link after login;
$API_Signature = // I', passing the signature which in the link https://www.paypal.com/businessprofile/mytools/apiaccess/firstparty/signature after login.;
$API_AppID = "APP-80W284485P519543T";
$API_RequestFormat = "NV";
$API_ResponseFormat = "NV";
这都是关于php中标头设置的。但是,我直接满足了邮递员的要求。解释如下:
我使用POST
方法访问的网址是检查电子邮件是否为:https://svcs.sandbox.paypal.com/AdaptiveAccounts/GetVerifiedStatus?emailAddress=abc@gmail.com&firstName=abc&lastName=abc
在标题中,我传递的凭据如下所示:
X-PAYPAL-SECURITY-USERID:// I'm taking it as client id from the application which I have created in this link after login https://developer.paypal.com
X-PAYPAL-SECURITY-SIGNATURE:// I', passing the signature which in the link https://www.paypal.com/businessprofile/mytools/apiaccess/firstparty/signature after login.
X-PAYPAL-SECURITY-PASSWORD:// I'm passing it as secret of the same application from link https://developer.paypal.com after login
X-PAYPAL-APPLICATION-ID:APP-80W284485P519543T
X-PAYPAL-REQUEST-DATA-FORMAT:NV
X-PAYPAL-RESPONSE-DATA-FORMAT:NV
下面也给出了我面临的错误:
responseEnvelope.timestamp=2019-06-24T21%3A18%3A02.151-07%3A00&responseEnvelope.ack=Failure&responseEnvelope.correlationId=422fd75d18732&responseEnvelope.build=adaptiveaccountapiserv-214.0.20190313045031898_20190313045031898&error(0).errorId=520003&error(0).domain=PLATFORM&error(0).subdomain=Application&error(0).severity=Error&error(0).category=Application&error(0).message=Authentication+failed.+API+credentials+are+incorrect.
您能告诉我我在这里做错了什么以及如何纠正吗?请帮助我。