Specification » History » Version 2
Soh Keong, 05/19/2022 12:15 PM
1 | 1 | Soh Keong | {{toc}} |
---|---|---|---|
2 | |||
3 | h1. Specification |
||
4 | |||
5 | h1. Activity Diagram |
||
6 | |||
7 | !atome_open_api_flowchart.jpg! |
||
8 | |||
9 | h1. Programming Guide |
||
10 | |||
11 | h2. Jar version |
||
12 | |||
13 | |_. version |_. Description | |
||
14 | | 1.0 | Init | |
||
15 | |||
16 | h2. Jar File Download |
||
17 | |||
18 | "Jar": |
||
19 | "Properties": |
||
20 | |||
21 | h3. Classes |
||
22 | |||
23 | * *com.atome.common* - CommonConstant, CommonProperties |
||
24 | * *com.atome.dao* - AtomeInterface |
||
25 | * *com.atome.model* - AtomeCommonBean, AtomeRequestBean, AtomeResponseBean, CustomerInfoBean, PaymentTransaction, ProductBean, ShippingAddressBean |
||
26 | * *com.atome.service* - AtomeService |
||
27 | * *com.atome.util* - HttpManager |
||
28 | |||
29 | h3. properties file |
||
30 | |||
31 | * *atome.properties* |
||
32 | |||
33 | # *payment.url* - |
||
34 | # *api.key.[myr]* - [myr] for Malaysia; [sgd] for Singapore etc. |
||
35 | # *api.secret.[myr]* - [myr] for Malaysia; [sgd] for Singapore etc. |
||
36 | # *connection.connect.timeout* - |
||
37 | # *connection.read.timeout* - |
||
38 | |||
39 | h2. Database Table |
||
40 | |||
41 | <pre> |
||
42 | 2 | Soh Keong | CREATE TABLE ATOME_INTERFACE ( |
43 | ORDER_ID VARCHAR(15) NOT NULL, |
||
44 | TRX_TYPE VARCHAR(5), |
||
45 | SHOPPER_REF_NO INTEGER, |
||
46 | CURRENCY VARCHAR(3), |
||
47 | CHARGE_AMT DECIMAL(15,2), |
||
48 | ATOME_ID VARCHAR(15), |
||
49 | TRAN_ID VARCHAR(20), |
||
50 | STATUS VARCHAR(2), |
||
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. Atome Service |
||
59 | |||
60 | <pre> |
||
61 | com.atome.service.AtomeService service = new com.atome.service.AtomeService(); |
||
62 | </pre> |
||
63 | |||
64 | h3. getURL |
||
65 | |||
66 | <pre> |
||
67 | String URL = service.getURL(Connection conn, AtomeRequestBean payment); |
||
68 | </pre> |
||
69 | |||
70 | # *conn* - Database connection. |
||
71 | # *payment* - AtomeRequestBean object. |
||
72 | > * *orderId* - Order ID. |
||
73 | > * *amount* - Transaction amount. |
||
74 | > * *currency* - com.atome.common.CommonConstant.CURRENCY_* |
||
75 | > * *shopperRefNo* - |
||
76 | > * *callbackUrl* - |
||
77 | > * *paymentResultUrl* - |
||
78 | > * *paymentCancelUrl* - |
||
79 | > * *expirationTimeInSeconds* - int |
||
80 | > * *customerInfo* - object CustomerInfoBean |
||
81 | >> * *mobileNumber* - |
||
82 | > * *shippingAddress* - object ShippingAddressBean |
||
83 | >> * *countryCode* - com.atome.common.CommonConstant.ADDRESS_COUNTRY_* |
||
84 | >> * *lines* - Address line |
||
85 | >> * *postcode* - |
||
86 | > * *productList* - Array |
||
87 | >> * *productId* - |
||
88 | >> * *productName* - |
||
89 | >> * *quantity* - int |
||
90 | >> * *price* - double |
||
91 | |||
92 | h3. Update transaction |
||
93 | |||
94 | <pre> |
||
95 | AtomeResponseBean responseBean = service.updateTransaction(Connection conn, HttpServletRequest request); |
||
96 | </pre> |
||
97 | |||
98 | # *responseBean* |
||
99 | > * orderId - String |
||
100 | > * - |
||
101 | > * - |