Skip to content

Commit

Permalink
#186 PayMchAPI 更新接口 payProfitsharingaddreceiver,
Browse files Browse the repository at this point in the history
payProfitsharingremovereceiver
  • Loading branch information
liyi committed Jan 29, 2019
1 parent 0dfae81 commit c654872
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/weixin/popular/api/PayMchAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,10 @@ public static PayProfitsharingqueryResult payProfitsharingquery(PayProfitsharing
* @return MchBaseResult
*/
public static MchBaseResult payProfitsharingaddreceiver(PayProfitsharingOperation payProfitsharingOperation,String key){
Map<String,String> map = MapUtil.objectToMap(payProfitsharingOperation);
Map<String,String> map = MapUtil.objectToMap(payProfitsharingOperation, "receiver");
if(payProfitsharingOperation.getReceiver() != null){
map.put("receiver", JsonUtil.toJSONString(payProfitsharingOperation.getReceiver()));
}
String sign = SignatureUtil.generateSign(map,payProfitsharingOperation.getSign_type() == null? "HMAC-SHA256": payProfitsharingOperation.getSign_type(),key);
payProfitsharingOperation.setSign(sign);
String xml = XMLConverUtil.convertToXML(payProfitsharingOperation);
Expand All @@ -837,7 +840,10 @@ public static MchBaseResult payProfitsharingaddreceiver(PayProfitsharingOperatio
* @return MchBaseResult
*/
public static MchBaseResult payProfitsharingremovereceiver(PayProfitsharingOperation payProfitsharingOperation,String key){
Map<String,String> map = MapUtil.objectToMap(payProfitsharingOperation);
Map<String,String> map = MapUtil.objectToMap(payProfitsharingOperation, "receiver");
if(payProfitsharingOperation.getReceiver() != null){
map.put("receiver", JsonUtil.toJSONString(payProfitsharingOperation.getReceiver()));
}
String sign = SignatureUtil.generateSign(map,payProfitsharingOperation.getSign_type() == null? "HMAC-SHA256": payProfitsharingOperation.getSign_type(),key);
payProfitsharingOperation.setSign(sign);
String xml = XMLConverUtil.convertToXML(payProfitsharingOperation);
Expand Down

0 comments on commit c654872

Please sign in to comment.