From c8ea2d96f5b0522a09f3203ae98fe796084d2d15 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期六, 04 一月 2025 09:34:21 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/qijisheng --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java index f8d6139..6718780 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java @@ -1,5 +1,6 @@ package com.ruoyi.other.util.payment; +import cn.hutool.http.ContentType; import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; import cn.hutool.http.HttpUtil; @@ -42,6 +43,7 @@ public static SinglePayResult singlePay(SinglePay singlePay){ String url = "https://www.joinpay.com/payment/pay/singlePay"; HttpRequest post = HttpUtil.createPost(url); + post.contentType(ContentType.JSON.toString()); JSONObject body = new JSONObject(); //商户编号 body.put("userNo", merchantNo); @@ -124,6 +126,7 @@ public static SinglePayQueryResult singlePayQuery(String merchantOrderNo){ String url = "https://www.joinpay.com/payment/pay/singlePayQuery"; HttpRequest post = HttpUtil.createPost(url); + post.contentType(ContentType.JSON.toString()); JSONObject body = new JSONObject(); //商户编号 body.put("userNo", merchantNo); @@ -167,6 +170,7 @@ public static AccountBalanceQueryResult accountBalanceQuery(){ String url = "https://www.joinpay.com/payment/pay/accountBalanceQuery"; HttpRequest post = HttpUtil.createPost(url); + post.contentType(ContentType.JSON.toString()); JSONObject body = new JSONObject(); //商户编号 body.put("userNo", merchantNo); @@ -226,4 +230,9 @@ return MD5AndKL.MD5(sb.toString()); } + + public static void main(String[] args) { + TransferUtil.accountBalanceQuery(); + } + } -- Gitblit v1.7.1