createPayRequest调整

This commit is contained in:
jinyu 2015-12-19 18:41:45 +08:00
parent 292a56f6f1
commit 235e26f350
3 changed files with 6 additions and 8 deletions

View File

@ -127,7 +127,7 @@ public class Pay3Api {
* @return 支付json串 * @return 支付json串
* @throws WeixinPayException * @throws WeixinPayException
*/ */
public MchPayRequest createPayJsRequestJson(String openId, String body, public MchPayRequest createPayJsRequest(String openId, String body,
String outTradeNo, double totalFee, String notifyUrl, String outTradeNo, double totalFee, String notifyUrl,
String createIp) throws WeixinPayException { String createIp) throws WeixinPayException {
return createPayJsRequest(openId, body, outTradeNo, totalFee, return createPayJsRequest(openId, body, outTradeNo, totalFee,

View File

@ -111,11 +111,11 @@ public class WeixinPayProxy {
* @see com.foxinmy.weixin4j.payment.mch.MchPayRequest * @see com.foxinmy.weixin4j.payment.mch.MchPayRequest
* @throws WeixinPayException * @throws WeixinPayException
*/ */
public MchPayRequest createPayJsRequestJson(String openId, String body, public MchPayRequest createPayJsRequest(String openId, String body,
String outTradeNo, double totalFee, String notifyUrl, String outTradeNo, double totalFee, String notifyUrl,
String createIp) throws WeixinPayException { String createIp) throws WeixinPayException {
return pay3Api.createPayJsRequestJson(openId, body, outTradeNo, return pay3Api.createPayJsRequest(openId, body, outTradeNo, totalFee,
totalFee, notifyUrl, createIp); notifyUrl, createIp);
} }
/** /**

View File

@ -43,14 +43,12 @@ public class MchPayRequest extends PayRequest {
} }
public MchPayRequest(PrePay prePay) { public MchPayRequest(PrePay prePay) {
this.setAppId(prePay.getAppId()); super(prePay.getAppId(), "prepay_id=" + prePay.getPrepayId());
this.setPackageInfo("prepay_id=" + prePay.getPrepayId());
this.prePay = prePay; this.prePay = prePay;
} }
public MchPayRequest(String appId, String prepayId) { public MchPayRequest(String appId, String prepayId) {
this.setAppId(appId); super(appId, "prepay_id=" + prepayId);
this.setPackageInfo("prepay_id=" + prepayId);
this.prePay = new PrePay(); this.prePay = new PrePay();
this.prePay.setAppId(appId); this.prePay.setAppId(appId);
this.prePay.setPrepayId(prepayId); this.prePay.setPrepayId(prepayId);