|
@@ -15,6 +15,7 @@ import org.jdom.JDOMException;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import weixin.popular.api.SnsAPI;
|
|
@@ -38,10 +39,10 @@ public class WxpayServiceImpl extends PayService implements OrderPayService {
|
|
|
|
|
|
private WxPayUtil wxPayUtil;
|
|
|
|
|
|
- @Value("server.domain")
|
|
|
+ @Value("${server.domain}")
|
|
|
private String serverUrl;
|
|
|
|
|
|
- @Value("payConfig.wx.notifyUrl")
|
|
|
+ @Value("${payConfig.wx.notifyUrl}")
|
|
|
private String notifyUrl;
|
|
|
|
|
|
private String filePath = "/tmp/wxpay/";
|
|
@@ -70,12 +71,10 @@ public class WxpayServiceImpl extends PayService implements OrderPayService {
|
|
|
|
|
|
switch (product.getPayDevice()) {
|
|
|
case 1:
|
|
|
-
|
|
|
return this.mobile(product, "NATIVE");
|
|
|
case 2:
|
|
|
case 3:
|
|
|
return this.mobile(product, "MWEB");
|
|
|
-
|
|
|
case 4:
|
|
|
return this.mp(product);
|
|
|
default:
|
|
@@ -238,7 +237,7 @@ public class WxpayServiceImpl extends PayService implements OrderPayService {
|
|
|
totalFee = wxPayUtil.subZeroAndDot(this.totalFee);
|
|
|
packageParams.put("total_fee", totalFee);
|
|
|
packageParams.put("spbill_create_ip", product.getSpbillCreateIp());
|
|
|
- packageParams.put("notify_url", "https://localhost");
|
|
|
+ packageParams.put("notify_url", notifyUrl);
|
|
|
packageParams.put("trade_type", trade_type);
|
|
|
packageParams.put("attach", JSONObject.toJSONString(this.attach));
|
|
|
|