| New file |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.stylefeng.guns.core.util.HttpUtils; |
| | | import com.stylefeng.guns.modular.huifu.biz.DouGongBasicDataBiz; |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import static com.aliyun.oss.model.RoutingRule.Protocol.Http; |
| | | |
| | | /** |
| | | * 斗拱支付工具类 |
| | | */ |
| | | public class DouGongPayUtil { |
| | | |
| | | @Autowired |
| | | private HuiFuProperties huiFuProperties; |
| | | public static void main(String[] args) { |
| | | HttpRequest post = HttpUtil.createPost("https://api.huifu.com/v4/trade/payment/create"); |
| | | post.body("{\n" + |
| | | " \"sys_id\": \"ACWILL\",\n" + |
| | | " \"product_id\": \"JCTEST\",\n" + |
| | | " \"sign\": \"\",\n" + |
| | | " \"data\": {\n" + |
| | | " \"req_seq_id\": \"202508281506304989897129zz\",\n" + |
| | | " \"req_date\": \"20250828\",\n" + |
| | | " \"huifu_id\": \"6666000108604566\",\n" + |
| | | " \"trade_type\": \"U_MICROPAY\",\n" + |
| | | " \"combinedpay_data\": \"\",\n" + |
| | | " \"trans_amt\": \"0.01\",\n" + |
| | | " \"goods_desc\": \"支付宝Native\",\n" + |
| | | " \"remark\": \"交易备注\",\n" + |
| | | " \"time_expire\": \"\",\n" + |
| | | " \"delay_acct_flag\": \"N\",\n" + |
| | | " \"fee_flag\": \"\",\n" + |
| | | " \"acct_split_bunch\": \"\",\n" + |
| | | " \"terminal_device_data\": \"{\\\"device_ip\\\":\\\"172.28.52.52\\\",\\\"devs_id\\\":\\\"SPINTP104120617260257\\\"}\",\n" + |
| | | " \"notify_url\": \"\",\n" + |
| | | " \"method_expand\": \"{\\\"auth_code\\\":\\\"6220888888888208\\\"}\"\n" + |
| | | " }\n" + |
| | | "}\n"); |
| | | |
| | | HttpResponse execute = post.execute(); |
| | | System.out.println(execute.body()); |
| | | |
| | | } |
| | | |
| | | } |