|
|
|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import com.iformall.PosApplication; |
|
|
|
import com.iformall.enums.EnumNeuPosPamentType; |
|
|
|
import com.iformall.enums.EnumPosSceneType; |
|
|
|
import com.iformall.pay.WxPayConstant; |
|
|
|
import com.iformall.pay.WxPayment; |
|
|
|
@@ -137,8 +138,9 @@ public class PosAppTest { |
|
|
|
|
|
|
|
@Test |
|
|
|
public void payCalculateTest_NoCouponOrder() throws Exception { |
|
|
|
String memId = "321178010928119808"; |
|
|
|
String phone = "13910154397"; |
|
|
|
//String memId = "321178010928119808"; |
|
|
|
//String phone = "13910154397"; |
|
|
|
String cardId = "321883878446825472"; |
|
|
|
String orderAmount = "2000"; |
|
|
|
String orderAmountLeft = "2000"; |
|
|
|
String selCoList = "[]"; |
|
|
|
@@ -149,8 +151,9 @@ public class PosAppTest { |
|
|
|
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.MEM_ID, memId); |
|
|
|
//reqObj.put(WxPayConstant.MEM_PHONE, phone); |
|
|
|
reqObj.put(WxPayConstant.CARD_ID, cardId); |
|
|
|
reqObj.put(WxPayConstant.SCENE_TYPE, sceneType); |
|
|
|
reqObj.put(WxPayConstant.ORDER_AMOUNT, orderAmount); |
|
|
|
reqObj.put(WxPayConstant.ORDER_AMOUNT_LEFT, orderAmountLeft); |
|
|
|
@@ -316,8 +319,8 @@ public class PosAppTest { |
|
|
|
String posOrderId = "2"; |
|
|
|
String orderAmount = "1000"; |
|
|
|
String posPayOrderId = "2"; |
|
|
|
String posPaymentType = "4"; |
|
|
|
String posPaymentTypeDes = "优惠券"; |
|
|
|
String posPaymentType = String.valueOf(EnumNeuPosPamentType.MEM_COUPON.getCode()); |
|
|
|
String posPaymentTypeDes = EnumNeuPosPamentType.MEM_COUPON.getMessage(); |
|
|
|
String posPaymentStatus = "0"; |
|
|
|
|
|
|
|
String couponOrderId = "321878223800205312"; |
|
|
|
@@ -414,17 +417,14 @@ public class PosAppTest { |
|
|
|
|
|
|
|
@Test |
|
|
|
public void cardPaySyncTest() throws Exception { |
|
|
|
String memId = "321178010928119808"; |
|
|
|
String memPhone = "13910154397"; |
|
|
|
String sceneType = "1"; // 支付 |
|
|
|
String posOrderId = "2"; |
|
|
|
String orderAmount = "1000"; |
|
|
|
String posOrderId = "1"; |
|
|
|
String orderAmount = "2000"; |
|
|
|
String posPayOrderId = "2"; |
|
|
|
String posPaymentType = "4"; |
|
|
|
String posPaymentTypeDes = "优惠券"; |
|
|
|
String posPaymentType = String.valueOf(EnumNeuPosPamentType.MEM_CARD.getCode()); |
|
|
|
String posPaymentTypeDes = EnumNeuPosPamentType.MEM_CARD.getMessage(); |
|
|
|
String posPaymentStatus = "0"; |
|
|
|
|
|
|
|
String couponOrderId = "321878223800205312"; |
|
|
|
String cardSpendId = "328803369448411136"; |
|
|
|
|
|
|
|
Date curDate = new Date(); |
|
|
|
|
|
|
|
@@ -435,7 +435,7 @@ public class PosAppTest { |
|
|
|
payDetailOne.put(WxPayConstant.NEU_PAY_ORDER_TYPE_DES, posPaymentTypeDes); |
|
|
|
payDetailOne.put(WxPayConstant.NEU_PAY_ORDER_PARAM, "{}"); |
|
|
|
payDetailOne.put(WxPayConstant.NEU_PAY_ORDER_STATUS, posPaymentStatus); |
|
|
|
payDetailOne.put(WxPayConstant.NEU_PAY_ORDER_OUT_NO, couponOrderId); |
|
|
|
payDetailOne.put(WxPayConstant.NEU_PAY_ORDER_OUT_NO, cardSpendId); |
|
|
|
payDetailOne.put(WxPayConstant.NEU_PAY_ORDER_AMOUNT, orderAmount); |
|
|
|
payDetailOne.put(WxPayConstant.NEU_PAY_ORDER_OUT_TIME, neuDateFormat.format(curDate)); |
|
|
|
|
|
|
|
@@ -448,8 +448,6 @@ public class PosAppTest { |
|
|
|
reqObj.put(WxPayConstant.NEU_TENANT_ID, tenantId); |
|
|
|
reqObj.put(WxPayConstant.NEU_MERCHANT_ID, merchantId); |
|
|
|
reqObj.put(WxPayConstant.NEU_BU_USER_ID, buUserId); |
|
|
|
reqObj.put(WxPayConstant.NEU_MEM_ID, memId); |
|
|
|
reqObj.put(WxPayConstant.NEU_MEM_PHONE, memPhone); |
|
|
|
reqObj.put(WxPayConstant.NEU_ORDER_SCENE_TYPE, sceneType); |
|
|
|
reqObj.put(WxPayConstant.NEU_ORDER_ID, posOrderId); |
|
|
|
reqObj.put(WxPayConstant.NEU_ORDER_TIME, neuDateFormat.format(curDate)); |
|
|
|
|