我正在尝试整合贝宝自适应链接付款。我对此非常感兴趣,所以请耐心等待。我得到了paykey。但是,当我尝试从PaymentDetails API获取事务ID时,我收到了带有消息You+do+not+have+permission+to+get+these+payment+details
的此错误代码。任何人都可以告诉我为什么我得到这个错误? iOS和其工作中使用相同的凭据。贝宝PaymentDetails API错误540031
Envelope.timestamp=2017-04-18T01%3A50%3A24.907-07%3A00&responseEnvelope.ack=Failure&responseEnvelope.correlationId=adc36cc2d80b5&responseEnvelope.build=32250686&error(0).errorId=540031&error(0).domain=PLATFORM&error(0).subdomain=Application&error(0).severity=Error&error(0).category=Application&error(0).message=You+do+not+have+permission+to+get+these+payment+details
private class MyAsyncTask extends AsyncTask<Void, Void, String> {
StringBuffer buffer;
@Override
protected String doInBackground(Void... params) {
try {
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = null;
httppost = new HttpPost("https://svcs.sandbox.paypal.com/AdaptivePayments/PaymentDetails");
httppost.setHeader("Content-Type","application/x-www-form-urlencoded");
httppost.setHeader("X-PAYPAL-SECURITY-USERID","ashishapp.gmail.com");
httppost.setHeader("X-PAYPAL-SECURITY-PASSWORD","P9AGL37BV9TLZ9RD");
httppost.setHeader("X-PAYPAL-SECURITY-SIGNATURE","AyW8vijLhnQYFtANgDxD3mbhZZi8PawPbRFvGFb3sy2TNzaMZcVtvzEZ");
httppost.setHeader("X-PAYPAL-APPLICATION-ID","APP-80W284485P519543T");
httppost.setHeader("X-PAYPAL-REQUEST-DATA-FORMAT", "NV");
httppost.setHeader("X-PAYPAL-RESPONSE-DATA-FORMAT", "NV");
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("payKey", "AP-8PA68871T0961962Y"));
nameValuePairs.add(new BasicNameValuePair("requestEnvelope.errorLanguage", "en_US"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
InputStream is = entity.getContent();
byte[] data1;
data1 = new byte[256];
buffer = new StringBuffer();
int len = 0;
while (-1 != (len = is.read(data1))) {
buffer.append(new String(data1, 0, len));
}
System.out.println("sammy--------->" + buffer.toString());
is.close();
} catch (ClientProtocolException e) {
// TODO Auto-generated catch block
} catch (IOException e) {
// TODO Auto-generated catch block
}
return buffer.toString();
}
protected void onPostExecute(String result){
System.out.println("sammy_onPost "+result);
}
}
你可以向MTS申请一张票吗?这个错误非常微妙,并不具体。 MTS可以帮助解决这个问题。在这里文件https://www.paypal-techsupport.com/app/ask –