Specification » History » Version 16
Soh Keong, 05/24/2012 09:03 AM
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 | 13 | Soh Keong | * *my.com.eCosway.tns.utils* - CommonUtils, SecureHash, URLUtils |
26 | 8 | Soh Keong | * *test.my.com.eCosway.tns.utils* - SecureHashTest, URLUtilsTest (JUnit Test) |
27 | |||
28 | h3. properties file |
||
29 | 1 | Soh Keong | |
30 | * *transaction.properties* |
||
31 | |||
32 | 8 | Soh Keong | # *vpc_Version* - The version of the Virtual Payment Client API being used. |
33 | # *vpc_Command* - Indicates the desired operation to be performed. |
||
34 | # *vpc_AccessCode* - Authenticates the merchant on the Payment Server. |
||
35 | 13 | Soh Keong | # *vpc_Merchant* - The Merchant ID identifies the merchant account against which settlements will be made. |
36 | # *vpc_Currency* - The currency of the order expressed as an ISO 4217 alpha code. |
||
37 | # *vpc_Locale* - Specifies the language used on the Payment Server pages that are displayed to the cardholder, in 3-Party transactions. |
||
38 | 1 | Soh Keong | # *vpc_SecureHash* - A secure hash which allows the Virtual Payment Client to authenticate the merchant and check the integrity of the Transaction Request. |
39 | 8 | Soh Keong | # *vpc_SecureHashType* - The type of hash algorithm used to generate the secure hash. |
40 | # *vpc_ReturnAuthResponseData* - Specifies whether the authorisation response data must be included in the Transaction Response. |
||
41 | |||
42 | 13 | Soh Keong | * *tns_url* - Used to redirect user to TNS Payment Page. |
43 | * *tns.interface.table.name* - table name of TNS interface. |
||
44 | * *java.naming.provider.url* - JNDI Port number, default is 1099. |
||
45 | * *data.Source* - JNDI Name in local-tx-datasource, datasources (db2-ds.xml) |
||
46 | |||
47 | 12 | Soh Keong | h3. Database Table |
48 | 9 | Soh Keong | |
49 | <pre> |
||
50 | CREATE TABLE ECOS.TNS_INTERFACE ( |
||
51 | 10 | Soh Keong | ORDER_ID VARCHAR(100) NOT NULL, |
52 | AMOUNT INTEGER, |
||
53 | TXN_TYPE VARCHAR(20), |
||
54 | MEMBER_ID VARCHAR(20), |
||
55 | ERROR_MESSAGE VARCHAR(255), |
||
56 | RESPONSE_CODE CHARACTER, |
||
57 | RECEIPT_NO VARCHAR(20), |
||
58 | TRANSACTION_NO INTEGER, |
||
59 | AUTHORIZE_ID VARCHAR(6), |
||
60 | CARD_TYPE VARCHAR(2), |
||
61 | TRANSACTION_IDENTIFIER VARCHAR(20), |
||
62 | IS_VALID CHARACTER, |
||
63 | LAST_UPDATED TIMESTAMP, |
||
64 | 1 | Soh Keong | |
65 | 10 | Soh Keong | PRIMARY KEY (ORDER_ID)); |
66 | 9 | Soh Keong | </pre> |
67 | 11 | Soh Keong | |
68 | h3. Integration |
||
69 | |||
70 | 14 | Soh Keong | *redirect to TNS Payment Page* |
71 | |||
72 | 1 | Soh Keong | <pre> |
73 | 14 | Soh Keong | my.com.eCosway.tns.service.TNSService service = new my.com.eCosway.tns.service.impl.TNSServiceImpl(); |
74 | 11 | Soh Keong | |
75 | 16 | Soh Keong | String res = service.redirectToPaymentGW(String orderNo, int amount, String locale, String returnURL, |
76 | 13 | Soh Keong | String transactionType, String shopperRefId, HttpServletResponse response); |
77 | 11 | Soh Keong | </pre> |
78 | |||
79 | # *orderNo* - The unique order No (1-40 alphanumeric). |
||
80 | # *amount* - The amount of the transaction (1-12 numeric). |
||
81 | # *returnURL* - Used by Payment Server to redirect the user back to merchant's web site. |
||
82 | # *transactionType* - The Type of Transaction. |
||
83 | 1 | Soh Keong | # *shopperRefId* - Member ID. |
84 | # *response* - Used to redirect to TNS payment page. |
||
85 | 14 | Soh Keong | |
86 | *To update TNS Response into Database* |
||
87 | |||
88 | <pre> |
||
89 | 16 | Soh Keong | my.com.eCosway.tns.model.TransResponse res = new my.com.eCosway.tns.tnsInterface.TNSInterfaces().updateTransaction(HttpServletRequest request) |
90 | 14 | Soh Keong | </pre> |