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