|
|
@@ -7,6 +7,8 @@ import com.uas.platform.b2c.fa.payment.service.PinganTradeService;
|
|
|
import com.uas.platform.b2c.fa.payment.support.UserInfoSupport;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
@@ -41,21 +43,54 @@ public class PinganTradeServiceImpl implements PinganTradeService {
|
|
|
@Override
|
|
|
public String pay(Boolean isPersonal) {
|
|
|
HashMap<String, String> map = new HashMap<>();
|
|
|
- Map<String, String> infoMap = userInfoSupport.getUserInfoMap(isPersonal);
|
|
|
- map.put("FuncFlag","6");
|
|
|
+ //正常交易====交易成功
|
|
|
+ //map.put("FuncFlag","1");//下单预支付(付款方→担保) FuncFlag送1,付款方填买方,收款方填卖方
|
|
|
+
|
|
|
+ //可有余额不足;交易失败;
|
|
|
+ //map.put("FuncFlag","2");//确认并付款(担保→收款方) FuncFlag送2,付款方填买方,收款方填卖方
|
|
|
+
|
|
|
+ //交易成功
|
|
|
+ map.put("FuncFlag","6");//直接支付(会员A→会员B) FuncFlag送6,付款方填买方,收款方填卖方
|
|
|
+
|
|
|
+ //退款
|
|
|
+ //map.put("FuncFlag","1");//卖方直接支付退款给买方(FuncFlag送1,付款方填卖方,收款方填买方)
|
|
|
+
|
|
|
+ //交易失败;可用余额不足
|
|
|
+ //map.put("FuncFlag","3");//退款(担保→付款方) FuncFlag送3,付款方填买方,收款方填卖方
|
|
|
+
|
|
|
+
|
|
|
+ //支付
|
|
|
map.put("OutCustAcctId","3239000000006038");
|
|
|
map.put("OutThirdCustId","1000103422100010342311");
|
|
|
- map.put("OutCustName","yuj");
|
|
|
- map.put("InCustAcctId","3239000000006028");
|
|
|
- map.put("InThirdCustId","10001034100010342311");
|
|
|
- map.put("TranAmount","10");
|
|
|
- map.put("TranFee","1");
|
|
|
+ map.put("OutCustName","彭朝红");
|
|
|
+ map.put("InCustAcctId","3239000000006087");
|
|
|
+ map.put("InThirdCustId","10000017781004351710");
|
|
|
+ map.put("TranAmount","0.1");
|
|
|
+ map.put("TranFee","0.01");
|
|
|
map.put("TranType","01");
|
|
|
map.put("CcyCode","RMB");
|
|
|
- map.put("ThirdHtId","210241041004");
|
|
|
- // map.put("SerialNo","3239000000006038");
|
|
|
- map.put("MessageCode","1111111");
|
|
|
+ map.put("ThirdHtId","065005413232");
|
|
|
+ map.put("SerialNo","18011400793208");
|
|
|
+ map.put("MessageCode","321919");
|
|
|
map.put("useruu","1000103422");
|
|
|
+
|
|
|
+ //直接退款
|
|
|
+ map.put("OutCustAcctId","3239000000006038");
|
|
|
+ map.put("OutThirdCustId","1000103422100010342311");
|
|
|
+ map.put("OutCustName","彭朝红");
|
|
|
+
|
|
|
+ map.put("InCustAcctId","3239000000006087");
|
|
|
+ map.put("InThirdCustId","10000017781004351710");
|
|
|
+
|
|
|
+ map.put("TranAmount","0.1");
|
|
|
+ map.put("TranFee","0.01");
|
|
|
+ map.put("TranType","01");
|
|
|
+ map.put("CcyCode","RMB");
|
|
|
+ map.put("ThirdHtId","065005413232");
|
|
|
+ map.put("SerialNo","18011400793208");
|
|
|
+ map.put("MessageCode","321919");
|
|
|
+ map.put("useruu","1000103422");
|
|
|
+
|
|
|
String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/pay", map, String.class);
|
|
|
return resultStr;
|
|
|
}
|
|
|
@@ -73,20 +108,20 @@ public class PinganTradeServiceImpl implements PinganTradeService {
|
|
|
map.put("CustAcctId","3239000000006038");
|
|
|
map.put("ThirdCustId","1000103422100010342311");
|
|
|
map.put("CustName","yuj");
|
|
|
- map.put("OutAcctId","1000103422100010342311");
|
|
|
- map.put("OutAcctIdName","1000103422100010342311");
|
|
|
+ map.put("OutAcctId","6216913101686468");
|
|
|
+ map.put("OutAcctIdName","彭朝红");
|
|
|
map.put("CcyCode","RMB");
|
|
|
- map.put("TranAmount","1000103422100010342311");
|
|
|
- map.put("HandFee","1000103422100010342311");
|
|
|
- map.put("SerialNo","1000103422100010342311");
|
|
|
- map.put("MessageCode","1000103422100010342311");
|
|
|
+ map.put("TranAmount","300");
|
|
|
+ map.put("HandFee","0.2");
|
|
|
+ map.put("SerialNo","18011300791284");
|
|
|
+ map.put("MessageCode","026346");
|
|
|
map.put("Note","");
|
|
|
map.put("WebSign","");
|
|
|
String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/withdrawCash/verification", map, String.class);
|
|
|
return resultStr;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ /**88888888888888888888888888888
|
|
|
* 申请提现或支付短信动态码【6082】
|
|
|
* @param isPersonal
|
|
|
* @return String
|
|
|
@@ -96,12 +131,14 @@ public class PinganTradeServiceImpl implements PinganTradeService {
|
|
|
HashMap<String, String> map = new HashMap<>();
|
|
|
map.put("CustAcctId","3239000000006038");
|
|
|
map.put("ThirdCustId","1000103422100010342311");
|
|
|
- map.put("TranType","2");
|
|
|
- map.put("TranAmount","10");
|
|
|
- map.put("ThirdHtId","");
|
|
|
+ //map.put("TranType","1");//提现
|
|
|
+ map.put("TranType","2");//支付
|
|
|
+ map.put("TranAmount","0.1");
|
|
|
+ //在做支付的时候要选的;和支付接口保持一致
|
|
|
+ map.put("ThirdHtId","06500541323252");
|
|
|
map.put("useruu","1000103422");
|
|
|
map.put("AcctId","");
|
|
|
- map.put("ThirdHtId","210241041004");
|
|
|
+
|
|
|
String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/getSMSVerification", map, String.class);
|
|
|
return resultStr;
|
|
|
}
|
|
|
@@ -129,6 +166,128 @@ public class PinganTradeServiceImpl implements PinganTradeService {
|
|
|
return resultStr;
|
|
|
}
|
|
|
|
|
|
+ /**8888888888888888888888888888888888888
|
|
|
+ * 查询银行单笔交易状态(6094优化版)【6110】
|
|
|
+ *
|
|
|
+ * @param isPersonal 传入的时间
|
|
|
+ * @return String
|
|
|
+ */
|
|
|
+ public String orderTradeStatus(Boolean isPersonal) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("FuncFlag","3");
|
|
|
+ map.put("OrigThirdLogNo","JBA67LXU51BUX0000000");
|
|
|
+ map.put("CustAcctId","3239000000006038");
|
|
|
+ String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/query/order/status", map, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 交易撤销【6077】
|
|
|
+ *
|
|
|
+ * @param isPersonal
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String expenditureApply(Boolean isPersonal) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("FuncFlag","1");//对应撤销6056接口 清分撤销
|
|
|
+ //map.put("FuncFlag","2");//对应撤销6135接口 清分冻结撤销
|
|
|
+ //map.put("FuncFlag","3");//清分+冻结
|
|
|
+ map.put("OrigThirdLogNo","JBA66NARX9LFH0000000");
|
|
|
+ String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/expenditure/apply", map, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询银行子账户余额【6010】
|
|
|
+ *
|
|
|
+ * @param isPersonal 传入的数据
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/settleAccount/query",method = RequestMethod.POST)
|
|
|
+ public String querySettleAccounts(Boolean isPersonal) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("CustAcctId","3239000000006038");
|
|
|
+ //若SelectFlag为2时,子账号必输。
|
|
|
+ map.put("SelectFlag","2");
|
|
|
+ //map.put("SelectFlag","3");
|
|
|
+ map.put("PageNum","1");
|
|
|
+ String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/settleAccount/query", map, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询银行提现退单信息【6048】
|
|
|
+ * @param isPersonal 传入的数据
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String queryWithdrawChargeBack(Boolean isPersonal) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("FuncFlag","1");
|
|
|
+ map.put("BeginDate","20180113");
|
|
|
+ map.put("EndDate","20180114");
|
|
|
+ String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/withDrawChargeBack", map, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *查询普通转账充值明细【6050】
|
|
|
+ *
|
|
|
+ * @param isPersonal 传入的数据
|
|
|
+ * @return String
|
|
|
+ */
|
|
|
+ public String queryTransferAccountsDetail(Boolean isPersonal) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("FuncFlag","1");
|
|
|
+ map.put("BeginDate","20180112");
|
|
|
+ map.put("EndDate","20180114");
|
|
|
+ map.put("PageNum","1");
|
|
|
+ String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/query/transferDetail", map, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询银行时间段内交易明细【6072】
|
|
|
+ *
|
|
|
+ * @param isPersonal 输入的信息
|
|
|
+ * @return String
|
|
|
+ */
|
|
|
+ public String queryAccountTradeInfo(Boolean isPersonal) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("FuncFlag","1");//当天
|
|
|
+ //map.put("FuncFlag","2");//历史
|
|
|
+ map.put("CustAcctId","3239000000006038");
|
|
|
+ map.put("SelectFlag","1");
|
|
|
+ map.put("BeginDate","20180113");
|
|
|
+ map.put("EndDate","20180114");
|
|
|
+ map.put("PageNum","1");
|
|
|
+ String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/query/trade", map, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 登记挂账【6008】(挂账子账户中余额转到对应的子账户)
|
|
|
+ *
|
|
|
+ * @param isPersonal
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String distributionSpecialAccount(Boolean isPersonal) {
|
|
|
+ HashMap<String, String> map = new HashMap<>();
|
|
|
+ map.put("CustAcctId","3239000000006038");
|
|
|
+ map.put("ThirdCustId","1000103422100010342311");
|
|
|
+ map.put("CustName","2");
|
|
|
+ map.put("TranAmount","10");
|
|
|
+ map.put("CcyCode","RMB");
|
|
|
+ map.put("Note","");
|
|
|
+
|
|
|
+ String resultStr = restTemplate.postForObject("http://192.168.253.212:20280/pingan/trade/distributionSpecialAccount", map, String.class);
|
|
|
+ return resultStr;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查询充值明细(见证+收单)【6146】
|
|
|
*
|