asPayJsRequestJson
This commit is contained in:
parent
17f0424ac9
commit
373fde4c79
@ -14,7 +14,7 @@ import org.apache.commons.httpclient.HttpClient;
|
|||||||
public class HttpComponent3Factory extends HttpClientFactory {
|
public class HttpComponent3Factory extends HttpClientFactory {
|
||||||
|
|
||||||
public HttpComponent3Factory() {
|
public HttpComponent3Factory() {
|
||||||
// odd bug
|
// odd code
|
||||||
Class<HttpClient> _dead = HttpClient.class;
|
Class<HttpClient> _dead = HttpClient.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,8 @@ import javax.xml.bind.annotation.XmlTransient;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.foxinmy.weixin4j.payment.PayRequest;
|
import com.foxinmy.weixin4j.payment.PayRequest;
|
||||||
|
import com.foxinmy.weixin4j.payment.PayUtil;
|
||||||
|
import com.foxinmy.weixin4j.type.SignType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JS支付:get_brand_wcpay_request</br>
|
* JS支付:get_brand_wcpay_request</br>
|
||||||
@ -58,6 +60,26 @@ public class MchPayRequest extends PayRequest {
|
|||||||
return prePay;
|
return prePay;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对未签名的 MchPayRequest
|
||||||
|
*
|
||||||
|
* @param paySignKey
|
||||||
|
* 支付签名密钥
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@XmlTransient
|
||||||
|
@JSONField(serialize = false)
|
||||||
|
public String asPayJsRequestJson(String paySignKey) {
|
||||||
|
this.setSignType(SignType.MD5);
|
||||||
|
this.setPaySign(PayUtil.paysignMd5(this, paySignKey));
|
||||||
|
return asPayJsRequestJson();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对已签名的 MchPayRequest
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@XmlTransient
|
@XmlTransient
|
||||||
@JSONField(serialize = false)
|
@JSONField(serialize = false)
|
||||||
public String asPayJsRequestJson() {
|
public String asPayJsRequestJson() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user