【问题标题】:Paypal PaymentDetails API error 540031Paypal PaymentDetails API 错误 540031
【发布时间】:2017-09-14 01:29:24
【问题描述】:

我正在尝试集成 Paypal 自适应链式支付。我对此完全陌生,所以请多多包涵。我正在拿到paykey。但是当我尝试从 PaymentDetails API 获取交易 ID 时,我收到了带有消息 You+do+not+have+permission+to+get+these+payment+details 的错误代码。谁能告诉我为什么我会收到这个错误?在 iOS 及其工作中使用了相同的凭据。

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 可以在这方面提供帮助。在此处归档 paypal-techsupport.com/app/ask

标签: android paypal-adaptive-payments


【解决方案1】:

错误代码 540031 表示“您无权获取这些付款方式”。您可以参考下面的链接。 https://developer.paypal.com/docs/classic/api/adaptive-payments/GetPaymentOptions_API_Operation/

谢谢。

【讨论】:

  • 有什么理由在 Android 中出现此错误,而 iOS 却没有?
猜你喜欢
  • 2012-08-10
  • 1970-01-01
  • 2011-07-25
  • 2017-05-06
  • 2011-05-01
  • 2019-01-04
  • 2015-04-22
  • 1970-01-01
  • 2015-05-29
相关资源
最近更新 更多