| | |
| | | /** |
| | | * UDUN API Gateway |
| | | */ |
| | | private final String gateway = "https://sig11.udun.io"; |
| | | private final String gateway = "https://sig10.udun.io"; |
| | | |
| | | /** |
| | | * UDUN Merchant Key |
| | | */ |
| | | private final String merchantKey = "7161e42ff45204dca8b9c4e203b24f63"; |
| | | private final String merchantKey = "2ea108221e1ab2129a614ca4f1e899ef"; |
| | | |
| | | /** |
| | | * UDUN Merchant Number |
| | | */ |
| | | private final String merchantId = "321176"; |
| | | private final String merchantId = "322138"; |
| | | |
| | | /** |
| | | * Callback 充值 |
| | |
| | | |
| | | public static void main(String[] args) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("merchantId", 321176); |
| | | params.put("merchantId", 322138); |
| | | params.put("showBalance", false); |
| | | ResultMsg result = JSONUtil.toBean(UdunUtils.post("https://sig11.udun.io", "7161e42ff45204dca8b9c4e203b24f63", ApiPath.SUPPORT_COIN, JSONUtil.toJsonStr(params)), ResultMsg.class); |
| | | ResultMsg result = JSONUtil.toBean(UdunUtils.post("https://sig10.udun.io", "2ea108221e1ab2129a614ca4f1e899ef", ApiPath.SUPPORT_COIN, JSONUtil.toJsonStr(params)), ResultMsg.class); |
| | | if (result.getCode() != HttpStatus.HTTP_OK) { |
| | | Console.error(JSONUtil.toJsonStr(result)); |
| | | } |
| | | System.out.println(JSONUtil.toList(JSONUtil.parseArray(result.getData()), Coin.class)); |
| | | List<Coin> coinList = JSONUtil.toList(JSONUtil.parseArray(result.getData()), Coin.class); |
| | | System.out.println(coinList); |
| | | } |
| | | } |