Specification » History » Version 9
Soh Keong, 02/07/2013 11:36 AM
1 | 1 | Soh Keong | h1. Specification |
---|---|---|---|
2 | |||
3 | h1. Activity Diagram |
||
4 | |||
5 | 6 | Soh Keong | !ecpg.png! |
6 | 1 | Soh Keong | |
7 | h1. Programming Guide |
||
8 | |||
9 | h2. Resources |
||
10 | |||
11 | h3. SCM |
||
12 | |||
13 | see [[wiki#SCM]] |
||
14 | |||
15 | h3. Jar File Download |
||
16 | |||
17 | "Download Page":http://192.168.2.13:50000/redmine/projects/ecpg/files |
||
18 | |||
19 | h3. Classes |
||
20 | |||
21 | * *com.ecosway.ecpg.common* - CommonConstants, CommonProperties |
||
22 | * *com.ecosway.ecpg.dao* - ECPGInterface |
||
23 | * *com.ecosway.ecpg.model* - CommonECPG, PaymentECPG, ResponseECPG |
||
24 | 5 | Soh Keong | * *com.ecosway.ecpg.service* - ECPGService, ECPGServiceImpl |
25 | 1 | Soh Keong | |
26 | h3. properties file |
||
27 | |||
28 | * *ecpg.properties* |
||
29 | |||
30 | # *merchant.id* - Merchant id, given by NCCC (National Credit Card Center of R.O.C) |
||
31 | # *payment.url* - Front-end payment page URL |
||
32 | # *terminal.id* - Terminal id, given by NCCC (National Credit Card Center of R.O.C) |
||
33 | |||
34 | h3. Database Table |
||
35 | |||
36 | <pre> |
||
37 | CREATE TABLE ECOS.ECPG_INTERFACE ( |
||
38 | ORDER_ID VARCHAR(15) NOT NULL, |
||
39 | TRX_TYPE VARCHAR(5), |
||
40 | SHOPPER_REF_NO INTEGER, |
||
41 | CHARGE_AMT DECIMAL(15,2), |
||
42 | APP_CODE VARCHAR(8), |
||
43 | STATUS VARCHAR(2), |
||
44 | 9 | Soh Keong | TRX_MODE VARCHAR(15), |
45 | INSTALL INTEGER, |
||
46 | FIRST_AMT DECIMAL(15,2), |
||
47 | EACH_AMT DECIMAL(15,2), |
||
48 | FEE DECIMAL(15,2), |
||
49 | 1 | Soh Keong | ERROR_CODE VARCHAR(3), |
50 | ERROR_DESC VARCHAR(60), |
||
51 | IS_VALID CHARACTER NOT NULL, |
||
52 | PAY_DATE TIMESTAMP, |
||
53 | CREATE_DATETIME TIMESTAMP NOT NULL, |
||
54 | MODIFY_DATETIME TIMESTAMP, |
||
55 | PRIMARY KEY (ORDER_ID)) |
||
56 | </pre> |
||
57 | |||
58 | *Get ECPG URL* |
||
59 | |||
60 | <pre> |
||
61 | com.ecosway.ecpg.service.ECPGService service = new com.ecosway.ecpg.service.ECPGServiceImpl(); |
||
62 | |||
63 | String URL = service.getURL(Connection conn, PaymentECPG payment); |
||
64 | |||
65 | </pre> |
||
66 | |||
67 | # *conn* - Database connection. |
||
68 | # *payment* - PaymentECPG object. |
||
69 | > * *orderId* - Order ID. |
||
70 | 2 | Soh Keong | > * *amount* - Transaction amount. |
71 | > * *trxType* - Transaction Type. |
||
72 | > * *shopperRefNo* - Shopper Reference Number. |
||
73 | > * *returnURL* - Page to be return after transaction. |
||
74 | 8 | Soh Keong | > * *trxMode* - Value may get from com.ecosway.ecpg.common.CommonConstants (TRANSMODE_BASIC & TRANSMODE_INSTALLMENT). |
75 | > * *install* - Number of installment. (Require only if trxMode = TRANSMODE_INSTALLMENT) |
||
76 | 2 | Soh Keong | |
77 | 5 | Soh Keong | *Update ECPG Response into Database* |
78 | 2 | Soh Keong | |
79 | <pre> |
||
80 | 4 | Soh Keong | com.ecosway.ecpg.service.ECPGService service = new com.ecosway.ecpg.service.ECPGServiceImpl(); |
81 | 7 | Soh Keong | com.ecosway.ecpg.model.ResponseECPG res = service.updateTransaction(Connection conn, HttpServletRequest request) |
82 | 2 | Soh Keong | </pre> |
83 | |||
84 | # *ResponseECPG* |
||
85 | > * orderId - String |
||
86 | > * amount - double |
||
87 | > * status - String |
||
88 | > * responseCode - String |
||
89 | > * responseMsg - String |
||
90 | > * authCode - String |
||
91 | > * payDate - Date |
||
92 | > * valid - boolean |
||
93 | 8 | Soh Keong | > * trxMode - String |
94 | > * firstAmt - double |
||
95 | > * eachAmt - double |
||
96 | > * fee - double |