Project

General

Profile

Specification » History » Version 5

Soh Keong, 01/20/2021 03:50 PM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h1. Activity Diagram
6
!flow.png!
7
!flow_UnionPay.png!
8
9
h1. Programming Guide
10
11 2 Soh Keong
h2. Jar version 
12 1 Soh Keong
13 4 Soh Keong
|_. version |_. Description     |
14
| 1.3       | Init              |
15
| 1.5       | Added Installment |
16 1 Soh Keong
17
h3. Jar File Download
18
19 4 Soh Keong
"Jar":/redmine/attachments/download/571/TaiShin-1.5.jar
20 1 Soh Keong
"Properties":/redmine/attachments/download/539/taishin.properties
21
22 2 Soh Keong
h2. properties file
23 1 Soh Keong
24
* *taishin.properties*
25
26 2 Soh Keong
# *sender*       
27
# *version*       
28
# *merchant.id*   
29
# *sub.merchant.id*  
30
# *terminal.id*      
31
# *union.pay.timeout.in.minute*  
32
# *union.pay.ip.address*        
33
# *payment.url.credit.card*      
34
# *payment.url.union.pay*        
35
# *query.url.credit.card*        
36
# *query.url.union.pay*        
37
# *cacerts.alias*        
38
# *cacerts.file*       
39
# *cacerts.Pass*    
40
# *CONNECTION_TIMEOUT*    
41
# *READ_TIMEOUT*
42
43
h2. Database Table
44
45
<pre>
46
CREATE TABLE TSPG_INTERFACE (
47
	ORDER_ID VARCHAR(15) NOT NULL, 
48
	TRX_TYPE VARCHAR(5), 
49
	SHOPPER_REF_NO INTEGER, 
50
	CURRENCY VARCHAR(3),
51
	CHARGE_AMT DECIMAL(15,2), 
52
	TSPG_PAYMENT_TYPE INTEGER,
53
	APP_CODE VARCHAR(8), 
54
	STATUS VARCHAR(2), 
55
	ERROR_CODE VARCHAR(5), 
56
	ERROR_DESC VARCHAR(100), 
57 1 Soh Keong
	IS_VALID CHARACTER NOT NULL, 
58
	TRAN_ID VARCHAR(30),
59
	PAY_DATE TIMESTAMP, 
60 4 Soh Keong
	INST_ORDER_ID VARCHAR(15),
61
	INST_PERIOD INTEGER,
62
	INST_DOWN_PAY DECIMAL(15,2),
63
	INST_PAY DECIMAL(15,2),
64 2 Soh Keong
	CREATE_DATETIME TIMESTAMP NOT NULL, 
65
	MODIFY_DATETIME TIMESTAMP, 
66
	PRIMARY KEY (ORDER_ID))
67
</pre>    
68
69
70
h2. Tai Shin Service
71
72
<pre>
73
com.aces.ts.service.TaiShinService service = new com.aces.ts.service.TaiShinService();
74
</pre>
75
76
h3. getURL
77
78
<pre>
79
String url = service.getURL(Connection conn, PaymentTaiShin payment)
80
</pre>
81
82
# *conn*           - Database connection.
83
# *payment*        - PaymentTaiShin object.
84
> * *orderId*          - Order ID.
85
> * *amount*           - Transaction amount. 
86
> * *currency*         - com.aces.ts.common.CommonConstants.CURRENCY_CODE_TAIWAN
87
> * *trxType*          -
88
> * *tsPaymentMethod*  - com.aces.ts.common.CommonConstants.PARAM_PAY_TYPE_CREDIT_CARD | PARAM_PAY_TYPE_UNION_PAY
89
> * *layout*           - com.aces.ts.common.CommonConstants.PARAM_LAYOUT_NORMAL_WEB | PARAM_LAYOUT_MOBILE_WEB
90
> * *description*      -
91
> * *captFlag*         - com.aces.ts.common.CommonConstants.PARAM_CAPT_FLAG_ASYNCHRONOUS | PARAM_CAPT_FLAG_SYNCHRONOUS
92
> * *resultFlag*       - com.aces.ts.common.CommonConstants.PARAM_RESULT_FLAG_NO_DETAILS | PARAM_RESULT_FLAG_WITH_DETAILS
93
> * *browserReturnURL* -
94
> * *serverReturnURL*  -
95
> * *shopperRefNo*     -
96 5 Soh Keong
> * *InstallPeriod*    - 
97 2 Soh Keong
98 3 Soh Keong
h3. updateTransaction
99 2 Soh Keong
100
<pre>
101
ResponseTaiShin updateTransaction(Connection conn, HttpServletRequest request)
102
</pre>
103
104
# *ResponseTaiShin*
105
> * errorCode - 
106
> * errorDesc - 
107
> * orderId   - String
108
> * amount    - double
109
> * currency  - 
110
> * appCode   -
111
> * tranId    - 
112 1 Soh Keong
> * status    - 
113
> * payDate   - Date
114
> * valid     - boolean
115 4 Soh Keong
> * installmentOrderId -
116
> * installmentPeriod  -
117
> * installmentDownPay -
118
> * installmentPay     -