lidongdong
2023-03-16 303466a6535c8f74cb183161cf916e9c1df61e10
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/unionpay/UnifiedOrder.java
@@ -46,7 +46,7 @@
//    static String url = "https://test-api-open.chinaums.com/v1/netpay/wx/unified-order";
    static String url = "https://api-mop.chinaums.com/v1/netpay/wx/unified-order";
    public static String sendOrder(String totalAmount,String orderDesc,String productId)
    public static String sendOrder(String totalAmount,String orderDesc,String productId,String OpenId)
    {
        //1. 组建请求报文
        LocalDateTime time=DateUtils.getCurrentDate();
@@ -62,6 +62,7 @@
        reqBody.productId = productId;
        reqBody.notifyUrl = NOTIFYURL;
        reqBody.tradeType = "MINI";
        reqBody.subOpenId = OpenId;
        System.out.println("request body:\n"+reqBody);
        //2. 获取认证报文,timestamp为当前日期,老旧日期无法请求成功