Deployment And Programming Guide » History » Revision 4
Revision 3 (Soh Keong, 09/15/2004 08:13 AM) → Revision 4/12 (Soh Keong, 09/15/2004 01:12 AM)
h1. Deployment And Programming Guide h2. Resources h3. SCM see [[wiki#SCM]] h3. File Download "Jar file":http://192.168.2.13:50000/redmine/attachments/download/444/alipay-1.0-SNAPSHOT.jar "Properties file":http://192.168.2.13:50000/redmine/attachments/download/445/alipay.properties (copy to /data/alipay folder) "Sample payment JSP":http://192.168.2.13:50000/redmine/attachments/download/446/alipay.jsp "Sample response JSP":http://192.168.2.13:50000/redmine/attachments/download/447/alipayProcesses.jsp h3. properties file * *alipay.properties* # *payment.url* - Provided by alipay # *service* - Provided by alipay # *payment_type* - Provided by alipay # *partner.id* - Provided by alipay # *key* - Provided by alipay h3. Database Table <pre> CREATE TABLE ALIPAY_INTERFACE ECOS.ALIPAY_INTERFACE ( ORDER_ID VARCHAR(15) NOT NULL, TRX_TYPE VARCHAR(15), SHOPPER_REF_NO INTEGER NOT NULL, CHARGE_AMT DECIMAL(15,2) NOT NULL, TRX_CODE VARCHAR(64), TRX_STATUS VARCHAR(64), IS_VALID CHARACTER NOT NULL, PAY_DATE TIMESTAMP, CREATE_DATETIME TIMESTAMP NOT NULL, MODIFY_DATETIME TIMESTAMP, PRIMARY KEY (ORDER_ID)) </pre> *Get URL* <pre> com.ecosway.alipay.service.AlipayService service = new com.ecosway.alipay.service.AlipayServiceImpl(); String url = service.getURL(java.sql.Connection conn, com.ecosway.alipay.model.PaymentAlipay pay)); </pre> # *conn* - Database connection. # *payment* - PaymentAlipay object. > * *aOrderID* - Order ID. > * *aAmount* - Transaction Amount. > * *aDescription* - Transaction Description > * *aTransactionType* - Transaction Type. > * *aShopperRefID* - Shopper Reference Number. > * *aReturnURL* - Payment response will passed to. *Update mPay Response into Database* <pre> com.ecosway.alipay.service.AlipayService service = new com.ecosway.alipay.service.AlipayServiceImpl(); com.ecosway.alipay.model.ResponseAlipay res = service.updateTransaction(java.sql.Connection conn, javax.servlet.http.HttpServletRequest req) </pre> # *ResponseAlipay* > * *aOrderID* - String > * *aAmount* - double > * *aDescription* - String > * *aValid* - boolean > * *aTransactionNo* - String > * *aTransactionStatus* - String > * *aPayDate* - java.util.Date