Project

General

Profile

Deployment And Programming Guide » History » Version 8

Soh Keong, 09/18/2004 01:46 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 7 Soh Keong
"Jar file":http://192.168.2.13:50000/redmine/attachments/download/450/alipay-1.0-SNAPSHOT.jar
12 3 Soh Keong
"Properties file":http://192.168.2.13:50000/redmine/attachments/download/445/alipay.properties (copy to /data/alipay folder)
13
"Sample payment JSP":http://192.168.2.13:50000/redmine/attachments/download/446/alipay.jsp
14
"Sample response JSP":http://192.168.2.13:50000/redmine/attachments/download/447/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 4 Soh Keong
CREATE TABLE ALIPAY_INTERFACE ( 
31 1 Soh Keong
	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 8 Soh Keong
> * *aReturnURL*       - Payment response will passed to. (Browser)
61
> * *aNotifyURL*       - Payment response will passed to. (Server)
62 1 Soh Keong
63
*Update mPay Response into Database*
64
65
<pre>
66
com.ecosway.alipay.service.AlipayService service = new com.ecosway.alipay.service.AlipayServiceImpl();
67
com.ecosway.alipay.model.ResponseAlipay res = service.updateTransaction(java.sql.Connection conn, javax.servlet.http.HttpServletRequest req)
68
</pre>
69
70
# *ResponseAlipay*
71
> * *aOrderID*           - String
72
> * *aAmount*            - double
73
> * *aDescription*       - String
74
> * *aValid*             - boolean
75
> * *aTransactionNo*     - String
76
> * *aTransactionStatus* - String
77
> * *aPayDate*           - java.util.Date