Actions
Specification » History » Revision 4
« Previous |
Revision 4/10
(diff)
| Next »
Soh Keong, 03/02/2023 10:44 AM
- Table of contents
- Specification
- Activity Diagram
- Programming Guide
Specification¶
Activity Diagram¶
3D¶
Non-3D¶
Programming Guide¶
Jar version¶
version | Description |
---|---|
1.0 | Init |
Jar File Download¶
"Jar":
"Properties":
"JSP CreatePayment":
Classes¶
- com.ecpay.bean.aces - AcesRequestBean, AcesResponseBean
- com.ecpay.common - CommonConstant, CommonProperties, PaymentTypeEnum
- com.ecpay.dao - EcPayInterface
- com.ecpay.service - EcPayService
- com.ecpay.utils - CommonUtils, HashUtil, HttpUtil
properties file¶
- ecPay.properties
- merchant.id - Merchant login name given by EcPay
- hash.key - From portal
- hash.iv - From portal
- payment.url - by EcPay
- query.trade.url - by EcPay
- url.token - by EcPay
- url.create - by EcPay
- local.create.payment.page - Mall Page
- local.non.3d.result.page - Mall Page
- CONNECTION_TIMEOUT - 5000 ms
- READ_TIMEOUT - 30000 ms
Database Table¶
CREATE TABLE ECPAY_INTERFACE ( ORDER_ID VARCHAR(15) NOT NULL, TRX_TYPE VARCHAR(5), SHOPPER_REF_NO INTEGER, CURRENCY VARCHAR(3), CHARGE_AMT DECIMAL(15,2), ORDER_DATETIME TIMESTAMP NOT NULL, STEPS VARCHAR(10), TRANS_CODE INTEGER, TRANS_MESSAGE VARCHAR(200), RTN_CODE INTEGER, RTN_MESSAGE VARCHAR(210), TRADE_NO VARCHAR(20), TRADE_DATE TIMESTAMP, TRADE_STATUS VARCHAR(8), PAYMENT_TYPE VARCHAR(20), INST_PERIOD INTEGER, INST_DOWN_PAY INTEGER, INST_MONTH_PAY INTEGER, CARD_AUTH_CODE VARCHAR(6), CARD_BANK VARCHAR(30), IS_VALID CHARACTER NOT NULL DEFAULT 'N', PAY_DATE TIMESTAMP, CREATE_DATETIME TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (ORDER_ID))
EcPay Service¶
com.ecpay.service.EcPayService service = new com.ecpay.service.EcPayService();
getUrl¶
String url = service.getUrl(Connection conn, AcesRequestBean bean)
- conn - Database connection.
- payment - PaymentMOL object.
- orderId - Order ID.
- totalAmount - Transaction amount. (Integer)
- orderDatetime - LocalDateTime
- trxType - Transaction Type.
- shopperRefNo - Shopper Reference Number.
- currency - CommonConstant.CURRENCY_TAIWAN
- CreditInstallment - Support multiple period with comma delimiter. Example (6,12,24)
- returnUrl - Backend Response
- orderResultUrl - Frontend Response
- transactionDescription - Example : Aces Sales
- ItemName - Example : Aces Product
- url - CreatePaymentPage's URL
- Parameter - in URL
- orderId -
- token -
- language - Will display in Payment Page
createPaymentPage (Web JS)¶
Refer : https://developers.ecpay.com.tw/?p=8989
Sample Page (JSP CreatePayment) : /redmine/projects/ecpay/wiki/Specification/edit#Jar-File-Download
String url = service.getUrl(Connection conn, String orderId, String token);
For
1. 3D : Redirect to 3D page
2. Non-3D : Redirect to Receipt Page
updateTransaction¶
AcesResponseBean bean = updateTransaction(Connection conn, HttpServletRequest request)
- conn - Database connection.
- bean - AcesResponseBean object.
- orderId - Order ID.
- transactionCode -
- transactionMessage -
- returnCode -
- returnMessage -
- ecPayOrderId -
- ecPayOrderDate -
- transactionStatus - com.ecpay.common.CommonConstant.TRANS_CODE_SUCCESS
- paymentType -
- payDate -
- installmentPeriod -
- downPayment -
- monthlyPayment -
- cardAuthCode -
- cardBank -
Updated by Soh Keong almost 2 years ago · 4 revisions