|
|
|
@@ -181,6 +181,31 @@ public class PosAppTest { |
|
|
|
|
|
|
|
@Test |
|
|
|
public void checkPayCalcTest() throws Exception { |
|
|
|
String memId = "321178010928119808"; |
|
|
|
String phone = "13910154397"; |
|
|
|
String orderAmount = "2000"; |
|
|
|
String orderAmountLeft = "2000"; |
|
|
|
String selCoList = "[]"; |
|
|
|
String sceneType = String.valueOf(EnumPosSceneType.PAY.getCode()); |
|
|
|
Map<String, String> reqObj = new HashMap<>(); |
|
|
|
reqObj.put(WxPayConstant.NONCE_STR, "1"); |
|
|
|
reqObj.put(WxPayConstant.DEV_ID, devId); |
|
|
|
reqObj.put(WxPayConstant.TENANT_ID, tenantId); |
|
|
|
reqObj.put(WxPayConstant.MERCHANT_ID, merchantId); |
|
|
|
reqObj.put(WxPayConstant.BUSER_ID, buUserId); |
|
|
|
reqObj.put(WxPayConstant.MEM_ID, memId); |
|
|
|
reqObj.put(WxPayConstant.MEM_PHONE, phone); |
|
|
|
reqObj.put(WxPayConstant.SCENE_TYPE, sceneType); |
|
|
|
reqObj.put(WxPayConstant.ORDER_AMOUNT, orderAmount); |
|
|
|
reqObj.put(WxPayConstant.ORDER_AMOUNT_LEFT, orderAmountLeft); |
|
|
|
reqObj.put(WxPayConstant.ORDER_CREATE_SN, posSN); |
|
|
|
reqObj.put(WxPayConstant.COUPON_ORDER_LIST, selCoList); |
|
|
|
boolean resSigned = sendAndRes("/queryAndCalc", reqObj); |
|
|
|
Assert.assertEquals(resSigned, true); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
public void checkPayCalc1Test() throws Exception { |
|
|
|
String memId = "321178010928119808"; |
|
|
|
String phone = "13910154397"; |
|
|
|
String orderAmount = "20000"; |
|
|
|
|