Specification » History » Revision 5
Revision 4 (Soh Keong, 04/15/2021 11:45 AM) → Revision 5/6 (Soh Keong, 04/15/2021 01:46 PM)
{{toc}} h1. Specification h1. Activity Diagram !paymentPage.jpg! h1. Programming Guide h2. Jar version |_. version |_. Description | | 1.o | Init | h3. Jar File Download "Jar":/redmine/attachments/download/591/ctbc-1.0.jar "Properties":/redmine/attachments/download/590/ctbc.properties "Lib":/redmine/attachments/download/592/posapi_mac_j_npg.jar h2. properties file * *ctcb.properties* # *merchant.id* # *terminal.id* # *mer.id* # *key* # *terminal.id.installment* # *mer.id.installment* # *key.installment* # *payment.url.credit.card* # *CONNECTION_TIMEOUT* # *READ_TIMEOUT* h2. Database Table <pre> CREATE TABLE CTBC_INTERFACE ( ORDER_ID VARCHAR(15) NOT NULL, TRX_TYPE VARCHAR(5), SHOPPER_REF_NO INTEGER, CURRENCY VARCHAR(3), CHARGE_AMT DECIMAL(15,2), APP_CODE VARCHAR(8), STATUS VARCHAR(2), ERROR_CODE VARCHAR(5), ERROR_DESC VARCHAR(100), IS_VALID CHARACTER NOT NULL DEFAULT 'N', TRAN_ID VARCHAR(30), PAY_DATE TIMESTAMP, INST_PERIOD INTEGER, CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (ORDER_ID)) </pre> h2. China Trust Service <pre> com.aces.ctcb.service.ChinaTrustService service = new com.aces.ctcb.service.ChinaTrustService(); </pre> h3. getURL <pre> String url = service.getURL(Connection conn, PaymentCtcb payment) </pre> # *conn* - Database connection. # *payment* - PaymentCtcb object. > * *orderId* - Order ID. > * *amount* - Transaction amount. > * *currency* - com.aces.ctcb.common.CommonConstants.CURRENCY_CODE_TAIWAN > * *trxType* - > * *returnURL* - > * *shopperRefNo* - > * *InstallPeriod* - only IGNORE if not applicable for Installment. > * *TrxTypeCtcb* - com.aces.ctcb.common.CommonConstants.TRANSACTION_TYPE_NORMAL || INSTALLMENT > * *Language* - com.aces.ctcb.common.CommonConstants.CUSTOMIZE_TRADITIONAL_CHINESE || SIMPLIFIED_CHINESE || ENGLISH h3. updateTransaction <pre> ResponseCtcb res = updateTransaction(Connection conn, HttpServletRequest request) </pre> # *ResponseCtcb* > * recordErrorCode - 0 > * recordErrorMsg - > * trxErrorCode - 00 > * trxErrorMsg - > * status - 0 > * orderId - String > * amount - double > * trxType - > * authCode - > * termSeq > * TranId - > * valid -