View Javadoc
1   package com.foxinmy.weixin4j.pay.payment.mch;
2   
3   import com.foxinmy.weixin4j.pay.model.WeixinPayAccount;
4   import com.foxinmy.weixin4j.pay.sign.WeixinPaymentSignature;
5   import com.foxinmy.weixin4j.pay.sign.WeixinSignature;
6   
7   public abstract class AbstractPayRequest implements MchPayRequest {
8   
9   	private final String prePayId;
10  	private final WeixinPayAccount paymentAccount;
11  	protected final WeixinSignature weixinSignature;
12  
13  	public AbstractPayRequest(String prePayId, WeixinPayAccount paymentAccount) {
14  		this.prePayId = prePayId;
15  		this.paymentAccount = paymentAccount;
16  		this.weixinSignature = new WeixinPaymentSignature(paymentAccount.getPaySignKey());
17  	}
18  
19  	@Override
20  	public String getPrePayId() {
21  		return this.prePayId;
22  	}
23  
24  	@Override
25  	public WeixinPayAccount getPaymentAccount() {
26  		return this.paymentAccount;
27  	}
28  }