mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -107,6 +107,10 @@ public class SpringBootTestController {
|
||||
|
||||
private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
String wechatAppId1 = "wxbb3e0d474569481d"; // 万车充
|
||||
|
||||
String wechatAppId2 = "wx20abc5210391649c"; // 嘉佳充电
|
||||
|
||||
@Autowired
|
||||
private SnUtils snUtils;
|
||||
|
||||
@@ -480,10 +484,9 @@ public class SpringBootTestController {
|
||||
|
||||
@Test
|
||||
public void queryPaymentInfoTest() throws BaseAdaPayException {
|
||||
String wechatAppId = "wxbb3e0d474569481d";
|
||||
String paymentId = "002212023082514501110541039779091623936";
|
||||
// 在完成初始化设置情况下,调用查询方法,获取 Payment 查询结果
|
||||
Map<String, Object> response = Payment.query(paymentId, wechatAppId);
|
||||
Map<String, Object> response = Payment.query(paymentId, wechatAppId1);
|
||||
System.out.println(response);
|
||||
}
|
||||
|
||||
@@ -501,30 +504,27 @@ public class SpringBootTestController {
|
||||
dto.setProvCode("0031");
|
||||
dto.setAreaCode("3100");
|
||||
String adapayMemberId = "ACM80899105";
|
||||
String wechatAppId = "wxbb3e0d474569481d";
|
||||
adapayService.createSettleAccountRequest(dto, adapayMemberId, wechatAppId);
|
||||
adapayService.createSettleAccountRequest(dto, adapayMemberId, wechatAppId1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createDeleteSettleAccountRequestTest() throws BaseAdaPayException {
|
||||
String adapayMemberId = "ACM69424215";
|
||||
String settleAccountId = "0498291998695360";
|
||||
String wechatAppId = "wxbb3e0d474569481d";
|
||||
adapayService.createDeleteSettleAccountRequest(adapayMemberId, settleAccountId, wechatAppId);
|
||||
adapayService.createDeleteSettleAccountRequest(adapayMemberId, settleAccountId, wechatAppId1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryDrawcashDetailTest() throws BaseAdaPayException {
|
||||
String orderNo = "drawcash_1692339516947";
|
||||
String wechatAppId = "wxbb3e0d474569481d";
|
||||
DrawCashDetailVO drawCashDetailVO = adapayService.queryDrawCashDetail(orderNo, wechatAppId);
|
||||
DrawCashDetailVO drawCashDetailVO = adapayService.queryDrawCashDetail(orderNo, wechatAppId1);
|
||||
System.out.println(drawCashDetailVO);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryPaymentConfirmListTest() {
|
||||
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
||||
dto.setWechatAppId("wxbb3e0d474569481d");
|
||||
dto.setWechatAppId(wechatAppId1);
|
||||
// dto.setPaymentId("0022120230910032226990546664907296944128");
|
||||
dto.setPaymentConfirmId("0022120231009032351990557174514064834560");
|
||||
QueryPaymentConfirmDetailResponse.PaymentConfirmInfo paymentConfirmInfo = adapayService.queryPaymentConfirmDetail(dto);
|
||||
@@ -538,7 +538,7 @@ public class SpringBootTestController {
|
||||
dto.setPageNo(1);
|
||||
dto.setPageSize(100);
|
||||
dto.setAcctType("01");
|
||||
dto.setWechatAppId("wxbb3e0d474569481d");
|
||||
dto.setWechatAppId(wechatAppId1);
|
||||
dto.setAdapayMemberId("ACM69424215");
|
||||
dto.setBeginDate("20230823");
|
||||
dto.setEndDate("20230823");
|
||||
@@ -620,8 +620,7 @@ public class SpringBootTestController {
|
||||
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(wechatAppId);
|
||||
System.out.println(JSON.toJSONString(config));
|
||||
|
||||
String wechatAppId2 = "wxbb3e0d474569481d";
|
||||
AbstractAdapayConfig config2 = AdapayConfigFactory.getConfig(wechatAppId2);
|
||||
AbstractAdapayConfig config2 = AdapayConfigFactory.getConfig(wechatAppId1);
|
||||
System.out.println(JSON.toJSONString(config2));
|
||||
}
|
||||
|
||||
@@ -631,10 +630,8 @@ public class SpringBootTestController {
|
||||
*/
|
||||
@Test
|
||||
public void queryCreateConfirmReverse() throws BaseAdaPayException {
|
||||
// 万车充小程序appId
|
||||
String wechatAppId = "wxbb3e0d474569481d";
|
||||
// 用于verify的汇付会员id
|
||||
String verifyAdapayMemberId = "AM27665969";
|
||||
String verifyAdapayMemberId = "ACM46086128";
|
||||
|
||||
List<String> list = getList();
|
||||
List<String> resultList = Lists.newArrayList();
|
||||
@@ -644,7 +641,7 @@ public class SpringBootTestController {
|
||||
// 查询支付确认id
|
||||
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
||||
dto.setPaymentId(s);
|
||||
dto.setWechatAppId(wechatAppId);
|
||||
dto.setWechatAppId(wechatAppId1);
|
||||
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
||||
System.out.println("response==" + JSON.toJSONString(response));
|
||||
if (response != null) {
|
||||
@@ -656,6 +653,7 @@ public class SpringBootTestController {
|
||||
JSONObject jsonObject = JSON.parseObject(confirm.getDescription());
|
||||
// 校验是不是分给正确的商户
|
||||
String adapayMemberId = jsonObject.getString("adapayMemberId");
|
||||
System.out.println("分账账号:" + adapayMemberId);
|
||||
if (StringUtils.equals(adapayMemberId, verifyAdapayMemberId)) {
|
||||
successList.addAll(confirms);
|
||||
} else {
|
||||
@@ -679,10 +677,9 @@ public class SpringBootTestController {
|
||||
adapayMemberAccount.setAdapayMemberId("ACM25158725");
|
||||
BigDecimal deductionAmount = new BigDecimal("12.14");
|
||||
String orderCode = "C63381533584";
|
||||
String wechatAppId = "wxbb3e0d474569481d";
|
||||
// 延时分账,使用确认交易API
|
||||
PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId,
|
||||
adapayMemberAccount, deductionAmount, orderCode, wechatAppId);
|
||||
adapayMemberAccount, deductionAmount, orderCode, wechatAppId1);
|
||||
System.out.println(JSON.toJSONString(paymentConfirmResponse));
|
||||
}
|
||||
|
||||
@@ -693,14 +690,13 @@ public class SpringBootTestController {
|
||||
public void createPaymentReverseRequestTest() {
|
||||
String paymentId = "002212023082409392010540599165461884928";
|
||||
BigDecimal refundAmount = new BigDecimal("0.09");
|
||||
String wechatAppId = "wx20abc5210391649c";
|
||||
String memberId = null;
|
||||
|
||||
// 延迟分账未确认调撤销调撤销接口退款
|
||||
PaymentReverseOperation operation = new PaymentReverseOperation();
|
||||
operation.setPaymentId(paymentId);
|
||||
operation.setReverseAmt(refundAmount);
|
||||
operation.setMerchantKey(wechatAppId);
|
||||
operation.setMerchantKey(wechatAppId2);
|
||||
operation.setMemberId(memberId);
|
||||
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
||||
operation.setOrderCode(null);
|
||||
@@ -708,15 +704,18 @@ public class SpringBootTestController {
|
||||
System.out.println(JSON.toJSONString(response));
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试创建退款请求
|
||||
*/
|
||||
@Test
|
||||
public void createRefundRequestTest() {
|
||||
String paymentId = "002212023100711233510556570466139144192";
|
||||
BigDecimal refundAmount = new BigDecimal("0.05");
|
||||
String wechatAppId = "wx20abc5210391649c";
|
||||
String memberId = "";
|
||||
String paymentId = "0022120231026150915990563512626531311616";
|
||||
BigDecimal refundAmount = new BigDecimal("30.53");
|
||||
String memberId = "65879222";
|
||||
String orderCode = "C61028961274";
|
||||
// 调汇付的交易退款接口
|
||||
RefundResponse response = adapayService.createRefundRequest(paymentId, refundAmount,
|
||||
wechatAppId, memberId, ScenarioEnum.ORDER.getValue(), null);
|
||||
wechatAppId1, memberId, ScenarioEnum.ORDER.getValue(), orderCode);
|
||||
System.out.println(JSON.toJSONString(response));
|
||||
}
|
||||
|
||||
@@ -726,299 +725,193 @@ public class SpringBootTestController {
|
||||
*/
|
||||
@Test
|
||||
public void testCreateConfirmReverse() throws BaseAdaPayException {
|
||||
String wechatAppId = "wxbb3e0d474569481d"; // 万车充
|
||||
// String wechatAppId = "wx20abc5210391649c"; // 希晓
|
||||
List<String> list = getList();
|
||||
for (String s : list) {
|
||||
for (String paymentId : list) {
|
||||
// 查询支付确认id
|
||||
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
||||
dto.setPaymentId(s);
|
||||
dto.setWechatAppId(wechatAppId);
|
||||
dto.setPaymentId(paymentId);
|
||||
dto.setWechatAppId(wechatAppId1);
|
||||
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
|
||||
if (response != null) {
|
||||
List<QueryPaymentConfirmDetailResponse.PaymentConfirmInfo> confirms = response.getPaymentConfirms();
|
||||
System.out.println("支付id:" + s + ", 确认信息:" + JSON.toJSONString(confirms));
|
||||
System.out.println("支付id:" + paymentId + ", 确认信息:" + JSON.toJSONString(confirms));
|
||||
if (CollectionUtils.isNotEmpty(confirms)) {
|
||||
for (QueryPaymentConfirmDetailResponse.PaymentConfirmInfo confirm : confirms) {
|
||||
adapayService.createConfirmReverse(confirm.getId(), wechatAppId);
|
||||
adapayService.createConfirmReverse(confirm.getId(), wechatAppId1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询撤销列表
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
@Test
|
||||
public void queryPaymentReverseListTest() throws BaseAdaPayException {
|
||||
JSONArray jsonList = getJsonList();
|
||||
List<String> list = getList();
|
||||
|
||||
List<String> idList = Lists.newArrayList();
|
||||
for (int i = 0; i < jsonList.size(); i++) {
|
||||
JSONObject jsonObject = (JSONObject) jsonList.get(i);
|
||||
// System.out.println(jsonObject.toJSONString());
|
||||
BigDecimal refundAmount = jsonObject.getBigDecimal("refundAmount");
|
||||
String paymentId = jsonObject.getString("paymentId");
|
||||
|
||||
if (list.contains(paymentId)) {
|
||||
// 创建撤销请求
|
||||
adapayService.createPaymentReverseRequest(paymentId, refundAmount, wechatAppId1, "", ScenarioEnum.ORDER.getValue(), "");
|
||||
}
|
||||
|
||||
}
|
||||
System.out.println("需要撤销idList:" + idList);
|
||||
}
|
||||
|
||||
public JSONArray getJsonList() {
|
||||
String jsonArrayString = "[{\"refundAmount\":\"30.53\", \"paymentId\":\"002212023102509494810563069847078420480\"},\n" +
|
||||
"{\"refundAmount\":\"15.37\", \"paymentId\":\"002212023102510460310563084002302054400\"},\n" +
|
||||
"{\"refundAmount\":\"6.99\", \"paymentId\":\"002212023102511124110563090701846355968\"},\n" +
|
||||
"{\"refundAmount\":\"2.15\", \"paymentId\":\"002212023102515344310563156645282902016\"},\n" +
|
||||
"{\"refundAmount\":\"4.77\", \"paymentId\":\"002212023102517555310563192171581886465\"},\n" +
|
||||
"{\"refundAmount\":\"47.11\", \"paymentId\":\"002212023102518195010563198200956100608\"},\n" +
|
||||
"{\"refundAmount\":\"16.31\", \"paymentId\":\"002212023102518554510563207239038910464\"},\n" +
|
||||
"{\"refundAmount\":\"0.11\", \"paymentId\":\"002212023102520555510563237478250602496\"},\n" +
|
||||
"{\"refundAmount\":\"0.16\", \"paymentId\":\"002212023102521045110563239728223133696\"},\n" +
|
||||
"{\"refundAmount\":\"8.45\", \"paymentId\":\"002212023102521143910563242193132945408\"},\n" +
|
||||
"{\"refundAmount\":\"0.11\", \"paymentId\":\"002212023102521192910563243409580007424\"},\n" +
|
||||
"{\"refundAmount\":\"14.83\", \"paymentId\":\"002212023102521223710563244199296192512\"},\n" +
|
||||
"{\"refundAmount\":\"0.16\", \"paymentId\":\"002212023102521234310563244474368217088\"},\n" +
|
||||
"{\"refundAmount\":\"13.43\", \"paymentId\":\"002212023102521570210563252859192963072\"},\n" +
|
||||
"{\"refundAmount\":\"4.21\", \"paymentId\":\"002212023102522155910563257627847467008\"},\n" +
|
||||
"{\"refundAmount\":\"14.22\", \"paymentId\":\"002212023102522193410563258528941170688\"},\n" +
|
||||
"{\"refundAmount\":\"50.56\", \"paymentId\":\"002212023102522274710563260600221925376\"},\n" +
|
||||
"{\"refundAmount\":\"0.20\", \"paymentId\":\"002212023102522342910563262284556705792\"},\n" +
|
||||
"{\"refundAmount\":\"100.00\", \"paymentId\":\"002212023102523022210563269303469297664\"},\n" +
|
||||
"{\"refundAmount\":\"70.95\", \"paymentId\":\"002212023102523071910563270545934163968\"},\n" +
|
||||
"{\"refundAmount\":\"60.97\", \"paymentId\":\"002212023102523094710563271166910484480\"},\n" +
|
||||
"{\"refundAmount\":\"13.18\", \"paymentId\":\"002212023102523130010563271978154807296\"},\n" +
|
||||
"{\"refundAmount\":\"0.14\", \"paymentId\":\"002212023102523235110563274707384705024\"},\n" +
|
||||
"{\"refundAmount\":\"0.17\", \"paymentId\":\"002212023102523430110563279531766407168\"},\n" +
|
||||
"{\"refundAmount\":\"34.60\", \"paymentId\":\"002212023102600075510563285799532720128\"},\n" +
|
||||
"{\"refundAmount\":\"10.76\", \"paymentId\":\"002212023102600101210563286372754374656\"},\n" +
|
||||
"{\"refundAmount\":\"0.15\", \"paymentId\":\"002212023102600233610563289745851981824\"},\n" +
|
||||
"{\"refundAmount\":\"3.72\", \"paymentId\":\"002212023102600391810563293694689501184\"},\n" +
|
||||
"{\"refundAmount\":\"4.27\", \"paymentId\":\"002212023102600492010563296219237933056\"},\n" +
|
||||
"{\"refundAmount\":\"0.17\", \"paymentId\":\"002212023102605345910563368108020506624\"},\n" +
|
||||
"{\"refundAmount\":\"0.14\", \"paymentId\":\"002212023102606164510563378616393760768\"},\n" +
|
||||
"{\"refundAmount\":\"12.47\", \"paymentId\":\"002212023102607391110563399361643106304\"},\n" +
|
||||
"{\"refundAmount\":\"10.20\", \"paymentId\":\"002212023102608340210563413167228276736\"},\n" +
|
||||
"{\"refundAmount\":\"2.08\", \"paymentId\":\"002212023102608405910563414915526729728\"},\n" +
|
||||
"{\"refundAmount\":\"39.30\", \"paymentId\":\"002212023102608471510563416492917350400\"},\n" +
|
||||
"{\"refundAmount\":\"100.00\", \"paymentId\":\"002212023102609350010563428508330663936\"},\n" +
|
||||
"{\"refundAmount\":\"54.49\", \"paymentId\":\"002212023102609402210563429858239901696\"},\n" +
|
||||
"{\"refundAmount\":\"52.48\", \"paymentId\":\"002212023102610400610563444892424953856\"},\n" +
|
||||
"{\"refundAmount\":\"0.47\", \"paymentId\":\"002212023102611395410563459942744924160\"},\n" +
|
||||
"{\"refundAmount\":\"5.59\", \"paymentId\":\"002212023102611415010563460428726755328\"},\n" +
|
||||
"{\"refundAmount\":\"0.21\", \"paymentId\":\"002212023102611430810563460756207607808\"},\n" +
|
||||
"{\"refundAmount\":\"1.72\", \"paymentId\":\"002212023102611502810563462601938264064\"},\n" +
|
||||
"{\"refundAmount\":\"0.12\", \"paymentId\":\"002212023102611562710563464107365986304\"},\n" +
|
||||
"{\"refundAmount\":\"0.75\", \"paymentId\":\"002212023102612163810563469186573033472\"},\n" +
|
||||
"{\"refundAmount\":\"4.19\", \"paymentId\":\"002212023102612245810563471282161143808\"},\n" +
|
||||
"{\"refundAmount\":\"37.38\", \"paymentId\":\"002212023102612284210563472220675592192\"},\n" +
|
||||
"{\"refundAmount\":\"0.44\", \"paymentId\":\"002212023102612312310563472896678674432\"},\n" +
|
||||
"{\"refundAmount\":\"18.32\", \"paymentId\":\"002212023102612352510563473913451704320\"},\n" +
|
||||
"{\"refundAmount\":\"0.16\", \"paymentId\":\"002212023102612512410563477934609485824\"},\n" +
|
||||
"{\"refundAmount\":\"3.20\", \"paymentId\":\"002212023102612514510563478021491613696\"},\n" +
|
||||
"{\"refundAmount\":\"0.50\", \"paymentId\":\"002212023102613045810563481350137245696\"},\n" +
|
||||
"{\"refundAmount\":\"44.12\", \"paymentId\":\"002212023102613251410563486448079036417\"},\n" +
|
||||
"{\"refundAmount\":\"3.52\", \"paymentId\":\"002212023102613425710563490909512749056\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102614083410563497354011049984\"},\n" +
|
||||
"{\"refundAmount\":\"8.33\", \"paymentId\":\"002212023102614290310563502509800251392\"},\n" +
|
||||
"{\"refundAmount\":\"0.06\", \"paymentId\":\"002212023102614424710563505964930363392\"},\n" +
|
||||
"{\"refundAmount\":\"25.24\", \"paymentId\":\"002212023102614435010563506231223803904\"},\n" +
|
||||
"{\"refundAmount\":\"20.00\", \"paymentId\":\"002212023102614463110563506905694818304\"},\n" +
|
||||
"{\"refundAmount\":\"72.28\", \"paymentId\":\"002212023102615062710563511919125426176\"},\n" +
|
||||
"{\"refundAmount\":\"0.08\", \"paymentId\":\"002212023102615063310563511947233878016\"},\n" +
|
||||
"{\"refundAmount\":\"28.96\", \"paymentId\":\"002212023102615153910563514235439505408\"},\n" +
|
||||
"{\"refundAmount\":\"26.27\", \"paymentId\":\"002212023102615184210563515004194213888\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102615293310563517734596337664\"},\n" +
|
||||
"{\"refundAmount\":\"11.19\", \"paymentId\":\"002212023102615363410563519498664767488\"},\n" +
|
||||
"{\"refundAmount\":\"0.08\", \"paymentId\":\"002212023102615423010563520991255289856\"},\n" +
|
||||
"{\"refundAmount\":\"50.00\", \"paymentId\":\"002212023102615493810563522790390521856\"},\n" +
|
||||
"{\"refundAmount\":\"6.11\", \"paymentId\":\"002212023102615501910563522959780311040\"},\n" +
|
||||
"{\"refundAmount\":\"0.42\", \"paymentId\":\"002212023102616035010563526363172274176\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102616045510563526635063300096\"},\n" +
|
||||
"{\"refundAmount\":\"0.06\", \"paymentId\":\"002212023102616111810563528239177777152\"},\n" +
|
||||
"{\"refundAmount\":\"0.44\", \"paymentId\":\"002212023102616191610563530246626197504\"},\n" +
|
||||
"{\"refundAmount\":\"36.66\", \"paymentId\":\"002212023102616253410563531830216851456\"},\n" +
|
||||
"{\"refundAmount\":\"4.49\", \"paymentId\":\"002212023102616333110563533831168913408\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102616530910563538774125670400\"},\n" +
|
||||
"{\"refundAmount\":\"40.62\", \"paymentId\":\"002212023102617014310563540927198552064\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102617081710563542583271456768\"},\n" +
|
||||
"{\"refundAmount\":\"20.38\", \"paymentId\":\"002212023102617161110563544570726408192\"},\n" +
|
||||
"{\"refundAmount\":\"43.62\", \"paymentId\":\"002212023102617170810563544806559129600\"},\n" +
|
||||
"{\"refundAmount\":\"105.60\", \"paymentId\":\"002212023102617174910563544982164119552\"},\n" +
|
||||
"{\"refundAmount\":\"64.13\", \"paymentId\":\"002212023102617304610563548238191493120\"},\n" +
|
||||
"{\"refundAmount\":\"1.53\", \"paymentId\":\"002212023102617340310563549064220680192\"},\n" +
|
||||
"{\"refundAmount\":\"20.74\", \"paymentId\":\"002212023102618190210563560385759633408\"},\n" +
|
||||
"{\"refundAmount\":\"44.80\", \"paymentId\":\"002212023102618220610563561159283728384\"},\n" +
|
||||
"{\"refundAmount\":\"100.00\", \"paymentId\":\"002212023102618324910563563854380384256\"},\n" +
|
||||
"{\"refundAmount\":\"18.21\", \"paymentId\":\"002212023102618352510563564510333071360\"},\n" +
|
||||
"{\"refundAmount\":\"1.65\", \"paymentId\":\"002212023102618405910563565908406550528\"},\n" +
|
||||
"{\"refundAmount\":\"20.00\", \"paymentId\":\"002212023102619043210563571836180193280\"},\n" +
|
||||
"{\"refundAmount\":\"9.24\", \"paymentId\":\"002212023102619095210563573178559590400\"},\n" +
|
||||
"{\"refundAmount\":\"7.86\", \"paymentId\":\"002212023102619152510563574577509920768\"},\n" +
|
||||
"{\"refundAmount\":\"2.86\", \"paymentId\":\"002212023102619173110563575104886235136\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102619174410563575160413847552\"},\n" +
|
||||
"{\"refundAmount\":\"12.44\", \"paymentId\":\"002212023102619190310563575491855867904\"},\n" +
|
||||
"{\"refundAmount\":\"10.95\", \"paymentId\":\"002212023102619203510563575875551846400\"},\n" +
|
||||
"{\"refundAmount\":\"8.75\", \"paymentId\":\"002212023102619222110563576320179027968\"},\n" +
|
||||
"{\"refundAmount\":\"8.80\", \"paymentId\":\"002212023102619265310563577459178020864\"},\n" +
|
||||
"{\"refundAmount\":\"10.85\", \"paymentId\":\"002212023102619274810563577691998736384\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102619303110563578375249092608\"},\n" +
|
||||
"{\"refundAmount\":\"9.83\", \"paymentId\":\"002212023102619541010563584325530124288\"},\n" +
|
||||
"{\"refundAmount\":\"15.05\", \"paymentId\":\"002212023102620060710563587335757459456\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102620071510563587618242785280\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102620103810563588471011188736\"},\n" +
|
||||
"{\"refundAmount\":\"33.89\", \"paymentId\":\"002212023102620423610563596514914508800\"},\n" +
|
||||
"{\"refundAmount\":\"5.20\", \"paymentId\":\"002212023102620535910563599380128423936\"},\n" +
|
||||
"{\"refundAmount\":\"33.20\", \"paymentId\":\"002212023102621002510563601001478578176\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102621022210563601491448524800\"},\n" +
|
||||
"{\"refundAmount\":\"50.00\", \"paymentId\":\"002212023102621112510563603768625553408\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102621143810563604576338403328\"},\n" +
|
||||
"{\"refundAmount\":\"16.26\", \"paymentId\":\"002212023102621310510563608717454168064\"},\n" +
|
||||
"{\"refundAmount\":\"11.97\", \"paymentId\":\"002212023102621432010563611801107623936\"},\n" +
|
||||
"{\"refundAmount\":\"37.71\", \"paymentId\":\"002212023102621433210563611849459560448\"},\n" +
|
||||
"{\"refundAmount\":\"0.09\", \"paymentId\":\"002212023102621450610563612245166358528\"},\n" +
|
||||
"{\"refundAmount\":\"15.00\", \"paymentId\":\"002212023102621474410563612905889157120\"}]";
|
||||
JSONArray jsonArray = JSONArray.parseArray(jsonArrayString);
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
public List<String> getList() {
|
||||
List<String> list = Lists.newArrayList();
|
||||
|
||||
list.add("002212023100314280210555167331638571008");
|
||||
list.add("002212023100314452010555171685453213696");
|
||||
list.add("002212023100411225510555483133315117056");
|
||||
list.add("002212023100616555610556291714934611968");
|
||||
list.add("002212023100617024510556293432550305792");
|
||||
list.add("002212023100617331610556301113070194688");
|
||||
list.add("002212023100619571910556337360904310784");
|
||||
list.add("002212023100620285110556345297462808576");
|
||||
list.add("002212023100621160310556357177719291904");
|
||||
list.add("002212023100621533410556366619086376960");
|
||||
list.add("002212023100621535110556366688602771456");
|
||||
list.add("002212023100622381210556377850191261696");
|
||||
list.add("002212023100622511810556381148448124928");
|
||||
list.add("002212023100623414010556393823903338496");
|
||||
list.add("002212023100701523810556426782597181440");
|
||||
list.add("002212023100704174710556463307963502592");
|
||||
list.add("002212023100704492210556471256810758144");
|
||||
list.add("002212023100705494710556486461974491136");
|
||||
list.add("002212023100705582710556488644795523072");
|
||||
list.add("002212023100705591310556488836151427072");
|
||||
list.add("002212023100708221210556524820170985472");
|
||||
list.add("002212023100708485710556531548630523904");
|
||||
list.add("002212023100709162110556538445036998656");
|
||||
list.add("002212023100711404410556574779156447232");
|
||||
list.add("002212023100712015310556580102097022976");
|
||||
list.add("002212023100714073510556611737347661824");
|
||||
list.add("002212023100714383710556619548209430528");
|
||||
list.add("002212023100715095810556627435343753216");
|
||||
list.add("002212023100715100210556627451548487680");
|
||||
list.add("002212023100715301410556632535796269056");
|
||||
list.add("002212023100717131410556658458322452480");
|
||||
list.add("002212023100717394610556665132941303808");
|
||||
list.add("002212023100718395010556680251173154816");
|
||||
list.add("002212023100718520810556683348261040128");
|
||||
list.add("002212023100718534710556683759872802816");
|
||||
list.add("002212023100719233710556691271180824576");
|
||||
list.add("002212023100719401710556695465618788352");
|
||||
list.add("002212023100719522110556698501270466560");
|
||||
list.add("002212023100721031810556716357552156672");
|
||||
list.add("002212023100721123510556718692823457792");
|
||||
list.add("002212023100722130310556733907225239552");
|
||||
list.add("002212023100722285810556737914479554560");
|
||||
list.add("002212023100722451710556742021055205376");
|
||||
list.add("002212023100722520210556743720615182336");
|
||||
list.add("002212023100723002110556745810819145728");
|
||||
list.add("002212023100723020110556746231778091008");
|
||||
list.add("002212023100723035410556746706410721280");
|
||||
list.add("002212023100723250010556752014956654592");
|
||||
list.add("002212023100723332710556754142061506560");
|
||||
list.add("002212023100723501510556758371589128192");
|
||||
list.add("002212023100723512710556758670444589056");
|
||||
list.add("002212023100723584510556760511053410304");
|
||||
list.add("002212023100723590410556760587963944960");
|
||||
list.add("002212023100800152910556764722251612160");
|
||||
list.add("002212023100800165510556765082192420864");
|
||||
list.add("002212023100800474610556772842600771584");
|
||||
list.add("002212023100800545410556774639213948928");
|
||||
list.add("002212023100800574010556775337303900160");
|
||||
list.add("002212023100801011010556776215928483840");
|
||||
list.add("002212023100801013110556776306730971136");
|
||||
list.add("002212023100801045010556777141089501184");
|
||||
list.add("002212023100801145810556779690810322944");
|
||||
list.add("002212023100801175310556780424052858880");
|
||||
list.add("002212023100801260010556782464762109952");
|
||||
list.add("002212023100801270410556782733541191680");
|
||||
list.add("002212023100801330610556784253024591872");
|
||||
list.add("002212023100801420610556786519243223040");
|
||||
list.add("002212023100802095410556793512076214272");
|
||||
list.add("002212023100802144510556794734765068288");
|
||||
list.add("002212023100802174110556795471652954112");
|
||||
list.add("002212023100802235510556797039735898112");
|
||||
list.add("002212023100802370410556800351939567616");
|
||||
list.add("002212023100803081410556808194048602112");
|
||||
list.add("002212023100803311810556814001094971392");
|
||||
list.add("002212023100803484110556818372205219840");
|
||||
list.add("002212023100803500310556818719759884288");
|
||||
list.add("002212023100804224810556826961497980928");
|
||||
list.add("002212023100805063710556837986808279040");
|
||||
list.add("002212023100805184510556841040305672192");
|
||||
list.add("002212023100805254410556842798029979648");
|
||||
list.add("002212023100805331710556844699177693184");
|
||||
list.add("002212023100806035110556852390260629504");
|
||||
list.add("002212023100806272410556858314677272576");
|
||||
list.add("002212023100809085610556898966909136896");
|
||||
list.add("002212023100809110710556899514989654016");
|
||||
list.add("002212023100810014610556912261981278208");
|
||||
list.add("002212023100810361110556920925737443328");
|
||||
list.add("002212023100811351410556935783555448832");
|
||||
list.add("002212023100812082610556944141137211392");
|
||||
list.add("002212023100812210210556947311314780160");
|
||||
list.add("002212023100812265110556948774422269952");
|
||||
list.add("002212023100812465910556953839987159040");
|
||||
list.add("002212023100813264410556963843003830272");
|
||||
list.add("002212023100813462710556968805371654144");
|
||||
list.add("002212023100813525810556970444841975808");
|
||||
list.add("002212023100814054910556973679042347008");
|
||||
list.add("002212023100814300110556979771751489536");
|
||||
list.add("002212023100814322510556980374340898816");
|
||||
list.add("002212023100814363410556981418804109312");
|
||||
list.add("002212023100814391410556982089733595136");
|
||||
list.add("002212023100814411710556982606605561856");
|
||||
list.add("002212023100814581310556986868903411712");
|
||||
list.add("002212023100815571410557001721300885504");
|
||||
list.add("002212023100816152010557006273082216448");
|
||||
list.add("002212023100816173810557006854883749888");
|
||||
list.add("002212023100816310810557010251493900288");
|
||||
list.add("002212023100816462910557014115077009408");
|
||||
list.add("002212023100816492510557014853526478848");
|
||||
list.add("002212023100817191910557022376213848064");
|
||||
list.add("002212023100817331010557025860654645248");
|
||||
list.add("002212023100817355010557026534143025152");
|
||||
list.add("002212023100818410810557042964866191360");
|
||||
list.add("002212023100818553710557046611448524800");
|
||||
list.add("002212023100819271310557054564391673856");
|
||||
list.add("002212023100820143810557066496450752512");
|
||||
list.add("002212023100821104210557080604108566528");
|
||||
list.add("002212023100821210010557083198233489408");
|
||||
list.add("002212023100821595610557092997578993664");
|
||||
list.add("002212023100822115310557096004232634368");
|
||||
list.add("002212023100822242310557099147395862528");
|
||||
list.add("002212023100822271910557099888908681216");
|
||||
list.add("002212023100822331510557101380323356672");
|
||||
list.add("002212023100822353510557101968053944320");
|
||||
list.add("002212023100822505910557105841569185792");
|
||||
list.add("002212023100822580210557107615710044160");
|
||||
list.add("002212023100823000610557108135865274368");
|
||||
list.add("002212023100823012710557108475975872512");
|
||||
list.add("002212023100823054910557109574160318464");
|
||||
list.add("002212023100823084310557110305735303168");
|
||||
list.add("002212023100823094110557110550396063744");
|
||||
list.add("002212023100823162810557112255176491008");
|
||||
list.add("002212023100823301810557115737967149056");
|
||||
list.add("002212023100823325810557116406880448512");
|
||||
list.add("002212023100823344110557116839047454720");
|
||||
list.add("002212023100823441510557119247116316672");
|
||||
list.add("002212023100823465110557119901203640320");
|
||||
list.add("002212023100823570310557122468944273408");
|
||||
list.add("002212023100900331110557131564040695808");
|
||||
list.add("002212023100900350910557132059302875136");
|
||||
list.add("002212023100900560410557137320419164160");
|
||||
list.add("002212023100901191910557143171144048640");
|
||||
list.add("002212023100901295810557145850995191808");
|
||||
list.add("002212023100901385110557148087988215808");
|
||||
list.add("002212023100901445210557149602608058368");
|
||||
list.add("002212023100902152810557157302704177152");
|
||||
list.add("002212023100902191310557158248265515008");
|
||||
list.add("002212023100903510710557181374452469760");
|
||||
list.add("002212023100904080810557185656704151552");
|
||||
list.add("002212023100904174610557188082356973568");
|
||||
list.add("002212023100904204910557188848974274560");
|
||||
list.add("002212023100905031810557199541176098816");
|
||||
list.add("002212023100905124310557201911345553408");
|
||||
list.add("002212023100905185910557203486984077312");
|
||||
list.add("002212023100905230310557204508484206592");
|
||||
list.add("002212023100905295910557206252840816640");
|
||||
list.add("002212023100905335810557207257720909824");
|
||||
list.add("002212023100906013810557214219340070912");
|
||||
list.add("002212023100906025110557214525746561024");
|
||||
list.add("002212023100906095810557216318769586176");
|
||||
list.add("002212023100908105410557246751206453248");
|
||||
list.add("002212023100908365310557253289620107264");
|
||||
list.add("002212023100908575610557258586591035392");
|
||||
list.add("002212023100909020810557259645600051200");
|
||||
list.add("002212023100909493710557271594562203648");
|
||||
list.add("002212023100910311610557282073351258112");
|
||||
list.add("002212023100910505110557287004246355968");
|
||||
list.add("002212023100910563910557288464139866112");
|
||||
list.add("002212023100911040610557290336184643584");
|
||||
list.add("002212023100911370310557298631284994048");
|
||||
list.add("002212023100912332810557312827932704768");
|
||||
list.add("002212023100913072510557321372000038912");
|
||||
list.add("002212023100913142110557323116407382016");
|
||||
list.add("002212023100914513510557347586297827328");
|
||||
list.add("002212023100915242210557355836632461312");
|
||||
list.add("002212023100916071810557366641727078400");
|
||||
list.add("002212023100916425310557375594074701824");
|
||||
list.add("002212023100916484010557377052274544640");
|
||||
list.add("002212023100919022610557410714202779648");
|
||||
list.add("002212023100920230110557430993124421632");
|
||||
list.add("002212023100920350910557434048567017472");
|
||||
list.add("002212023100922045610557456642341957632");
|
||||
list.add("002212023100922274110557462366150569984");
|
||||
list.add("002212023100922301510557463011746365440");
|
||||
list.add("002212023100922304410557463136778014720");
|
||||
list.add("002212023100922320610557463479780360192");
|
||||
list.add("002212023100922324410557463638198632448");
|
||||
list.add("002212023100922330110557463709581803520");
|
||||
list.add("002212023100922361410557464518627852288");
|
||||
list.add("002212023100922373610557464862648860672");
|
||||
list.add("002212023100922403910557465630279577600");
|
||||
list.add("002212023100923001010557470539953999872");
|
||||
list.add("002212023100923042410557471605327634432");
|
||||
list.add("002212023100923083110557472643424444416");
|
||||
list.add("002212023100923234410557476474496143360");
|
||||
list.add("002212023100923262510557477146655436800");
|
||||
list.add("002212023100923305810557478292170190848");
|
||||
list.add("002212023100923324510557478740734226432");
|
||||
list.add("002212023100923363110557479689283358720");
|
||||
list.add("002212023100923481910557482658900480000");
|
||||
list.add("002212023100923512810557483453444263936");
|
||||
list.add("002212023101000035210557486574162071552");
|
||||
list.add("002212023101000181310557490183995097088");
|
||||
list.add("002212023101000185410557490356116750336");
|
||||
list.add("002212023101000203010557490759829004288");
|
||||
list.add("002212023101001224410557506418102161408");
|
||||
list.add("002212023101001352010557509588882296832");
|
||||
list.add("002212023101001355510557509739164651520");
|
||||
list.add("002212023101001490910557513067755827200");
|
||||
list.add("002212023101002081310557517865344532480");
|
||||
list.add("002212023101003093710557533319893618688");
|
||||
list.add("002212023101003334410557539388527472640");
|
||||
list.add("002212023101003554110557544912959778816");
|
||||
list.add("002212023101004051510557547318955458560");
|
||||
list.add("002212023101004161310557550076995284992");
|
||||
list.add("002212023101004313110557553927735132160");
|
||||
list.add("002212023101005162910557565246591180800");
|
||||
list.add("002212023101005192010557565964321034240");
|
||||
list.add("002212023101005364710557570353624244224");
|
||||
list.add("002212023101007253510557597733834674176");
|
||||
list.add("002212023101009100610557624034717818880");
|
||||
list.add("002212023101009262910557628159869956096");
|
||||
list.add("002212023101009322510557629653935423488");
|
||||
list.add("002212023101010341710557645221856899072");
|
||||
list.add("002212023101010451510557647982226292736");
|
||||
list.add("002212023101010494510557649113008836608");
|
||||
list.add("002212023101011311010557659538611613696");
|
||||
list.add("002212023101011593410557666683520253952");
|
||||
list.add("002212023101012072910557668675515576321");
|
||||
list.add("002212023101012413010557677237626449920");
|
||||
list.add("002212023101012511310557679680741924864");
|
||||
list.add("002212023101012574110557681307867262976");
|
||||
list.add("002212023101013122310557685009789190144");
|
||||
list.add("002212023101013145010557685626354790400");
|
||||
list.add("002212023101013173210557686305686208512");
|
||||
list.add("002212023101013473510557693868446556160");
|
||||
list.add("002212023101013480910557694008680693760");
|
||||
list.add("002212023101014350410557705816947277824");
|
||||
list.add("002212023101015163510557716263628394496");
|
||||
list.add("002212023101015303810557719800789778432");
|
||||
list.add("002212023101015354910557721104058916864");
|
||||
list.add("002212023101015375810557721645195886592");
|
||||
list.add("002212023101015383810557721816270614528");
|
||||
list.add("002212023101015414410557722592678502400");
|
||||
list.add("002212023101015535010557725640019333120");
|
||||
list.add("002212023101015543310557725818228015104");
|
||||
list.add("002212023101015555410557726160594055168");
|
||||
list.add("002212023101016151210557731015254700032");
|
||||
list.add("002212023101016164610557731410510458880");
|
||||
list.add("002212023101016174010557731637002743808");
|
||||
list.add("002212023101016365410557736475756253184");
|
||||
list.add("002212023101018142110557761001706405888");
|
||||
list.add("002212023101019173010557776894855852032");
|
||||
list.add("002212023101019585910557787334893613057");
|
||||
list.add("002212023101020311210557795440665460736");
|
||||
list.add("002212023101020511910557800503294472192");
|
||||
list.add("002212023101021130910557805998275252224");
|
||||
list.add("002212023101021160710557806743103131648");
|
||||
list.add("002212023101021254910557809184548581376");
|
||||
list.add("002212023101021325110557810954496335872");
|
||||
list.add("002212023101021361410557811806244622336");
|
||||
list.add("002212023101021575010557817241707462656");
|
||||
list.add("002212023101022214810557823272558473216");
|
||||
list.add("002212023101022303510557825485695561728");
|
||||
list.add("002212023101022312310557825685885497344");
|
||||
list.add("002212023101022335210557826309939212288");
|
||||
list.add("002212023101022394710557827798707449856");
|
||||
list.add("002212023101022410510557828127758663680");
|
||||
list.add("002212023101022555010557831840514621440");
|
||||
list.add("002212023101022593510557832784378044416");
|
||||
list.add("002212023102509494810563069847078420480");
|
||||
list.add("002212023102510460310563084002302054400");
|
||||
list.add("002212023102511124110563090701846355968");
|
||||
list.add("002212023102515344310563156645282902016");
|
||||
list.add("002212023102517555310563192171581886465");
|
||||
list.add("002212023102518195010563198200956100608");
|
||||
list.add("002212023102518554510563207239038910464");
|
||||
list.add("002212023102520555510563237478250602496");
|
||||
list.add("002212023102521045110563239728223133696");
|
||||
list.add("002212023102521143910563242193132945408");
|
||||
list.add("002212023102521192910563243409580007424");
|
||||
list.add("002212023102521223710563244199296192512");
|
||||
list.add("002212023102521234310563244474368217088");
|
||||
list.add("002212023102521570210563252859192963072");
|
||||
list.add("002212023102522155910563257627847467008");
|
||||
list.add("002212023102522193410563258528941170688");
|
||||
list.add("002212023102522274710563260600221925376");
|
||||
list.add("002212023102522342910563262284556705792");
|
||||
list.add("002212023102523022210563269303469297664");
|
||||
list.add("002212023102523071910563270545934163968");
|
||||
list.add("002212023102523094710563271166910484480");
|
||||
list.add("002212023102523130010563271978154807296");
|
||||
list.add("002212023102523235110563274707384705024");
|
||||
list.add("002212023102523430110563279531766407168");
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -2104,13 +1997,12 @@ public class SpringBootTestController {
|
||||
*/
|
||||
@Test
|
||||
public void queryRefundTest() {
|
||||
String wechatAppId = "wx20abc5210391649c";
|
||||
List<String> list = getList();
|
||||
for (String paymentId : list) {
|
||||
Map<String, Object> refundParams = Maps.newHashMap();
|
||||
refundParams.put("payment_id", paymentId);
|
||||
try {
|
||||
Map<String, Object> refund = Refund.query(refundParams, wechatAppId);
|
||||
Map<String, Object> refund = Refund.query(refundParams, wechatAppId2);
|
||||
System.out.println("支付id:" + paymentId + ", 退款信息:" + JSON.toJSONString(refund));
|
||||
System.out.println();
|
||||
} catch (BaseAdaPayException e) {
|
||||
@@ -2124,14 +2016,13 @@ public class SpringBootTestController {
|
||||
*/
|
||||
@Test
|
||||
public void queryPaymentReverseTest() {
|
||||
String wechatAppId = "wx20abc5210391649c";
|
||||
List<String> list = getList();
|
||||
for (String paymentId : list) {
|
||||
try {
|
||||
Map<String, Object> reverse = Maps.newHashMap();
|
||||
reverse.put("payment_id", paymentId);
|
||||
reverse.put("app_id", wechatAppId);
|
||||
Map<String, Object> response = PaymentReverse.queryList(reverse, wechatAppId);
|
||||
reverse.put("app_id", wechatAppId2);
|
||||
Map<String, Object> response = PaymentReverse.queryList(reverse, wechatAppId2);
|
||||
System.out.printf("支付id: %s, 支付撤销信息: %s%n", paymentId, JSON.toJSONString(response));
|
||||
System.out.println();
|
||||
} catch (BaseAdaPayException e) {
|
||||
|
||||
Reference in New Issue
Block a user