Project

General

Profile

Specification » History » Version 7

Soh Keong, 06/07/2022 08:45 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 7 Soh Keong
"Jar":/redmine/attachments/download/648/atome-1.0.jar
19 3 Soh Keong
"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 6 Soh Keong
AtomeResponseBean responseBean = service.getURL(Connection conn, AtomeRequestBean payment);
75 2 Soh Keong
</pre>
76
77
# *conn*                      - Database connection.
78
# *payment*                   - AtomeRequestBean object.
79 1 Soh Keong
> * *orderId*                 - Order ID.
80 6 Soh Keong
> * *trxType*                 - 
81 1 Soh Keong
> * *amount*                  - Transaction amount.
82 2 Soh Keong
> * *currency*                - com.atome.common.CommonConstant.CURRENCY_*
83
> * *shopperRefNo*            - 
84 3 Soh Keong
> * *callbackUrl*             - Backend response. 
85 2 Soh Keong
> * *paymentResultUrl*        -
86
> * *paymentCancelUrl*        - 
87 5 Soh Keong
-> * *expirationTimeInSeconds* - int-
88 4 Soh Keong
-> * *customerInfo*            - object CustomerInfoBean- 
89
->> * *mobileNumber*           --
90
-> * *shippingAddress*         - object ShippingAddressBean-
91
->> * *countryCode*            - com.atome.common.CommonConstant.ADDRESS_COUNTRY_*-
92
->> * *lines*                  - Address line-
93
->> * *postcode*               -- 
94
-> * *productList*             - Array-
95
->> * *productId*              -- 
96
->> * *productName*            -- 
97
->> * *quantity*               - int- 
98 1 Soh Keong
->> * *price*                  - double-
99 6 Soh Keong
100
# *responseBean*
101
> *status*        -
102
> *redirectUrl*   - 
103
> *appPaymentUrl* - 
104
> *qrCodeUrl*     - 
105 2 Soh Keong
106
h3. Update transaction
107 1 Soh Keong
108
<pre>
109
AtomeResponseBean responseBean = service.updateTransaction(Connection conn, HttpServletRequest request);
110
</pre>
111
112
# *responseBean*
113 3 Soh Keong
> * orderId     - 
114
> * trxType     - 
115
> * status      - 
116
> * valid       -
117
> * httpCode    -
118
> * httpMessage -