Project

General

Profile

Actions

Specification

Activity Diagram

Programming Guide

Jar version

version Description
1.o Init

Jar File Download

Jar
Properties
Lib

properties file

  • ctcb.properties
  1. merchant.id
  2. terminal.id
  3. mer.id
  4. key
  5. terminal.id.installment
  6. mer.id.installment
  7. key.installment
  8. payment.url.credit.card
  9. CONNECTION_TIMEOUT
  10. READ_TIMEOUT

Database Table

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(200), 
    IS_VALID CHARACTER NOT NULL DEFAULT 'N', 
    TRAN_ID VARCHAR(50),
    PAY_DATE TIMESTAMP, 
    INST_PERIOD INTEGER,
    CREATE_DATETIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
    MODIFY_DATETIME TIMESTAMP, 
    PRIMARY KEY (ORDER_ID))

China Trust Service

com.aces.ctcb.service.ChinaTrustService service = new com.aces.ctcb.service.ChinaTrustService();

getURL

String url = service.getURL(Connection conn, PaymentCtcb payment)
  1. conn - Database connection.
  2. payment - PaymentCtcb object.
  • orderId - Order ID.
  • amount - Transaction amount.
  • currency - com.aces.ctcb.common.CommonConstants.CURRENCY_CODE_TAIWAN
  • trxType -
  • returnURL -
  • shopperRefNo -
  • InstallPeriod - only 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

updateTransaction

ResponseCtcb res = updateTransaction(Connection conn, HttpServletRequest request)
  1. ResponseCtcb
  • recordErrorCode - 0
  • recordErrorMsg -
  • trxErrorCode - 00
  • trxErrorMsg -
  • status - 0
  • orderId -
  • amount -
  • trxType -
  • authCode -
  • TranId -
  • valid -

Updated by Soh Keong over 3 years ago ยท 6 revisions