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