Project

General

Profile

Specification » History » Version 1

Soh Keong, 11/27/2020 02:11 PM

1 1 Soh Keong
{{toc}}
2
3
h1. Specification
4
5
h1. Programming Guide
6
7
h3. Jar version 
8
9
|_. version |_. Description  |
10
| 1.3       | Init           |
11
12
h3. Jar File Download
13
14
"Jar":/redmine/attachments/download/529/unionPay-1.3.jar
15
"Properties":/redmine/attachments/download/527/unionPay.properties
16
"JSP":/redmine/attachments/download/528/unionPay.jsp
17
18
h3. properties file
19
20
* *unionPay.properties*
21
22
# *merchant.id*             - Provided By UnionPay
23
# *version*                 - Provided By UnionPay
24
# *acpsdk.frontTransUrl*    - Provided By UnionPay
25
# *acpsdk.signCert.path*    - Provided By UnionPay
26
# *acpsdk.signCert.pwd*     - Provided By UnionPay
27
# *acpsdk.signCert.type*    - Provided By UnionPay
28
# *acpsdk.validateCert.dir* - Provided By UnionPay
29
# *acpsdk.encryptCert.path* - Provided By UnionPay
30
# *acpsdk.singleMode*       - Provided By UnionPay
31
32
h3. Database Table
33
34
<pre>
35
CREATE TABLE UNION_INTERFACE (
36
	ORDER_ID VARCHAR(15) NOT NULL, 
37
	TRX_TYPE VARCHAR(5),
38
	SHOPPER_REF_NO INTEGER,
39
	CURRENCY VARCHAR(3),
40
	CHARGE_AMT DECIMAL(15,2), 
41
	QUERY_ID VARCHAR(30),
42
	ERROR_CODE VARCHAR(20),
43
	ERROR_DESC VARCHAR(100),
44
	IS_VALID CHARACTER NOT NULL, 
45
	CREATE_DATETIME TIMESTAMP NOT NULL,
46
	MODIFY_DATETIME TIMESTAMP, 
47
	PRIMARY KEY (ORDER_ID));
48
</pre>
49
50
h2. Method
51
52
<pre>
53
com.vmart.union.service.UnionService service = new com.vmart.union.service.UnionService();
54
</pre>
55
56
h3. Get UnionPay/HTML URL
57
58
<pre>
59
String url = service.getURL_HTML(Connection conn, PaymentUnion payment);
60
String url = service.getURL_Redirect(Connection conn, PaymentUnion payment)
61
</pre>
62
63
# *conn*           - Database connection.
64
# *payment*        - PaymentUnion object.
65
> * *orderId*      - Order ID.
66
> * *amount*       - Transaction amount. (Must greater than 1)
67
> * *currency*     - Currency. (Max 3 characters)
68
> * *trxType*      - Transaction Type.
69
> * *shopperRefNo* - Shopper Reference Number.
70
> * *frontURL*     - Page to be return after transaction.
71
> * *backURL*      - Backend update transaction status.
72
73
74
h3. updateTransaction
75
76
<pre>
77
ResponseUnion resultBean = service.updateTransaction(Connection conn, HttpServletRequest request)
78
</pre>
79
80
# *conn*           - Database connection.
81
# *payment*        - ResponseUnion object.
82
> * *errorCode*      - String
83
> * *errorDesc*      - String
84
> * *orderId*        - String
85
> * *trxType*        - Transaction Type.
86
> * *valid*          - boolean