Project

General

Profile

Deployment And Programming Guide » History » Version 11

Soh Keong, 09/25/2004 12:58 AM

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