Actions
- Table of contents
- Specification
- Programming Guide
Specification¶
Programming Guide¶
Jar version¶
version | Description |
---|---|
1.3 | Init |
Jar File Download¶
properties file¶
- unionPay.properties
- merchant.id - Provided By UnionPay
- version - Provided By UnionPay
- acpsdk.frontTransUrl - Provided By UnionPay
- acpsdk.signCert.path - Provided By UnionPay
- acpsdk.signCert.pwd - Provided By UnionPay
- acpsdk.signCert.type - Provided By UnionPay
- acpsdk.validateCert.dir - Provided By UnionPay
- acpsdk.encryptCert.path - Provided By UnionPay
- acpsdk.singleMode - Provided By UnionPay
Database Table¶
CREATE TABLE UNION_INTERFACE ( ORDER_ID VARCHAR(15) NOT NULL, TRX_TYPE VARCHAR(5), SHOPPER_REF_NO INTEGER, CURRENCY VARCHAR(3), CHARGE_AMT DECIMAL(15,2), QUERY_ID VARCHAR(30), ERROR_CODE VARCHAR(20), ERROR_DESC VARCHAR(100), IS_VALID CHARACTER NOT NULL, CREATE_DATETIME TIMESTAMP NOT NULL, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (ORDER_ID));
Method¶
com.vmart.union.service.UnionService service = new com.vmart.union.service.UnionService();
Get UnionPay/HTML URL¶
String url = service.getURL_HTML(Connection conn, PaymentUnion payment); String url = service.getURL_Redirect(Connection conn, PaymentUnion payment)
- conn - Database connection.
- payment - PaymentUnion object.
- orderId - Order ID.
- amount - Transaction amount. (Must greater than 1)
- currency - Currency. (Max 3 characters)
- trxType - Transaction Type.
- shopperRefNo - Shopper Reference Number.
- frontURL - Page to be return after transaction.
- backURL - Backend update transaction status.
updateTransaction¶
ResponseUnion resultBean = service.updateTransaction(Connection conn, HttpServletRequest request)
- conn - Database connection.
- payment - ResponseUnion object.
- errorCode - String
- errorDesc - String
- orderId - String
- trxType - Transaction Type.
- valid - boolean
Updated by Soh Keong about 4 years ago ยท 1 revisions