1
0
mirror of synced 2025-12-26 04:27:56 +08:00

🎨 优化代码

This commit is contained in:
Binary Wang
2020-07-11 21:40:33 +08:00
parent b93169e78c
commit 4ab50809d8
10 changed files with 116 additions and 46 deletions

View File

@@ -0,0 +1,54 @@
package com.github.binarywang.wxpay.bean.payscore;
import org.testng.annotations.Test;
/**
* @author <a href="https://github.com/binarywang">Binary Wang</a>
* @date 2020-07-11
*/
public class WxPayScoreRequestTest {
@Test
public void testToJson() {
WxPayScoreRequest request = WxPayScoreRequest.builder()
.outOrderNo("QLS202005201058000201")
.appid("123")
.serviceId("345")
.serviceIntroduction("租借服务")
.timeRange(new TimeRange("OnAccept", "20200520225840"))
.build();
System.out.println(request.toJson());
/* {
"out_order_no":"QLS202005201058000201",
"appid":"123",
"service_id":"345",
"service_introduction":"租借服务",
"time_range":{
"start_time":"OnAccept",
"end_time":"20200520225840"
},
"location":{
"start_location":"山",
"end_location":"山"
},
"risk_fund":{
"name":"DEPOSIT",
"amount":200,
"description":"丢失偿还费用2元/台"
},
"attach":"",
"notify_url":"/pay/notify/payScore",
"openid":"",
"need_user_confirm":true,
"profit_sharing":false,
"post_payments":[
{
"name":"租借服务",
"amount":100,
"description":"服务费1元/台",
"count":1
}
],
"total_amount":0
}*/
}
}

View File

@@ -64,7 +64,7 @@ public class PayScoreServiceImplTest {
}
@Test
public void testQueryServiceOrder() throws URISyntaxException, WxPayException {
public void testQueryServiceOrder() throws WxPayException {
//两个参数选填一个
this.payService.getPayScoreService().queryServiceOrder("11", "");
}