|
|
|
@ -26,9 +26,7 @@ import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.io.BufferedOutputStream; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.SortedMap; |
|
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
|
|
@Controller |
|
|
|
|
@RequestMapping(value = "/wechatpay") |
|
|
|
@ -169,13 +167,19 @@ public class WechatPayController { |
|
|
|
|
wxSharingOrderRequest.setAppid("wx637bd6f7314daa46"); |
|
|
|
|
wxSharingOrderRequest.setNonce_str(WxUtils.makeNonStr()); |
|
|
|
|
|
|
|
|
|
List<WxSharingReceiversVO> list = new ArrayList<>(); |
|
|
|
|
/* List<WxSharingReceiversVO> list = new ArrayList<>(); |
|
|
|
|
WxSharingReceiversVO receiversVO = new WxSharingReceiversVO(); |
|
|
|
|
receiversVO.setAccount(wxSharingOrderRequest.getSub_mch_id()); |
|
|
|
|
receiversVO.setType("MERCHANT_ID"); |
|
|
|
|
receiversVO.setRelation_type("SERVICE_PROVIDER"); |
|
|
|
|
list.add(receiversVO); |
|
|
|
|
wxSharingOrderRequest.setReceivers(JSONObject.toJSONString(list)); |
|
|
|
|
list.add(receiversVO);*/ |
|
|
|
|
|
|
|
|
|
Map<String,Object> receiversVO = new HashMap<>(); |
|
|
|
|
receiversVO.put("type", "MERCHANT_ID"); |
|
|
|
|
receiversVO.put("relation_type", "SERVICE_PROVIDER"); |
|
|
|
|
receiversVO.put("account", wxSharingOrderRequest.getSub_mch_id()); |
|
|
|
|
receiversVO.put("name", "个体户"); |
|
|
|
|
wxSharingOrderRequest.setReceiver(JSONObject.toJSONString(receiversVO)); |
|
|
|
|
|
|
|
|
|
BeanMap beanMap = BeanMap.create(wxSharingOrderRequest); |
|
|
|
|
wxSharingOrderRequest.setSign(WxUtils.makeSign(beanMap, "SHA256" ,"SHA256")); |
|
|
|
|