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