Specification » History » Version 4
Soh Keong, 04/15/2021 11:45 AM
1 | 1 | Soh Keong | {{toc}} |
---|---|---|---|
2 | |||
3 | h1. Specification |
||
4 | |||
5 | h1. Activity Diagram |
||
6 | |||
7 | !paymentPage.jpg! |
||
8 | |||
9 | h1. Programming Guide |
||
10 | |||
11 | h2. Jar version |
||
12 | |||
13 | |_. version |_. Description | |
||
14 | | 1.o | Init | |
||
15 | |||
16 | h3. Jar File Download |
||
17 | |||
18 | 4 | Soh Keong | "Jar":/redmine/attachments/download/591/ctbc-1.0.jar |
19 | "Properties":/redmine/attachments/download/590/ctbc.properties |
||
20 | "Lib":/redmine/attachments/download/592/posapi_mac_j_npg.jar |
||
21 | 1 | Soh Keong | |
22 | h2. properties file |
||
23 | |||
24 | * *ctcb.properties* |
||
25 | |||
26 | # *merchant.id* |
||
27 | # *terminal.id* |
||
28 | # *mer.id* |
||
29 | # *key* |
||
30 | 4 | Soh Keong | # *terminal.id.installment* |
31 | # *mer.id.installment* |
||
32 | # *key.installment* |
||
33 | 1 | Soh Keong | # *payment.url.credit.card* |
34 | # *CONNECTION_TIMEOUT* |
||
35 | # *READ_TIMEOUT* |
||
36 | |||
37 | h2. Database Table |
||
38 | |||
39 | <pre> |
||
40 | |||
41 | |||
42 | </pre> |
||
43 | |||
44 | |||
45 | h2. China Trust Service |
||
46 | |||
47 | <pre> |
||
48 | com.aces.ctcb.service.ChinaTrustService service = new com.aces.ctcb.service.ChinaTrustService(); |
||
49 | </pre> |
||
50 | |||
51 | h3. getURL |
||
52 | |||
53 | <pre> |
||
54 | String url = service.getURL(Connection conn, PaymentCtcb payment) |
||
55 | </pre> |
||
56 | |||
57 | # *conn* - Database connection. |
||
58 | # *payment* - PaymentCtcb object. |
||
59 | > * *orderId* - Order ID. |
||
60 | > * *amount* - Transaction amount. |
||
61 | > * *currency* - com.aces.ctcb.common.CommonConstants.CURRENCY_CODE_TAIWAN |
||
62 | > * *trxType* - |
||
63 | > * *returnURL* - |
||
64 | > * *shopperRefNo* - |
||
65 | 2 | Soh Keong | > * *InstallPeriod* - IGNORE if not applicable |
66 | 1 | Soh Keong | > * *TrxTypeCtcb* - com.aces.ctcb.common.CommonConstants.TRANSACTION_TYPE_NORMAL || INSTALLMENT |
67 | > * *Language* - com.aces.ctcb.common.CommonConstants.CUSTOMIZE_TRADITIONAL_CHINESE || SIMPLIFIED_CHINESE || ENGLISH |
||
68 | 2 | Soh Keong | |
69 | h3. updateTransaction |
||
70 | |||
71 | <pre> |
||
72 | ResponseCtcb res = updateTransaction(Connection conn, HttpServletRequest request) |
||
73 | </pre> |
||
74 | |||
75 | # *ResponseCtcb* |
||
76 | > * recordErrorCode - |
||
77 | > * recordErrorMsg - |
||
78 | > * trxErrorCode - |
||
79 | > * trxErrorMsg - |
||
80 | > * status - |
||
81 | > * orderId - String |
||
82 | > * amount - double |
||
83 | > * trxType - |
||
84 | > * authCode |
||
85 | > * termSeq |
||
86 | > * TranId |
||
87 | > * valid |