Specification » History » Version 4
Soh Keong, 12/03/2020 05:28 PM
1 | 1 | Soh Keong | {{toc}} |
---|---|---|---|
2 | |||
3 | h1. Specification |
||
4 | |||
5 | h1. Programming Guide |
||
6 | |||
7 | h3. Jar version |
||
8 | |||
9 | |_. version |_. Description | |
||
10 | | 1.2.1 | Init | |
||
11 | |||
12 | h3. Jar File Download |
||
13 | |||
14 | "Jar":/redmine/attachments/download/533/wechat_QFPay_HK-1.2.jar |
||
15 | "Properties":/redmine/attachments/download/534/wechat_HK.properties |
||
16 | "Lib":/redmine/attachments/download/535/lib.rar |
||
17 | |||
18 | h3. properties file |
||
19 | |||
20 | * *wechat_HK.properties* |
||
21 | # *payment.url* |
||
22 | # *payment.code.hk* |
||
23 | # *payment.key.hk* |
||
24 | # *payment.mchid.hk* |
||
25 | # *sub.url.qrcode* |
||
26 | # *sub.url.query* |
||
27 | # *sub.url.download* |
||
28 | # *charset* |
||
29 | # *http.connection.timeout* |
||
30 | # *http.read.timeout* |
||
31 | |||
32 | h3. Database Table |
||
33 | |||
34 | <pre> |
||
35 | CREATE TABLE WECHAT_INTERFACE ( |
||
36 | ORDER_ID VARCHAR(15) NOT NULL, |
||
37 | TRX_TYPE VARCHAR(15) NOT NULL, |
||
38 | SHOPPER_REF_NO INTEGER NOT NULL, |
||
39 | CURRENCY VARCHAR(3), |
||
40 | CHARGE_AMT DECIMAL(15,2) NOT NULL, |
||
41 | QR_CODE VARCHAR(255), |
||
42 | RESPONSE_CODE VARCHAR(15), |
||
43 | RESPONSE_MSG VARCHAR(100), |
||
44 | SYSSN VARCHAR(50), |
||
45 | IS_VALID CHARACTER NOT NULL, |
||
46 | PAY_DATE TIMESTAMP, |
||
47 | CREATE_DATETIME TIMESTAMP NOT NULL, |
||
48 | MODIFY_DATETIME TIMESTAMP, |
||
49 | PRIMARY KEY (ORDER_ID)) |
||
50 | </pre> |
||
51 | |||
52 | h2. Method |
||
53 | |||
54 | <pre> |
||
55 | 2 | Soh Keong | com.ecosway.wechat.service.WechatService service = new com.ecosway.wechat.service.WechatService(); |
56 | </pre> |
||
57 | 1 | Soh Keong | |
58 | 2 | Soh Keong | h3. getDataURI |
59 | |||
60 | <pre> |
||
61 | com.ecosway.wechat.model.QRResponseWechat resultBean = service.getDataURI(Connection conn, PaymentWechat payment) |
||
62 | 1 | Soh Keong | </pre> |
63 | 2 | Soh Keong | |
64 | # *conn* - Database connection. |
||
65 | # *payment* - PaymentWechat object. |
||
66 | > * *orderId* - Order ID. |
||
67 | > * *amount* - Transaction amount. |
||
68 | > * *requestTimestamp* - Date |
||
69 | > * *trxType* - |
||
70 | > * *payType* - |
||
71 | > * *shopperRefNo* - |
||
72 | > * *goodName* - |
||
73 | > * *currency* - |
||
74 | |||
75 | 3 | Soh Keong | # *resultBean* - QRResponseWechat object. |
76 | 2 | Soh Keong | > * *errorCode* - String |
77 | > * *errorDesc* - String |
||
78 | > * *responseMessage* - String |
||
79 | > * *valid* - boolean |
||
80 | > * *orderId* - Order ID. |
||
81 | > * *responseDate* - Date |
||
82 | > * *responseId* - String |
||
83 | > * *qrCodeId* - String |
||
84 | > * *payURL* - String |
||
85 | |||
86 | 1 | Soh Keong | |
87 | 4 | Soh Keong | h3. queryOrder |
88 | 1 | Soh Keong | |
89 | 3 | Soh Keong | <pre> |
90 | com.ecosway.wechat.model.ResultResponseWechat queryOrder(Connection conn, String orderId, String companyName) |
||
91 | </pre> |
||
92 | 1 | Soh Keong | |
93 | 3 | Soh Keong | # *resultBean* - QRResponseWechat object. |
94 | > *detailList* - List<ResponseDetailWechat> |
||
95 | > * *responseCode* - String |
||
96 | > * *errorMessage* - String |
||
97 | > * *orderId* - String |
||
98 | > * *responseDate* - Date |
||
99 | > * *payDate* - Date |
||
100 | > * *responseId* - String |
||
101 | > * *orderType* - String |
||
102 | > * *cancel* - String |