Project

General

Profile

Specification » History » Version 4

Soh Keong, 06/02/2022 10:04 AM

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 3 Soh Keong
"Jar":/redmine/attachments/download/646/atome-1.0.jar
19
"Properties":/redmine/attachments/download/647/atome.properties
20 1 Soh Keong
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 3 Soh Keong
# *data.default.mobile*        -
39
# *data.default.country*       -
40
# *data.default.address*       -
41
# *data.default.postcode*      -
42
# *data.default.prodId*        -
43
# *data.default.prodName*      -
44
# *data.default.expiryTime*    -
45 1 Soh Keong
46
h2. Database Table
47
48
<pre>
49 2 Soh Keong
CREATE TABLE ATOME_INTERFACE (
50
	ORDER_ID VARCHAR(15) NOT NULL, 
51
	TRX_TYPE VARCHAR(5),
52
	SHOPPER_REF_NO INTEGER,
53
	CURRENCY VARCHAR(3),
54
	CHARGE_AMT DECIMAL(15,2), 
55
	ATOME_ID VARCHAR(15), 
56
	TRAN_ID VARCHAR(20), 
57
	STATUS VARCHAR(2), 
58
	IS_VALID CHARACTER DEFAULT 'N', 
59
	PAY_DATE TIMESTAMP,
60
	CREATE_DATETIME TIMESTAMP DEFAULT CURRENT TIMESTAMP,
61
	MODIFY_DATETIME TIMESTAMP, 
62
	PRIMARY KEY (ORDER_ID));
63
</pre>
64
65
h2. Atome Service
66
67
<pre>
68
com.atome.service.AtomeService service = new com.atome.service.AtomeService();
69
</pre>
70
71
h3. getURL
72
73
<pre>
74
String URL = service.getURL(Connection conn, AtomeRequestBean payment);
75
</pre>
76
77
# *conn*                      - Database connection.
78
# *payment*                   - AtomeRequestBean object.
79
> * *orderId*                 - Order ID.
80 1 Soh Keong
> * *amount*                  - Transaction amount.
81 2 Soh Keong
> * *currency*                - com.atome.common.CommonConstant.CURRENCY_*
82
> * *shopperRefNo*            - 
83 3 Soh Keong
> * *callbackUrl*             - Backend response. 
84 2 Soh Keong
> * *paymentResultUrl*        -
85
> * *paymentCancelUrl*        - 
86
> * *expirationTimeInSeconds* - int
87 4 Soh Keong
-> * *customerInfo*            - object CustomerInfoBean- 
88
->> * *mobileNumber*           --
89
-> * *shippingAddress*         - object ShippingAddressBean-
90
->> * *countryCode*            - com.atome.common.CommonConstant.ADDRESS_COUNTRY_*-
91
->> * *lines*                  - Address line-
92
->> * *postcode*               -- 
93
-> * *productList*             - Array-
94
->> * *productId*              -- 
95
->> * *productName*            -- 
96
->> * *quantity*               - int- 
97
->> * *price*                  - double-
98 2 Soh Keong
99
h3. Update transaction
100 1 Soh Keong
101
<pre>
102
AtomeResponseBean responseBean = service.updateTransaction(Connection conn, HttpServletRequest request);
103
</pre>
104
105
# *responseBean*
106 3 Soh Keong
> * orderId     - 
107
> * trxType     - 
108
> * status      - 
109
> * valid       -
110
> * httpCode    -
111
> * httpMessage -