我们在使用Paypal API执行reauth时遇到问题。如果有人遇到此错误,请提供帮助。我们几天前创建了一个授权,现在我们正在尝试使用以下
对此进行重新授权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