Ver a proveniência

[分账][新增]:分账请求

release_toaliyun_real
Stormeye.Wu há 7 anos
ascendente
cometimento
e5a06248f1
2 ficheiros alterados com 8 adições e 4 eliminações
  1. +6
    -2
      mallinkService/src/main/java/com/simple/pay/WxProfitSharing.java
  2. +2
    -2
      mallinkService/src/main/java/com/simple/service/impl/WxProfitSharingOrderServiceImpl.java

+ 6
- 2
mallinkService/src/main/java/com/simple/pay/WxProfitSharing.java Ver ficheiro

@@ -28,8 +28,8 @@ public class WxProfitSharing {
* @param params * @param params
* @return * @return
*/ */
public static String pushOrder(Map<String, String> params) {
return doPost(PROFIT_SHARING_URL, params);
public static String pushOrder(Map<String, String> params, String certPath, String certPass) {
return doPostSSL(PROFIT_SHARING_URL, params, certPath, certPass);
} }


/** /**
@@ -59,4 +59,8 @@ public class WxProfitSharing {
public static String doPost(String url, Map<String, String> params) { public static String doPost(String url, Map<String, String> params) {
return HttpUtil.payPost(url, WxPayment.toXml(params)); return HttpUtil.payPost(url, WxPayment.toXml(params));
} }

public static String doPostSSL(String url, Map<String, String> params, String certPath, String certPass) {
return HttpUtil.payPostSSL(url, WxPayment.toXml(params), certPath, certPass);
}
} }

+ 2
- 2
mallinkService/src/main/java/com/simple/service/impl/WxProfitSharingOrderServiceImpl.java Ver ficheiro

@@ -214,7 +214,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
wxProfitSharingP.setReceivers(receivers.toJSONString()); wxProfitSharingP.setReceivers(receivers.toJSONString());


wxProfitSharingP.setSign(WxPayment.createSignHMAC(BeanUtils.toStringMap(wxProfitSharingP), payAccount.getApiKey())); wxProfitSharingP.setSign(WxPayment.createSignHMAC(BeanUtils.toStringMap(wxProfitSharingP), payAccount.getApiKey()));
String response = WxProfitSharing.pushOrder(BeanUtils.toStringMap(wxProfitSharingP));
String response = WxProfitSharing.pushOrder(BeanUtils.toStringMap(wxProfitSharingP), payAccount.getCertPath(), payAccount.getMchId());


Map<String, String> returnMap = WxPayment.xmlToMap(response); Map<String, String> returnMap = WxPayment.xmlToMap(response);
String return_code = returnMap.get("return_code"); String return_code = returnMap.get("return_code");
@@ -273,7 +273,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
wxProfitSharingQueryP.setSign_type("HMAC-SHA256"); wxProfitSharingQueryP.setSign_type("HMAC-SHA256");


wxProfitSharingQueryP.setSign(WxPayment.createSignHMAC(BeanUtils.toStringMap(wxProfitSharingQueryP), payAccount.getApiKey())); wxProfitSharingQueryP.setSign(WxPayment.createSignHMAC(BeanUtils.toStringMap(wxProfitSharingQueryP), payAccount.getApiKey()));
String response = WxProfitSharing.pushOrder(BeanUtils.toStringMap(wxProfitSharingQueryP));
String response = WxProfitSharing.pushOrder(BeanUtils.toStringMap(wxProfitSharingQueryP), payAccount.getCertPath(), payAccount.getMchId());


Map<String, String> returnMap = WxPayment.xmlToMap(response); Map<String, String> returnMap = WxPayment.xmlToMap(response);
String return_code = returnMap.get("return_code"); String return_code = returnMap.get("return_code");


Carregando…
Cancelar
Guardar