Project

General

Profile

Specification » History » Version 5

Soh Keong, 02/23/2022 02:37 PM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h1. Programming Guide
6
7
h2. Jar version 
8
9
|_. version |_. Description                          |
10
| 1.0       | Init                                   |
11
12
h2. Jar File Download
13
14 3 Soh Keong
"Jar":/redmine/attachments/download/636/NomuPay-1.0.jar
15
"Properties":/redmine/attachments/download/637/nomupay.properties
16 5 Soh Keong
"redirectPage":/redmine/attachments/download/642/ProcessCardPaymentNomupay.jsp
17 1 Soh Keong
18
h3. Classes
19
20
* *com.nomupay.common*  - CommonConstant, CommonProperties
21
* *com.nomupay.dao*     - NomuInterface
22
* *com.nomupay.model*   - CommonNomuBean, RequestNomuBean, ResponseNomuBean
23
* *com.nomupay.service* - NomuService
24
* *com.nomupay.utils*   - NomuUtil
25
26
h3. properties file
27
28
* *nomupay.properties*
29
30
# *merchant.id*
31
# *action*                 - PREAUTH, VERIFY, *SALE*, REFUND, REFUND_SALE
32
# *type*                   - *1 (E-commerce (ECOM))*; 2 (Mail Order/Telephone Order (MOTO)); 9 (Continuous Authority (CA))
33
# *payment.url*            - Nomupay URL
34
# *redirect.url*           - Aces URL 
35
# *merchant.country.code*  - Merchant’s location (ISO 3166-1 3-digit code)
36
# *signature*              - Use for hashing
37
     
38 2 Soh Keong
h2. Database Table
39
40
<pre>
41
CREATE TABLE NOMU_INTERFACE (
42
	ORDER_ID VARCHAR(15) NOT NULL, 
43
	TRX_TYPE VARCHAR(5),
44
	SHOPPER_REF_NO INTEGER,
45
	CURRENCY VARCHAR(3),
46
	CHARGE_AMT DECIMAL(15,2),
47
	TRAN_ID INTEGER, 
48
	XREF VARCHAR(30),
49
	STATUS VARCHAR(2), 
50
	ERROR_CODE VARCHAR(20),
51
	ERROR_DESC VARCHAR(100),
52
	IS_VALID CHARACTER DEFAULT 'N', 
53
	PAY_DATE TIMESTAMP,
54
	CREATE_DATETIME TIMESTAMP DEFAULT CURRENT TIMESTAMP,
55
	MODIFY_DATETIME TIMESTAMP, 
56
	PRIMARY KEY (ORDER_ID))
57
</pre>
58
59
h2. NomuPay Service
60
61
<pre>
62
com.nomupay.service.NomuService service = new com.nomupay.service.NomuService();
63
</pre>
64
65
h3. getURL
66
67
<pre>
68
String URL = service.getURL(Connection conn, RequestNomuBean bean);
69
</pre>
70
71
# *conn*           - Database connection.
72
# *payment*        - PaymentNomu object.
73
> * *orderId*      - 
74
> * *amount*       -
75 4 Soh Keong
> * *currencyCode* - Current support 840 only
76 2 Soh Keong
> * *trxType*      -
77
> * *shopperRefNo* -
78
> * *redirectURL*  -
79
> * *callbackURL*  -
80
81
h3. Update NomuPay Response into Database
82
83
<pre>
84
com.nomupay.model.ResponseNomuBean res = service.updateTransaction(Connection conn, HttpServletRequest request)
85
</pre>
86
87
# *ResponseNomuBean*
88
> * orderId         - String
89
> * ResponseCode    - String
90
> * ResponseStatus  - String 
91
> * ResponseMessage - String
92
> * TransactionId   - String
93
> * Amount          - String
94
> * XRef            - String
95
> * ResponseUpdateTime - timestamp
96
> * AuthCode        - String