1 package com.foxinmy.weixin4j.payment.mch;
2
3 import com.foxinmy.weixin4j.model.WeixinPayAccount;
4 import com.foxinmy.weixin4j.payment.PayRequest;
5 import com.foxinmy.weixin4j.type.TradeType;
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 @Deprecated
21 public class NATIVEPayRequest extends AbstractPayRequest {
22
23 private final String codeUrl;
24
25 public NATIVEPayRequest(String prePayId, String codeUrl,
26 WeixinPayAccount payAccount) {
27 super(prePayId, payAccount);
28 this.codeUrl = codeUrl;
29 }
30
31 @Override
32 public TradeType getPaymentType() {
33 return TradeType.NATIVE;
34 }
35
36
37
38
39 @Override
40 public PayRequest toRequestObject() {
41 return new PayRequest(getPaymentAccount().getId(), "code_url=" + codeUrl);
42 }
43
44 @Override
45 public String toRequestString() {
46 return this.codeUrl;
47 }
48 }