Project

General

Profile

Specification » History » Version 8

Soh Keong, 06/10/2022 09:48 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 8 Soh Keong
| 1.1       | without customer info                  |
16 1 Soh Keong
17
h2. Jar File Download
18
19 8 Soh Keong
"Jar":/redmine/attachments/download/649/atome-1.1.jar
20 3 Soh Keong
"Properties":/redmine/attachments/download/647/atome.properties
21 1 Soh Keong
22
h3. Classes
23
24
* *com.atome.common*  - CommonConstant, CommonProperties
25
* *com.atome.dao*     - AtomeInterface
26
* *com.atome.model*   - AtomeCommonBean, AtomeRequestBean, AtomeResponseBean, CustomerInfoBean, PaymentTransaction, ProductBean, ShippingAddressBean
27
* *com.atome.service* - AtomeService
28
* *com.atome.util*    - HttpManager
29
30
h3. properties file
31
32
* *atome.properties*
33
34
# *payment.url*                -
35
# *api.key.[myr]*              - [myr] for Malaysia; [sgd] for Singapore etc. 
36
# *api.secret.[myr]*           - [myr] for Malaysia; [sgd] for Singapore etc. 
37
# *connection.connect.timeout* -
38
# *connection.read.timeout*    -
39 3 Soh Keong
# *data.default.mobile*        -
40
# *data.default.country*       -
41
# *data.default.address*       -
42
# *data.default.postcode*      -
43
# *data.default.prodId*        -
44
# *data.default.prodName*      -
45
# *data.default.expiryTime*    -
46 1 Soh Keong
47
h2. Database Table
48
49
<pre>
50 2 Soh Keong
CREATE TABLE ATOME_INTERFACE (
51
	ORDER_ID VARCHAR(15) NOT NULL, 
52
	TRX_TYPE VARCHAR(5),
53
	SHOPPER_REF_NO INTEGER,
54
	CURRENCY VARCHAR(3),
55
	CHARGE_AMT DECIMAL(15,2), 
56
	ATOME_ID VARCHAR(15), 
57
	TRAN_ID VARCHAR(20), 
58
	STATUS VARCHAR(2), 
59
	IS_VALID CHARACTER DEFAULT 'N', 
60
	PAY_DATE TIMESTAMP,
61
	CREATE_DATETIME TIMESTAMP DEFAULT CURRENT TIMESTAMP,
62
	MODIFY_DATETIME TIMESTAMP, 
63
	PRIMARY KEY (ORDER_ID));
64
</pre>
65
66
h2. Atome Service
67
68
<pre>
69
com.atome.service.AtomeService service = new com.atome.service.AtomeService();
70
</pre>
71
72
h3. getURL
73
74
<pre>
75 6 Soh Keong
AtomeResponseBean responseBean = service.getURL(Connection conn, AtomeRequestBean payment);
76 2 Soh Keong
</pre>
77
78
# *conn*                      - Database connection.
79
# *payment*                   - AtomeRequestBean object.
80 1 Soh Keong
> * *orderId*                 - Order ID.
81 6 Soh Keong
> * *trxType*                 - 
82 1 Soh Keong
> * *amount*                  - Transaction amount.
83 2 Soh Keong
> * *currency*                - com.atome.common.CommonConstant.CURRENCY_*
84
> * *shopperRefNo*            - 
85 3 Soh Keong
> * *callbackUrl*             - Backend response. 
86 2 Soh Keong
> * *paymentResultUrl*        -
87
> * *paymentCancelUrl*        - 
88 5 Soh Keong
-> * *expirationTimeInSeconds* - int-
89 4 Soh Keong
-> * *customerInfo*            - object CustomerInfoBean- 
90
->> * *mobileNumber*           --
91
-> * *shippingAddress*         - object ShippingAddressBean-
92
->> * *countryCode*            - com.atome.common.CommonConstant.ADDRESS_COUNTRY_*-
93
->> * *lines*                  - Address line-
94
->> * *postcode*               -- 
95
-> * *productList*             - Array-
96
->> * *productId*              -- 
97
->> * *productName*            -- 
98
->> * *quantity*               - int- 
99 1 Soh Keong
->> * *price*                  - double-
100 6 Soh Keong
101
# *responseBean*
102
> *status*        -
103
> *redirectUrl*   - 
104
> *appPaymentUrl* - 
105
> *qrCodeUrl*     - 
106 2 Soh Keong
107
h3. Update transaction
108 1 Soh Keong
109
<pre>
110
AtomeResponseBean responseBean = service.updateTransaction(Connection conn, HttpServletRequest request);
111
</pre>
112
113
# *responseBean*
114 3 Soh Keong
> * orderId     - 
115
> * trxType     - 
116
> * status      - 
117
> * valid       -
118
> * httpCode    -
119
> * httpMessage -