Commit c0a8259e authored by 张慧锋's avatar 张慧锋

注释优惠券付费

parent 8cb87fa7
......@@ -115,35 +115,35 @@ public class Pay {
Assert.assertEquals(userVersion,changeVersion,network.message(params, VERSION_INFO,"会员类型版本判断:判断错误,此版本为尊享版",response.body().asString()));
}
@Test (description = "优惠券付费",priority = 5)
public void 优惠券付费 () throws IOException {
String promotionCode = BaseUtils.getPromotionCode();
Map<String, Object> params = new HashMap<String, Object>();
params.put("code",promotionCode);
Response response = network.getResponse(params,PAY_COMBOLIST);
Map<String, Object> payParams = new HashMap<String, Object>();
payParams.put("userVersion",2); // 1 通用版 2 保险版
payParams.put("comboId","Kj21MTU");
payParams.put("oaId","1");
payParams.put("paySource","101004");
payParams.put("sellerFrom","");
payParams.put("promotionCode",promotionCode);
response = network.postResponse(payParams,PAY_ORDERCREATE);
String tradeNo = response.jsonPath().getString("data.tradeNo");
response.body().prettyPrint();
// mock微信回调成功
Map<String, Object> callbackParams = new HashMap<String, Object>();
callbackParams.put("tradeNo",tradeNo);
callbackParams.put("payResult",true);
callbackParams.put("payTradeNo","test");
response = network.getResponse(callbackParams,PAY_CALLOUT);
boolean result = response.jsonPath().getBoolean("data");
response.body().prettyPrint();
Assert.assertTrue(result,network.message(callbackParams,PAY_CALLOUT,"mock微信支付回调成功,但我们订单处理失败",response.body().asString()));
}
// @Test (description = "优惠券付费",priority = 5)
// public void 优惠券付费 () throws IOException {
// String promotionCode = BaseUtils.getPromotionCode();
// Map<String, Object> params = new HashMap<String, Object>();
// params.put("code",promotionCode);
// Response response = network.getResponse(params,PAY_COMBOLIST);
//
// Map<String, Object> payParams = new HashMap<String, Object>();
// payParams.put("userVersion",2); // 1 通用版 2 保险版
// payParams.put("comboId","Kj21MTU");
// payParams.put("oaId","1");
// payParams.put("paySource","101004");
// payParams.put("sellerFrom","");
// payParams.put("promotionCode",promotionCode);
//
// response = network.postResponse(payParams,PAY_ORDERCREATE);
// String tradeNo = response.jsonPath().getString("data.tradeNo");
// response.body().prettyPrint();
//
// // mock微信回调成功
// Map<String, Object> callbackParams = new HashMap<String, Object>();
// callbackParams.put("tradeNo",tradeNo);
// callbackParams.put("payResult",true);
// callbackParams.put("payTradeNo","test");
// response = network.getResponse(callbackParams,PAY_CALLOUT);
// boolean result = response.jsonPath().getBoolean("data");
// response.body().prettyPrint();
// Assert.assertTrue(result,network.message(callbackParams,PAY_CALLOUT,"mock微信支付回调成功,但我们订单处理失败",response.body().asString()));
// }
@Test (description = "默认付费_微信支付后回调",priority = 6)
public void 默认付费_微信支付后回调() throws IOException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment