Project

General

Profile

Specification » History » Revision 2

Revision 1 (Soh Keong, 05/19/2022 10:39 AM) → Revision 2/11 (Soh Keong, 05/19/2022 12:15 PM)

{{toc}} 

 h1. Specification 

 h1. Activity Diagram 

 !atome_open_api_flowchart.jpg! 

 h1. Programming Guide 

 h2. Jar version  

 |_. version |_. Description                            | 
 | 1.0         | Init                                     | 

 h2. Jar File Download 

 "Jar": 
 "Properties": 

 h3. Classes 

 * *com.atome.common*    - CommonConstant, CommonProperties 
 * *com.atome.dao*       - AtomeInterface 
 * *com.atome.model*     - AtomeCommonBean, AtomeRequestBean, AtomeResponseBean, CustomerInfoBean, PaymentTransaction, ProductBean, ShippingAddressBean 
 * *com.atome.service* - AtomeService 
 * *com.atome.util*      - HttpManager 

 h3. properties file 

 * *atome.properties* 

 # *payment.url*                  - 
 # *api.key.[myr]*                - [myr] for Malaysia; [sgd] for Singapore etc.  
 # *api.secret.[myr]*             - [myr] for Malaysia; [sgd] for Singapore etc.  
 # *connection.connect.timeout* - 
 # *connection.read.timeout*      - 

 h2. Database Table 

 <pre> 
 CREATE TABLE ATOME_INTERFACE ( 
	 ORDER_ID VARCHAR(15) NOT NULL,  
	 TRX_TYPE VARCHAR(5), 
	 SHOPPER_REF_NO INTEGER, 
	 CURRENCY VARCHAR(3), 
	 CHARGE_AMT DECIMAL(15,2),  
	 ATOME_ID VARCHAR(15),  
	 TRAN_ID VARCHAR(20),  
	 STATUS VARCHAR(2),  
	 IS_VALID CHARACTER DEFAULT 'N',  
	 PAY_DATE TIMESTAMP, 
	 CREATE_DATETIME TIMESTAMP DEFAULT CURRENT TIMESTAMP, 
	 MODIFY_DATETIME TIMESTAMP,  
	 PRIMARY KEY (ORDER_ID)); 
 </pre> 

 h2. Atome Service 

 <pre> 
 com.atome.service.AtomeService service = new com.atome.service.AtomeService(); 
 </pre> 

 h3. getURL 

 <pre> 
 String URL = service.getURL(Connection conn, AtomeRequestBean payment); 
 </pre> 

 # *conn*                        - Database connection. 
 # *payment*                     - AtomeRequestBean object. 
 > * *orderId*                   - Order ID. 
 > * *amount*                    - Transaction amount. 
 > * *currency*                  - com.atome.common.CommonConstant.CURRENCY_* 
 > * *shopperRefNo*              -  
 > * *callbackUrl*               -  
 > * *paymentResultUrl*          - 
 > * *paymentCancelUrl*          -  
 > * *expirationTimeInSeconds* - int 
 > * *customerInfo*              - object CustomerInfoBean  
 >> * *mobileNumber*             - 
 > * *shippingAddress*           - object ShippingAddressBean 
 >> * *countryCode*              - com.atome.common.CommonConstant.ADDRESS_COUNTRY_* 
 >> * *lines*                    - Address line 
 >> * *postcode*                 -  
 > * *productList*               - Array 
 >> * *productId*                -  
 >> * *productName*              -  
 >> * *quantity*                 - int  
 >> * *price*                    - double 

 h3. Update transaction 

 <pre> 
 AtomeResponseBean responseBean = service.updateTransaction(Connection conn, HttpServletRequest request); 
 </pre> 

 # *responseBean* 
 > * orderId - String 
 > * -  
 > * -