Specification » History » Version 5
Soh Keong, 11/26/2012 09:24 AM
1 | 1 | Soh Keong | h1. Specification |
---|---|---|---|
2 | |||
3 | 5 | Soh Keong | h1. Activity Diagram |
4 | !MOLPay.png! |
||
5 | |||
6 | 1 | Soh Keong | h1. Programming Guide |
7 | |||
8 | h2. Resources |
||
9 | |||
10 | h3. SCM |
||
11 | |||
12 | see [[wiki#SCM]] |
||
13 | |||
14 | h3. Classes |
||
15 | |||
16 | * *com.ecosway.mol.common* - CommonConstants, CommonProperties |
||
17 | * *com.ecosway.mol.dao* - MOLInterface |
||
18 | * *com.ecosway.mol.model* - CommonMOL, PaymentMOL, ResponseMOL |
||
19 | * *com.ecosway.mol.service* - MOLService |
||
20 | * *com.ecosway.mol.service.impl* - MOLServiceImpl |
||
21 | * *com.ecosway.mol.utils* - HashUtils |
||
22 | |||
23 | h3. properties file |
||
24 | |||
25 | * *mol.properties* |
||
26 | |||
27 | # *merchant.id* - Merchant login name given by MOLPay |
||
28 | # *payment.url* - Front-end payment page URL |
||
29 | # *verification.code* - Verify Key provided by MOLPay to merchant. |
||
30 | 2 | Soh Keong | |
31 | h3. Database Table |
||
32 | |||
33 | <pre> |
||
34 | CREATE TABLE ECOS.MOL_INTERFACE ( |
||
35 | ORDER_ID VARCHAR(15) NOT NULL, |
||
36 | TRX_TYPE VARCHAR(5), |
||
37 | SHOPPER_REF_NO INTEGER, |
||
38 | CURRENCY VARCHAR(3), |
||
39 | CHARGE_AMT DECIMAL(15,2), |
||
40 | APP_CODE VARCHAR(20), |
||
41 | TRAN_ID INTEGER, |
||
42 | STATUS VARCHAR(2), |
||
43 | ERROR_CODE VARCHAR(20), |
||
44 | ERROR_DESC VARCHAR(100), |
||
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 | 3 | Soh Keong | |
52 | *Get MOLPay URL* |
||
53 | |||
54 | <pre> |
||
55 | com.ecosway.mol.service.MOLService service = new com.ecosway.mol.service.impl.MOLServiceImpl(); |
||
56 | |||
57 | String URL = service.getURL(Connection conn, PaymentMOL payment); |
||
58 | |||
59 | 4 | Soh Keong | </pre> |
60 | |||
61 | 3 | Soh Keong | # *conn* - Database connection. |
62 | # *payment* - PaymentMOL object. |
||
63 | > * *orderId* - Order ID. |
||
64 | > * *amount* - Transaction amount. (Min 1.01) |
||
65 | > * *currency* - Currency. (Max 3 characters) |
||
66 | > * *name* - Shopper Name. |
||
67 | > * *email* - Shopper Email. |
||
68 | > * *mobile* - Shopper Mobile. |
||
69 | > * *description* - Transaction description. |
||
70 | > * *trxType* - Transaction Type. |
||
71 | > * *shopperRefNo* - Shopper Reference Number. |
||
72 | > * *returnURL* - Page to be return after transaction. |
||
73 | 4 | Soh Keong | |
74 | 3 | Soh Keong | |
75 | *To update MOLPay Response into Database* |
||
76 | |||
77 | <pre> |
||
78 | com.ecosway.mol.model.ResponseMOL res = new com.ecosway.mol.service.impl.MOLServiceImpl().updateTransaction(Connection conn, |
||
79 | HttpServletRequest request) |
||
80 | </pre> |