Actions
Deployment And Programming Guide » History » Revision 3
« Previous |
Revision 3/8
(diff)
| Next »
Soh Keong, 04/12/2013 02:29 PM
Deployment And Programming Guide¶
Resources¶
SCM¶
see wiki
File Download¶
Jar file
mPay API (Please unzip it.)
mPay cert and properties file (Unzip to /data/mPay2 folder)
Sample payment JSP
Sample response JSP
properties file¶
- mPay.properties
- payment.url - Provided by mPay
- merchantid - Provided by mPay
- merchant_tid - Provided by mPay
- serverCertPath - server cert location and name
- merchantCertPath - merchant cert location and name
- merchantCertPwd - Provided by mPay
Database Table¶
CREATE TABLE MPAY_INTERFACE ( ORDER_ID VARCHAR(15) NOT NULL, TRX_TYPE VARCHAR(15) NOT NULL, SHOPPER_REF_NO INTEGER NOT NULL, CHARGE_AMT DECIMAL(15,2) NOT NULL, RESPONSE_CODE VARCHAR(4), IS_VALID CHARACTER NOT NULL, PAY_DATE TIMESTAMP, CREATE_DATETIME TIMESTAMP NOT NULL, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (ORDER_ID))
Get URL
com.ecosway.mpay.service.MPayService service = new com.ecosway.mpay.service.MPayServiceImpl(); String url = service.getURL(Connection conn, PaymentMPay pay));
- conn - Database connection.
- payment - PaymentMPay object.
- aordernum - Order ID.
- aamt - Transaction amount.
- acurrencycode - Currency Code of transaction. Allowed only HKD, RMB and USD
- acustomizeddata - Remark message
- aTransactionType - Transaction Type.
- aShopperRefID - Shopper Reference Number.
- adatetime - Order date of transaction. The value should be in the format of "yyyyMMddHHmmss"
- acardtype - To identify the payment method. ("14" represent PRC2.)
- areturnurl - Payment response will passed to in normal cases.
- afailurl - Payment response will passed to in abnormal cases.
- alocale - language used. Allowed only en_US, zh_TW, zh_CN.
Update mPay Response into Database
com.ecosway.mpay.service.MPayService service = new com.ecosway.mpay.service.MPayServiceImpl(); com.ecosway.mpay.model.ResponseMPay res = service.updateTransaction(Connection conn, HttpServletRequest res)
- ResponseMPay
- aordernum - String
- aamt - double
- acurrencycode - String
- acustomizeddata - String
- aValid - boolean
- asysdatetime - java.util.Date
- arefnum - String
- asettledate - String
- arspcode - String
- aauthcode - String
Updated by Soh Keong over 11 years ago · 3 revisions