Project

General

Profile

Deployment And Programming Guide » History » Version 2

Soh Keong, 09/15/2004 03:36 AM

1 1 Soh Keong
h1. Deployment And Programming Guide
2
3
h2. Resources
4
5
h3. SCM
6
7
see [[wiki#SCM]]
8
9
h3. File Download
10
11 2 Soh Keong
"Jar file":http://192.168.2.13:50000/redmine/attachments/download//alipay-1.0-SNAPSHOT.jar
12
"Properties file":http://192.168.2.13:50000/redmine/attachments/download//alipay.properties (copy to /data/alipay folder)
13
"Sample payment JSP":http://192.168.2.13:50000/redmine/attachments/download//alipay.jsp
14
"Sample response JSP":http://192.168.2.13:50000/redmine/attachments/download//alipayProcesses.jsp
15 1 Soh Keong
16
h3. properties file
17
18
* *alipay.properties* 
19
20
# *payment.url*      - Provided by alipay
21
# *service*          - Provided by alipay
22
# *payment_type*     - Provided by alipay
23
# *partner.id*       - Provided by alipay 
24
# *key*              - Provided by alipay
25
26
h3. Database Table
27
28
<pre>
29
30
CREATE TABLE ECOS.ALIPAY_INTERFACE ( 
31
	ORDER_ID VARCHAR(15) NOT NULL, 
32
	TRX_TYPE VARCHAR(15), 
33
	SHOPPER_REF_NO INTEGER NOT NULL, 
34
	CHARGE_AMT DECIMAL(15,2) NOT NULL, 
35
	TRX_CODE VARCHAR(64), 
36
	TRX_STATUS VARCHAR(64), 
37
	IS_VALID CHARACTER NOT NULL, 
38
	PAY_DATE TIMESTAMP, 
39
	CREATE_DATETIME TIMESTAMP NOT NULL, 
40
	MODIFY_DATETIME TIMESTAMP, 
41
	PRIMARY KEY (ORDER_ID))
42
43
</pre>
44
45
*Get URL*
46
47
<pre>
48
com.ecosway.alipay.service.AlipayService service = new com.ecosway.alipay.service.AlipayServiceImpl();
49
50
String url = service.getURL(java.sql.Connection conn, com.ecosway.alipay.model.PaymentAlipay pay));
51
</pre>
52
53
# *conn*               - Database connection.
54
# *payment*            - PaymentAlipay object.
55
> * *aOrderID*         - Order ID.
56
> * *aAmount*          - Transaction Amount.
57
> * *aDescription*     - Transaction Description
58
> * *aTransactionType* - Transaction Type.
59
> * *aShopperRefID*    - Shopper Reference Number.
60
> * *aReturnURL*       - Payment response will passed to.
61
62
*Update mPay Response into Database*
63
64
<pre>
65
com.ecosway.alipay.service.AlipayService service = new com.ecosway.alipay.service.AlipayServiceImpl();
66
com.ecosway.alipay.model.ResponseAlipay res = service.updateTransaction(java.sql.Connection conn, javax.servlet.http.HttpServletRequest req)
67
</pre>
68
69
# *ResponseAlipay*
70
> * *aOrderID*           - String
71
> * *aAmount*            - double
72
> * *aDescription*       - String
73
> * *aValid*             - boolean
74
> * *aTransactionNo*     - String
75
> * *aTransactionStatus* - String
76
> * *aPayDate*           - java.util.Date