Specification » History » Version 7
Soh Keong, 01/14/2013 09:29 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 | ERROR_CODE VARCHAR(3), |
||
45 | ERROR_DESC VARCHAR(60), |
||
46 | IS_VALID CHARACTER NOT NULL, |
||
47 | PAY_DATE TIMESTAMP, |
||
48 | CREATE_DATETIME TIMESTAMP NOT NULL, |
||
49 | MODIFY_DATETIME TIMESTAMP, |
||
50 | PRIMARY KEY (ORDER_ID)) |
||
51 | </pre> |
||
52 | |||
53 | *Get ECPG URL* |
||
54 | |||
55 | <pre> |
||
56 | com.ecosway.ecpg.service.ECPGService service = new com.ecosway.ecpg.service.ECPGServiceImpl(); |
||
57 | |||
58 | String URL = service.getURL(Connection conn, PaymentECPG payment); |
||
59 | |||
60 | </pre> |
||
61 | |||
62 | # *conn* - Database connection. |
||
63 | # *payment* - PaymentECPG object. |
||
64 | > * *orderId* - Order ID. |
||
65 | 2 | Soh Keong | > * *amount* - Transaction amount. |
66 | > * *trxType* - Transaction Type. |
||
67 | > * *shopperRefNo* - Shopper Reference Number. |
||
68 | > * *returnURL* - Page to be return after transaction. |
||
69 | |||
70 | 5 | Soh Keong | *Update ECPG Response into Database* |
71 | 2 | Soh Keong | |
72 | <pre> |
||
73 | 4 | Soh Keong | com.ecosway.ecpg.service.ECPGService service = new com.ecosway.ecpg.service.ECPGServiceImpl(); |
74 | 7 | Soh Keong | com.ecosway.ecpg.model.ResponseECPG res = service.updateTransaction(Connection conn, HttpServletRequest request) |
75 | 2 | Soh Keong | </pre> |
76 | |||
77 | # *ResponseECPG* |
||
78 | > * orderId - String |
||
79 | > * amount - double |
||
80 | > * status - String |
||
81 | > * responseCode - String |
||
82 | > * responseMsg - String |
||
83 | > * authCode - String |
||
84 | > * payDate - Date |
||
85 | > * valid - boolean |