Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/401.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Paypal重新授权失败-不允许DCC\u重新授权_Java_Api_Rest_Paypal - Fatal编程技术网

Java Paypal重新授权失败-不允许DCC\u重新授权

Java Paypal重新授权失败-不允许DCC\u重新授权,java,api,rest,paypal,Java,Api,Rest,Paypal,我们在使用Paypal API进行重新验证时遇到问题。如果有人遇到此错误,请提供帮助。几天前我们已经创建了一个授权,现在我们正尝试使用以下方法对此进行重新授权 authorization= Authorization.get(accessToken, "8EU99222SR844720V"); Amount amount = new Amount(); amount.setCurrency("USD").setTotal("10"); authorization.setAmount(amo

我们在使用Paypal API进行重新验证时遇到问题。如果有人遇到此错误,请提供帮助。几天前我们已经创建了一个授权,现在我们正尝试使用以下方法对此进行重新授权

authorization= Authorization.get(accessToken, "8EU99222SR844720V");

Amount amount = new Amount();

amount.setCurrency("USD").setTotal("10");

authorization.setAmount(amount);

Authorization reauthorization = authorization.reauthorize(accessToken);
我们得到了以下错误:

SEVERE: Error code : 500 with response : {"name":"**DCC_REAUTHORIZATION_NOT_ALLOWED","message":"Reauthorization not allowed for this product**.","information_link":"https:// developer.paypal.com/webapps/developer/docs/api/#DCC_REAUTHORIZATION_NOT_ALLOWED","debug_id":"2d9b8f10ed53c"}
Exception in thread "main" com.paypal.core.rest.PayPalRESTException: Error code : 500 with response : {"name":"DCC_REAUTHORIZATION_NOT_ALLOWED","message":"Reauthorization not allowed for this product.","information_link":"https:// developer.paypal.com/webapps/developer/docs/api/#DCC_REAUTHORIZATION_NOT_ALLOWED","debug_id":"2d9b8f10ed53c"}
 at com.paypal.core.rest.PayPalResource.execute(PayPalResource.java:329)
 at com.paypal.core.rest.PayPalResource.configureAndExecute(PayPalResource.java:245)
 at com.paypal.core.rest.PayPalResource.configureAndExecute(PayPalResource.java:191)
 at com.paypal.api.payments.Authorization.reauthorize(Authorization.java:387)
 at com.paypal.api.payments.Authorization.reauthorize(Authorization.java:366)
 at com.paypal.api.payments.AuthorizationTestCase.testGetAuthorization(AuthorizationTestCase.java:87)
 at com.paypal.api.payments.AuthorizationTestCase.main(AuthorizationTestCase.java:66)
Caused by: com.paypal.exception.HttpErrorException: Error code : 500 with response : {"name":"DCC_REAUTHORIZATION_NOT_ALLOWED","message":"Reauthorization not allowed for this product.","information_link":"https:// developer.paypal.com/webapps/developer/docs/api/#DCC_REAUTHORIZATION_NOT_ALLOWED","debug_id":"2d9b8f10ed53c"}
 at com.paypal.core.HttpConnection.execute(HttpConnection.java:108)
 at com.paypal.core.rest.PayPalResource.execute(PayPalResource.java:321)
 ... 6 more
 Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: https:// api.sandbox.paypal.com/v1/payments/authorization/8EU99222SR844720V/reauthorize
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
 at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1491)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1485)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
 at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
 at com.paypal.core.HttpConnection.execute(HttpConnection.java:78)
 ... 7 more
 Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: https://api.sandbox.paypal.com/v1/payments/authorization/8EU99222SR844720V/reauthorize
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
 at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
 at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
 at com.paypal.core.HttpConnection.execute(HttpConnection.java:77)
 ... 7 more
从:注意:您只能重新授权贝宝帐户付款


这意味着您无法重新授权直接信用卡DCC支付。

我们尝试了几个授权ID-5C331170EU435230659S50842PT22443B