Project

General

Profile

Actions

Specification » History » Revision 7

« Previous | Revision 7/9 (diff) | Next »
Soh Keong, 01/14/2013 09:29 AM


Specification

Activity Diagram

ecpg.png

Programming Guide

Resources

SCM

see wiki

Jar File Download

Download Page

Classes

  • com.ecosway.ecpg.common - CommonConstants, CommonProperties
  • com.ecosway.ecpg.dao - ECPGInterface
  • com.ecosway.ecpg.model - CommonECPG, PaymentECPG, ResponseECPG
  • com.ecosway.ecpg.service - ECPGService, ECPGServiceImpl

properties file

  • ecpg.properties
  1. merchant.id - Merchant id, given by NCCC (National Credit Card Center of R.O.C)
  2. payment.url - Front-end payment page URL
  3. terminal.id - Terminal id, given by NCCC (National Credit Card Center of R.O.C)

Database Table

CREATE TABLE ECOS.ECPG_INTERFACE (
    ORDER_ID VARCHAR(15) NOT NULL, 
    TRX_TYPE VARCHAR(5),
    SHOPPER_REF_NO INTEGER,
    CHARGE_AMT DECIMAL(15,2),
    APP_CODE VARCHAR(8),
    STATUS VARCHAR(2), 
    ERROR_CODE VARCHAR(3),
    ERROR_DESC VARCHAR(60),
    IS_VALID CHARACTER NOT NULL, 
    PAY_DATE TIMESTAMP,
    CREATE_DATETIME TIMESTAMP NOT NULL,
    MODIFY_DATETIME TIMESTAMP, 
    PRIMARY KEY (ORDER_ID))

Get ECPG URL

com.ecosway.ecpg.service.ECPGService service = new com.ecosway.ecpg.service.ECPGServiceImpl();

String URL = service.getURL(Connection conn, PaymentECPG payment);

  1. conn - Database connection.
  2. payment - PaymentECPG object.
  • orderId - Order ID.
  • amount - Transaction amount.
  • trxType - Transaction Type.
  • shopperRefNo - Shopper Reference Number.
  • returnURL - Page to be return after transaction.

Update ECPG Response into Database

com.ecosway.ecpg.service.ECPGService service = new com.ecosway.ecpg.service.ECPGServiceImpl();
com.ecosway.ecpg.model.ResponseECPG res = service.updateTransaction(Connection conn, HttpServletRequest request)
  1. ResponseECPG
  • orderId - String
  • amount - double
  • status - String
  • responseCode - String
  • responseMsg - String
  • authCode - String
  • payDate - Date
  • valid - boolean

Updated by Soh Keong over 11 years ago · 7 revisions