| | |
| | | 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; |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | return MD5AndKL.MD5(sb.toString()); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | TransferUtil.accountBalanceQuery(); |
| | | } |
| | | |
| | | } |