Project

General

Profile

Actions

Deployment And Programming Guide » History » Revision 8

« Previous | Revision 8/12 (diff) | Next »
Soh Keong, 09/18/2004 01:46 AM


Deployment And Programming Guide

Resources

SCM

see wiki

File Download

Jar file
Properties file (copy to /data/alipay folder)
Sample payment JSP
Sample response JSP

properties file

  • alipay.properties
  1. payment.url - Provided by alipay
  2. service - Provided by alipay
  3. payment_type - Provided by alipay
  4. partner.id - Provided by alipay
  5. key - Provided by alipay

Database Table


CREATE TABLE 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))

Get URL

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));
  1. conn - Database connection.
  2. 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. (Browser)
  • aNotifyURL - Payment response will passed to. (Server)

Update mPay Response into Database

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)
  1. ResponseAlipay
  • aOrderID - String
  • aAmount - double
  • aDescription - String
  • aValid - boolean
  • aTransactionNo - String
  • aTransactionStatus - String
  • aPayDate - java.util.Date

Updated by Soh Keong over 20 years ago · 8 revisions