Просмотр исходного кода

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

release_toaliyun_real
Stormeye.Wu 7 лет назад
Родитель
Сommit
e5a06248f1
2 измененных файлов: 8 добавлений и 4 удалений
  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 Просмотреть файл

@@ -28,8 +28,8 @@ public class WxProfitSharing {
* @param params
* @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) {
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 Просмотреть файл

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

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);
String return_code = returnMap.get("return_code");
@@ -273,7 +273,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
wxProfitSharingQueryP.setSign_type("HMAC-SHA256");

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);
String return_code = returnMap.get("return_code");


Загрузка…
Отмена
Сохранить