Specification » History » Version 5
Soh Keong, 01/02/2013 04:16 PM
1 | 1 | Soh Keong | h1. Specification |
---|---|---|---|
2 | |||
3 | h1. Activity Diagram |
||
4 | |||
5 | |||
6 | h1. Programming Guide |
||
7 | |||
8 | h2. Resources |
||
9 | |||
10 | h3. SCM |
||
11 | |||
12 | see [[wiki#SCM]] |
||
13 | |||
14 | h3. Jar File Download |
||
15 | |||
16 | "Download Page":http://192.168.2.13:50000/redmine/projects/ecpg/files |
||
17 | |||
18 | h3. Classes |
||
19 | |||
20 | * *com.ecosway.ecpg.common* - CommonConstants, CommonProperties |
||
21 | * *com.ecosway.ecpg.dao* - ECPGInterface |
||
22 | * *com.ecosway.ecpg.model* - CommonECPG, PaymentECPG, ResponseECPG |
||
23 | 5 | Soh Keong | * *com.ecosway.ecpg.service* - ECPGService, ECPGServiceImpl |
24 | 1 | Soh Keong | |
25 | h3. properties file |
||
26 | |||
27 | * *ecpg.properties* |
||
28 | |||
29 | # *merchant.id* - Merchant id, given by NCCC (National Credit Card Center of R.O.C) |
||
30 | # *payment.url* - Front-end payment page URL |
||
31 | # *terminal.id* - Terminal id, given by NCCC (National Credit Card Center of R.O.C) |
||
32 | |||
33 | h3. Database Table |
||
34 | |||
35 | <pre> |
||
36 | CREATE TABLE ECOS.ECPG_INTERFACE ( |
||
37 | ORDER_ID VARCHAR(15) NOT NULL, |
||
38 | TRX_TYPE VARCHAR(5), |
||
39 | SHOPPER_REF_NO INTEGER, |
||
40 | CHARGE_AMT DECIMAL(15,2), |
||
41 | APP_CODE VARCHAR(8), |
||
42 | STATUS VARCHAR(2), |
||
43 | ERROR_CODE VARCHAR(3), |
||
44 | ERROR_DESC VARCHAR(60), |
||
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 | *Get ECPG URL* |
||
53 | |||
54 | <pre> |
||
55 | com.ecosway.ecpg.service.ECPGService service = new com.ecosway.ecpg.service.ECPGServiceImpl(); |
||
56 | |||
57 | String URL = service.getURL(Connection conn, PaymentECPG payment); |
||
58 | |||
59 | </pre> |
||
60 | |||
61 | # *conn* - Database connection. |
||
62 | # *payment* - PaymentECPG object. |
||
63 | > * *orderId* - Order ID. |
||
64 | 2 | Soh Keong | > * *amount* - Transaction amount. |
65 | > * *trxType* - Transaction Type. |
||
66 | > * *shopperRefNo* - Shopper Reference Number. |
||
67 | > * *returnURL* - Page to be return after transaction. |
||
68 | |||
69 | 5 | Soh Keong | *Update ECPG Response into Database* |
70 | 2 | Soh Keong | |
71 | <pre> |
||
72 | 4 | Soh Keong | com.ecosway.ecpg.service.ECPGService service = new com.ecosway.ecpg.service.ECPGServiceImpl(); |
73 | com.ecosway.ecpg.model.ResponseECPG res = new service.updateTransaction(Connection conn, HttpServletRequest request) |
||
74 | 2 | Soh Keong | </pre> |
75 | |||
76 | # *ResponseECPG* |
||
77 | > * orderId - String |
||
78 | > * amount - double |
||
79 | > * status - String |
||
80 | > * responseCode - String |
||
81 | > * responseMsg - String |
||
82 | > * authCode - String |
||
83 | > * payDate - Date |
||
84 | > * valid - boolean |