收藏
回答

H5下单API 400?

Map<String,Object> map = new HashMap<>();
map.put("appId",appId);
map.put("mchid",mchId);
map.put("description",appId);
map.put("out_trade_no",orderSn);
map.put("notify_url","https://weixin.qq.com/");
Map<String,Object> amount = new HashMap<>();
amount.put("total",money);
amount.put("currency","CNY");
map.put("amount",amount);
Map<String,Object> sceneInfo = new HashMap<>();
sceneInfo.put("payer_client_ip",ip);
Map<String,Object> h5Info = new HashMap<>();
h5Info.put("type","Wap");
sceneInfo.put("h5_info",h5Info);
map.put("scene_info",sceneInfo);
String param = JSON.toJSONString(map);


回答关注问题邀请回答
收藏

1 个回答

  • 北望沣渭
    北望沣渭
    2021-07-28

    把发送的json打印出来看看

    2021-07-28
    有用
    回复
登录 后发表内容