shikeying
2024-01-11 3b67e947e36133e2a40eb2737b15ea375e157ea0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
package com.walker.pay;
 
/**
 * 支付类型。
 * @author 时克英
 * @date 2023-01-12
 */
public enum PayType {
 
    /**
     * 刷卡支付(或被扫)
     */
    Tap {
        public int getIndex(){
            return INDEX_TAP;
        }
        public String getName(){
            return NAME_TAP;
        }
    },
 
    /**
     * 公众号支付
     */
    OfficialAccount {
        public int getIndex(){
            return INDEX_OFFICIAL_ACCOUNT;
        }
        public String getName(){
            return NAME_OFFICIAL_ACCOUNT;
        }
    },
 
    /**
     * 扫码支付(生成商品支付二维码)
     */
    Scan {
        public int getIndex(){
            return INDEX_SCAN;
        }
        public String getName(){
            return NAME_SCAN;
        }
    },
 
    /**
     * APP支付
     */
    App {
        public int getIndex(){
            return INDEX_APP;
        }
        public String getName(){
            return NAME_APP;
        }
    },
 
    /**
     * 小程序支付
     */
    Applet {
        public int getIndex(){
            return INDEX_APPLET;
        }
        public String getName(){
            return NAME_APPLET;
        }
    },
 
    /**
     * H5支付
     */
    H5 {
        public int getIndex(){
            return INDEX_H5;
        }
        public String getName(){
            return NAME_H5;
        }
    },
 
    /**
     * 应用内支付
     */
    InApp {
        public int getIndex(){
            return INDEX_IN_APP;
        }
        public String getName(){
            return NAME_IN_APP;
        }
    },
 
    /**
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~ 以下为 通商云 独立定义的支付方式。2023-02-17
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     *
     * 通商云: 收银宝快捷支付(卡号、金额)
     * @date 2023-02-17
     */
    AllinPayCloud_QUICKPAY_VSP {
        public int getIndex(){
            return INDEX_ALLINPAYCLOUD_QUICKPAY_VSP;
        }
        public String getName(){
            return NAME_ALLINPAYCLOUD_QUICKPAY_VSP;
        }
    },
 
    /**
     * 通商云: 微信js公众号(收银宝)--> 微信公众号支付 appid(否)、微信js支付 openid
     * @date 2023-02-17
     */
    AllinPayCloud_WECHAT_PUBLIC {
        public int getIndex(){
            return INDEX_ALLINPAYCLOUD_WECHAT_PUBLIC;
        }
        public String getName(){
            return NAME_ALLINPAYCLOUD_WECHAT_PUBLIC;
        }
    },
 
    /**
     * 通商云: 支付宝js支付(生活号)--> 支付宝js支付 user_id
     * @date 2023-02-17
     */
    AllinPayCloud_ALIPAY_SERVIC {
        public int getIndex(){
            return INDEX_ALLINPAYCLOUD_ALIPAY_SERVIC;
        }
        public String getName(){
            return NAME_ALLINPAYCLOUD_ALIPAY_SERVIC;
        }
    },
 
    /**
     * 通商云: 微信小程序支付(收银宝)--> 微信js支付 openid
     * @date 2023-02-17
     */
    AllinPayCloud_WECHATPAY_MINIPROGRAM {
        public int getIndex(){
            return INDEX_ALLINPAYCLOUD_WECHATPAY_MINIPROGRAM;
        }
        public String getName(){
            return NAME_ALLINPAYCLOUD_WECHATPAY_MINIPROGRAM;
        }
    },
 
    /**
     * 通商云: 微信扫码支付(正扫,收银宝) -->
     * @date 2023-02-17
     */
    AllinPayCloud_SCAN_WEIXIN {
        public int getIndex(){
            return INDEX_ALLINPAYCLOUD_SCAN_WEIXIN;
        }
        public String getName(){
            return NAME_ALLINPAYCLOUD_SCAN_WEIXIN;
        }
    },
 
    /**
     * 通商云: 支付宝扫码支付(正扫,收银宝) -->
     * @date 2023-02-17
     */
    AllinPayCloud_SCAN_ALIPAY {
        public int getIndex(){
            return INDEX_ALLINPAYCLOUD_SCAN_ALIPAY;
        }
        public String getName(){
            return NAME_ALLINPAYCLOUD_SCAN_ALIPAY;
        }
    },
 
    /**
     * 通商云: 优惠券支付,用于运营账号补贴方式 -->
     * @date 2023-03-01
     */
    AllinPayCloud_COUPON {
        public int getIndex(){
            return INDEX_ALLINPAYCLOUD_COUPON;
        }
        public String getName(){
            return NAME_ALLINPAYCLOUD_COUPON;
        }
    },
 
    /**
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~ 以下为 畅联(第三方)支付 独立定义的支付方式。2023-10-25
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */
 
    /**
     * 畅联支付类型:支付宝单笔转账
     * @date 2023-10-25
     */
    PayUnk_TRANS_ALIPAY_ONE {
        public int getIndex(){
            return INDEX_PAYUNK_TRANS_ALIPAY_ONE;
        }
        public String getName(){
            return NAME_PAYUNK_TRANS_ALIPAY_ONE;
        }
    },
 
    /**
     * 畅联支付类型:支付宝代付单笔到用户
     * @date 2023-10-27
     */
    PayUnk_BEHALF_ALIPAY_ONE {
        public int getIndex(){
            return INDEX_PAYUNK_BEHALF_ALIPAY_ONE;
        }
        public String getName(){
            return NAME_PAYUNK_BEHALF_ALIPAY_ONE;
        }
    }
    ;
 
    public int getIndex(){
        throw new AbstractMethodError();
    }
    public String getName(){
        throw new AbstractMethodError();
    }
 
    public static PayType getType(int index){
        if(index == INDEX_TAP){
            return Tap;
        } else if(index == INDEX_OFFICIAL_ACCOUNT){
            return OfficialAccount;
        } else if(index == INDEX_SCAN){
            return Scan;
        } else if(index == INDEX_APP){
            return App;
        } else if(index == INDEX_APPLET){
            return Applet;
        } else if(index == INDEX_H5){
            return H5;
        } else if(index == INDEX_IN_APP){
            return InApp;
        } else if(index == INDEX_ALLINPAYCLOUD_QUICKPAY_VSP){
            return AllinPayCloud_QUICKPAY_VSP;
        } else if(index == INDEX_ALLINPAYCLOUD_WECHAT_PUBLIC){
            return AllinPayCloud_WECHAT_PUBLIC;
        } else if(index == INDEX_ALLINPAYCLOUD_ALIPAY_SERVIC){
            return AllinPayCloud_ALIPAY_SERVIC;
        } else if(index == INDEX_ALLINPAYCLOUD_WECHATPAY_MINIPROGRAM){
            return AllinPayCloud_WECHATPAY_MINIPROGRAM;
        } else if(index == INDEX_ALLINPAYCLOUD_SCAN_WEIXIN){
            return AllinPayCloud_SCAN_WEIXIN;
        } else if(index == INDEX_ALLINPAYCLOUD_SCAN_ALIPAY){
            return AllinPayCloud_SCAN_ALIPAY;
        } else if(index == INDEX_ALLINPAYCLOUD_COUPON){
            return AllinPayCloud_COUPON;
        } else if(index == INDEX_PAYUNK_TRANS_ALIPAY_ONE){
            return PayUnk_TRANS_ALIPAY_ONE;
        } else if(index == INDEX_PAYUNK_BEHALF_ALIPAY_ONE){
            return PayUnk_BEHALF_ALIPAY_ONE;
        } else {
            throw new UnsupportedOperationException("不支持的支付类型:" + index);
        }
    }
 
    public static final int INDEX_TAP = 0;
    public static final int INDEX_OFFICIAL_ACCOUNT = 1;
    public static final int INDEX_SCAN = 2;
    public static final int INDEX_APP = 3;
    public static final int INDEX_APPLET = 4;
    public static final int INDEX_H5 = 5;
    public static final int INDEX_IN_APP = 6;
 
    public static final int INDEX_ALLINPAYCLOUD_QUICKPAY_VSP = 11;
    public static final int INDEX_ALLINPAYCLOUD_WECHAT_PUBLIC = 12;
    public static final int INDEX_ALLINPAYCLOUD_ALIPAY_SERVIC = 13;
    public static final int INDEX_ALLINPAYCLOUD_WECHATPAY_MINIPROGRAM = 14;
    public static final int INDEX_ALLINPAYCLOUD_SCAN_WEIXIN = 15;
    public static final int INDEX_ALLINPAYCLOUD_SCAN_ALIPAY = 16;
    public static final int INDEX_ALLINPAYCLOUD_COUPON = 17;
 
    /**
     * 畅联支付方式:转账到支付宝(单笔)
     * @date 2023-10-25
     */
    public static final int INDEX_PAYUNK_TRANS_ALIPAY_ONE = 30;
    /**
     * 畅联支付方式:代付到支付宝(单笔)
     * @date 2023-10-27
     */
    public static final int INDEX_PAYUNK_BEHALF_ALIPAY_ONE = 31;
 
    public static final String NAME_TAP = "刷卡支付(被扫)";
    public static final String NAME_OFFICIAL_ACCOUNT = "公众号";
    public static final String NAME_SCAN = "扫码";
    public static final String NAME_APP = "APP";
    public static final String NAME_APPLET = "小程序";
    public static final String NAME_H5 = "H5";
    public static final String NAME_IN_APP = "应用内";
 
    public static final String NAME_ALLINPAYCLOUD_QUICKPAY_VSP = "收银宝快捷支付";
    public static final String NAME_ALLINPAYCLOUD_WECHAT_PUBLIC = "微信js公众号(收银宝)";
    public static final String NAME_ALLINPAYCLOUD_ALIPAY_SERVIC = "支付宝js支付(生活号)";
    public static final String NAME_ALLINPAYCLOUD_WECHATPAY_MINIPROGRAM = "微信小程序支付(收银宝)";
    public static final String NAME_ALLINPAYCLOUD_SCAN_WEIXIN = "微信扫码支付(正扫,收银宝)";
    public static final String NAME_ALLINPAYCLOUD_SCAN_ALIPAY = "支付宝扫码支付(正扫,收银宝)";
    public static final String NAME_ALLINPAYCLOUD_COUPON = "通商云优惠券支付";
 
    public static final String NAME_PAYUNK_TRANS_ALIPAY_ONE = "畅联单笔支付宝转账";
    public static final String NAME_PAYUNK_BEHALF_ALIPAY_ONE = "畅联单笔支付宝代付";
}