java - PAYPAL - get token sandbox -
public void init(servletconfig servletconfig) throws servletexception { try { oauthtokencredential tokencredential = paypalresource.initconfig(new file(paypalservlet.class.getresource("sdk_config.properties").getpath())); accesstoken = tokencredential.getaccesstoken(); } catch (paypalrestexception e) { logger.fatal(e.getmessage()); }catch (exception e) { logger.fatal(e.getmessage()); } }
i using above code getting access token. if enter paypal credentials works fine. if change credentials of sandbox test, access token null. have verified credentials sandbox right using curl. there might missing testing sandbox?
pls check our server error logs , looking ssl connection failures, looks underlying connection did not setup. (otherwise there should api error returned paypal)
paypal sandbox has been upgraded accept tlsv1.2 ssl connections protocol, make sure server environment components compliant. please see language specific checking instructions here
Comments
Post a Comment