| | |
| | | import com.java110.utils.util.PayUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | /** |
| | | * 微信支付 |
| | | */ |
| | | @Service |
| | | public class QrCodeWechatPaymentAdapt implements IQrCodePaymentSMO { |
| | | private static Logger logger = LoggerFactory.getLogger(QrCodeWechatPaymentAdapt.class); |
| | | |
| | |
| | | if (WECHAT_SERVICE_PAY_SWITCH_ON.equals(paySwitch)) { |
| | | paramMap.put("appid", MappingCache.getValue(DOMAIN_WECHAT_PAY, WECHAT_SERVICE_APP_ID)); //服务商appid,是服务商注册时公众号的id |
| | | paramMap.put("mch_id", MappingCache.getValue(DOMAIN_WECHAT_PAY, WECHAT_SERVICE_MCH_ID)); //服务商商户号 |
| | | paramMap.put("sub_appid", smallWeChatDto.getAppId());//起调小程序appid |
| | | paramMap.put("sub_mch_id", smallWeChatDto.getMchId());//起调小程序的商户号 |
| | | paramMap.put("sub_appid", shopSmallWeChatDto.getAppId());//起调小程序appid |
| | | paramMap.put("sub_mch_id", shopSmallWeChatDto.getMchId());//起调小程序的商户号 |
| | | paramMap.remove("openid"); |
| | | } |
| | | paramMap.put("sign", PayUtil.createSign(paramMap, smallWeChatDto.getPayPassword())); |
| | | paramMap.put("sign", PayUtil.createSign(paramMap, shopSmallWeChatDto.getPayPassword())); |
| | | //转换为xml |
| | | String xmlData = PayUtil.mapToXml(paramMap); |
| | | |