Project

General

Profile

Specification » History » Version 3

Soh Keong, 11/26/2012 08:18 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
# *conn*           - Database connection.
57
# *payment*        - PaymentMOL object.
58
> * *orderId*      - Order ID.
59
> * *amount*       - Transaction amount. (Min 1.01)
60
> * *currency*     - Currency. (Max 3 characters)
61
> * *name*         - Shopper Name.
62
> * *email*        - Shopper Email.
63
> * *mobile*       - Shopper Mobile.
64
> * *description*  - Transaction description.
65
> * *trxType*      - Transaction Type.
66
> * *shopperRefNo* - Shopper Reference Number.
67
> * *returnURL*    - Page to be return after transaction.
68
69
*To update MOLPay Response into Database*
70
71
<pre>
72
com.ecosway.mol.model.ResponseMOL res = new com.ecosway.mol.service.impl.MOLServiceImpl().updateTransaction(Connection conn,
73
			HttpServletRequest request)
74
</pre>