我只是集成Frimi支付网关。第一步是尝试生成访问代币,并在生成代币后调用支付链接。但是出现错误:-SSLException:连接被同级关闭。 public void TokenGenerationProcess() { class WaitingforResponse extends AsyncTask<Void, Void, String> { ProgressDialog progressDialog; @Override protected void onPreExecute() { super.onPreExecute(); // progressDialog = ProgressDialog.show(getActivity().getBaseContext(), "Waiting for Token Generation...", "Please Wait...", false, false); } @Override protected String doInBackground(Void... params) { OkHttpClient client = new OkHttpClient.Builder() .connectTimeout(10, TimeUnit.SECONDS) .writeTimeout(10, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS) .build(); MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); String json = ""; RequestBody body = RequestBody.create(mediaType, json); /* https://ideabiz?grant_type=password&username=99R_User&password=99R_User&scope=SANDBOX https://igrant_type=refresh_token&refresh_token="+Message+"&scope=SANDBOX */ // Message="d6a5be5f5455c87c21442ba3d5201c8c"; Request request = new Request.Builder() .url("https://uatapi.nationstrust.com:8243/token?grant_type=client_credentials") .addHeader("content-type", "application/x-www-form-urlencoded") .addHeader("authorization", "Basic N000SDNmU3RtVERuZmZ1R0JNMlBGR1FXdmtFYTpEQUFJcEprVUhjdXBwcEx4dkRPSkFYZjNwMmth") .post(body) .build();请参阅下面的Stacktrace://在这里,我已经发布了完整的代码,试图生成访问令牌。/请帮助..帮助将不胜感激
添加回答
举报
0/150
提交
取消