Specification » History » Version 11
Soh Keong, 05/09/2012 12:37 PM
1 | 1 | Soh Keong | h1. Specification |
---|---|---|---|
2 | 2 | Soh Keong | |
3 | 8 | Soh Keong | h1. Activity Diagram |
4 | 4 | Soh Keong | |
5 | 2 | Soh Keong | Figure 1 showing the process flow from Mexico mall to TNS Payment Gateway Page. |
6 | !gw.png! |
||
7 | 3 | Soh Keong | Figure 2 showing the process flow of TNS Payment Gateway redirect back to Mexico Mall. |
8 | 1 | Soh Keong | !recv.png! |
9 | 5 | Soh Keong | |
10 | 8 | Soh Keong | h1. Programming Guide |
11 | 5 | Soh Keong | |
12 | 8 | Soh Keong | h2. Resources |
13 | 1 | Soh Keong | |
14 | 8 | Soh Keong | h3. SCM |
15 | 1 | Soh Keong | |
16 | see [[wiki#SCM]] |
||
17 | 8 | Soh Keong | |
18 | h3. Classes |
||
19 | |||
20 | * *my.com.eCosway.tns.commons* - CommonConstants |
||
21 | * *my.com.eCosway.tns.model* - Transaction, TransCommon, TransResponse |
||
22 | * *my.com.eCosway.tns.service* - TNSService (interface) |
||
23 | * *my.com.eCosway.tns.service.impl* - TNSServiceImpl (implementation of interface) |
||
24 | * *my.com.eCosway.tns.tnsInterface* - TNSInterfaces (Data Persistence) |
||
25 | * *my.com.eCosway.tns.utils* - SecureHash, URLUtils |
||
26 | * *test.my.com.eCosway.tns.utils* - SecureHashTest, URLUtilsTest (JUnit Test) |
||
27 | |||
28 | h3. properties file |
||
29 | |||
30 | * *jdbc.properties* |
||
31 | |||
32 | # *tns.interface.table.name* - table name of TNS interface |
||
33 | |||
34 | * *log4j.properties* |
||
35 | * *transaction.properties* |
||
36 | |||
37 | # *vpc_Version* - The version of the Virtual Payment Client API being used. |
||
38 | # *vpc_Command* - Indicates the desired operation to be performed. |
||
39 | # *vpc_AccessCode* - Authenticates the merchant on the Payment Server. |
||
40 | # *vpc_Merchant* - The Merchant ID identifies the merchant account against which settlements will be made. |
||
41 | # *vpc_SecureHash* - A secure hash which allows the Virtual Payment Client to authenticate the merchant and check the integrity of the Transaction Request. |
||
42 | # *vpc_SecureHashType* - The type of hash algorithm used to generate the secure hash. |
||
43 | # *vpc_ReturnAuthResponseData* - Specifies whether the authorisation response data must be included in the Transaction Response. |
||
44 | 9 | Soh Keong | # *tns_url* - Used to redirect user to TNS Payment Page. |
45 | |||
46 | h3. Table |
||
47 | |||
48 | <pre> |
||
49 | CREATE TABLE ECOS.TNS_INTERFACE ( |
||
50 | 10 | Soh Keong | ORDER_ID VARCHAR(100) NOT NULL, |
51 | AMOUNT INTEGER, |
||
52 | TXN_TYPE VARCHAR(20), |
||
53 | MEMBER_ID VARCHAR(20), |
||
54 | ERROR_MESSAGE VARCHAR(255), |
||
55 | RESPONSE_CODE CHARACTER, |
||
56 | RECEIPT_NO VARCHAR(20), |
||
57 | TRANSACTION_NO INTEGER, |
||
58 | AUTHORIZE_ID VARCHAR(6), |
||
59 | CARD_TYPE VARCHAR(2), |
||
60 | TRANSACTION_IDENTIFIER VARCHAR(20), |
||
61 | IS_VALID CHARACTER, |
||
62 | LAST_UPDATED TIMESTAMP, |
||
63 | |||
64 | PRIMARY KEY (ORDER_ID)); |
||
65 | 9 | Soh Keong | </pre> |
66 | 11 | Soh Keong | |
67 | h3. Integration |
||
68 | |||
69 | <pre> |
||
70 | TNSService service = new TNSServiceImpl(); |
||
71 | |||
72 | String response = service.sendToTNS(String orderNo, int amount, String locale, |
||
73 | String returnURL, String transactionType, String shopperRefId); |
||
74 | </pre> |
||
75 | |||
76 | # *orderNo* - The unique order No (1-40 alphanumeric). |
||
77 | # *amount* - The amount of the transaction (1-12 numeric). |
||
78 | # *locale* - Language used on the Payment Server Page (2-5 alphanumeric). |
||
79 | # *returnURL* - Used by Payment Server to redirect the user back to merchant's web site. |
||
80 | # *transactionType* - The Type of Transaction. |
||
81 | # *shopperRefId* - Member ID |