This commit is contained in:
2026-06-26 22:48:49 +08:00
parent 054b5c146c
commit e8e483b8c1
2 changed files with 5 additions and 0 deletions
@@ -55,12 +55,15 @@ public class RnpayProxyService extends BaseProxyService {
try (Response resp = HTTP.newCall(req).execute()) {
String respBody = resp.body() != null ? resp.body().string() : "";
JSONObject json = new JSONObject(respBody);
Log.i(TAG,"Http result => " + json.toString());
if (!json.optBoolean("success", false)) {
throw new IOException(json.optString("message", "register failed"));
}
} catch (IOException e) {
Log.i(TAG,"POST IOException => " + e.getMessage());
throw e;
} catch (Exception e) {
Log.i(TAG,"POST Exception => " + e.getMessage());
throw new IOException(e);
}
}