|
@@ -256,7 +256,6 @@ public class PayServiceImpl implements PayService {
|
|
|
* 设置第三方支付参数
|
|
|
*/
|
|
|
private JSONObject getPayParameter(Payment payment, HttpServletRequest request, long time) throws Exception {
|
|
|
- String userType = "ENTERPRISE";
|
|
|
//用户IP地址
|
|
|
String userIp = IPUtil.getIpAddr(request);
|
|
|
JSONObject json = new JSONObject();
|
|
@@ -270,11 +269,13 @@ public class PayServiceImpl implements PayService {
|
|
|
json.put("userIp", userIp);
|
|
|
json.put("returnUrl", payment.getReturnUrl());
|
|
|
json.put("notifyUrl", payment.getNotifyUrl());
|
|
|
- if (null != payment.getBankCode()) {
|
|
|
+ if (StringUtils.isNotBlank(payment.getBankCode())) {
|
|
|
json.put("bankCode", payment.getBankCode());
|
|
|
}
|
|
|
- json.put("userType", userType);
|
|
|
- if (null != payment.getOrderId()) {
|
|
|
+ if (StringUtils.isNotBlank(payment.getUserType())) {
|
|
|
+ json.put("userType", payment.getUserType());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotBlank(payment.getOpenid())) {
|
|
|
json.put("openId", payment.getOpenid());
|
|
|
}
|
|
|
return json;
|