| | |
| | | import com.oying.modules.hwc.utils.SignUtils; |
| | | import com.oying.modules.hwc.utils.XmlUtils; |
| | | import com.oying.modules.security.config.SwiftPassProperties; |
| | | import com.oying.modules.security.config.WeiXinProperties; |
| | | import com.oying.modules.sh.service.OrderReturnService; |
| | | import com.oying.modules.sh.service.OrderService; |
| | | import com.oying.utils.enums.PayTypeEnum; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | |
| | | private final SwiftPassProperties properties; |
| | | private final OrderService orderService; |
| | | private final OrderReturnService returnService; |
| | | private final WeiXinProperties weiXinProperties; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public HwcResponse pay(String ip, Integer total, String timeExpire, String description, String openId, |
| | | public HwcResponse pay(String ip, String total, String timeExpire, String description, String openId, |
| | | String orderNum, PayTypeEnum status) throws IOException { |
| | | SortedMap<String, String> map = new TreeMap<>(); |
| | | map.put("service", service_pay); |
| | |
| | | map.put("out_trade_no", orderNum); |
| | | map.put("body", description); |
| | | map.put("sub_openid", openId); |
| | | map.put("sub_appid", properties.getAppId()); |
| | | map.put("total_fee", String.valueOf(total)); |
| | | map.put("sub_appid", weiXinProperties.getAppId()); |
| | | map.put("total_fee", total); |
| | | map.put("mch_create_ip", ip); |
| | | map.put("notify_url", properties.getNotifyUrl()); |
| | | map.put("time_expire", timeExpire); |