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 @Deprecated
20 public class WAPPayRequest extends AbstractPayRequest {
21
22
23
24 private final String payUrl;
25
26 public WAPPayRequest(String prePayId, String payUrl,
27 WeixinPayAccount payAccount) {
28 super(prePayId, payAccount);
29 this.payUrl = payUrl;
30
31 }
32
33 @Override
34 public TradeType getPaymentType() {
35 return TradeType.MWEB;
36 }
37
38
39
40
41 @Override
42 public PayRequest toRequestObject() {
43 PayRequest payRequest = new PayRequest(getPaymentAccount().getId(),
44 getPaymentType().name());
45 payRequest.setPrepayId(getPrePayId());
46 return payRequest;
47 }
48
49 @Override
50 public String toRequestString() {
51
52
53
54
55
56
57
58
59
60 return this.payUrl;
61 }
62 }