|
|
@@ -21,16 +21,55 @@ public class PayScoreServiceImplTest { |
|
|
|
private WxPayService payService; |
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testCreateServiceOrder() throws WxPayException { |
|
|
|
//测试数据 |
|
|
|
/* { |
|
|
|
"out_order_no":"QLS202005201058000201", |
|
|
|
"appid":"", |
|
|
|
"service_id":"", |
|
|
|
"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 |
|
|
|
}*/ |
|
|
|
|
|
|
|
this.payService.getPayScoreService().createServiceOrder(WxPayScoreRequest.builder().build()); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testQueryServiceOrder() { |
|
|
|
//两个参数选填一个 |
|
|
|
this.payService.getPayScoreService().queryServiceOrder("11",""); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testCancelServiceOrder() { |
|
|
|
this.payService.getPayScoreService().cancelServiceOrder("11","测试取消"); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
@@ -38,8 +77,27 @@ public class PayScoreServiceImplTest { |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testCompleteServiceOrder() { |
|
|
|
} |
|
|
|
public void testCompleteServiceOrder() throws WxPayException{ |
|
|
|
/* { |
|
|
|
"appid":"", |
|
|
|
"service_id":"", |
|
|
|
"time_range":{ |
|
|
|
"end_time":"20200520111702" |
|
|
|
}, |
|
|
|
"need_user_confirm":false, |
|
|
|
"profit_sharing":false, |
|
|
|
"post_payments":[ |
|
|
|
{ |
|
|
|
"name":"租借服务", |
|
|
|
"amount":100, |
|
|
|
"description":"服务费:1.0000元/台", |
|
|
|
"count":1 |
|
|
|
} |
|
|
|
], |
|
|
|
"total_amount":100 |
|
|
|
} |
|
|
|
}*/ |
|
|
|
this.payService.getPayScoreService().completeServiceOrder(WxPayScoreRequest.builder().build()); |
|
|
|
|
|
|
|
@Test |
|
|
|
public void testPayServiceOrder() { |
|
|
|