Project

General

Profile

Programming Guide » History » Version 6

chin-yeh, 09/21/2011 01:14 PM

1 2 chin-yeh
{{toc}}
2
3 1 chin-yeh
h1. Programming Guide
4 2 chin-yeh
5
Describes how to integrate the mPay into online mall.
6
7 4 chin-yeh
*Demo application:*
8
* Generate Redirect URL (for hosted payment form)
9
> http://192.168.2.68/ecosway/mpay-sample/payment_form.html
10 5 chin-yeh
* Query Payment Status:
11 4 chin-yeh
> http://192.168.2.68/ecosway/mpay-sample/query.html
12 3 chin-yeh
13 2 chin-yeh
h2. Source files
14
15
> Get the source files from [[wiki#SCM|SCM]].
16
17
*Files:*
18
* my.com.eCosway.mpay
19
** Commons - list of common constant
20
** MpayInterfaceUtils - an utility to perform data persistence related operation
21
** MpayPaymentUtils - the mPay APIs
22
** MpayProperties - data model of the mPay properties
23
** PaymentRequest - data model of the mPay's payment request
24
** PaymentResponse - data model of the mPay's payment response
25
* resources.properties.mpay
26
** mpay.properties - the application properties file
27 3 chin-yeh
28
*Demo application:*
29 1 chin-yeh
> can be found in mpay-sample folder (web content)
30 5 chin-yeh
31
h2. Generate Redirect URL
32
33 6 chin-yeh
Generates the URL which will be used to redirect user to the mPay's hosted payment form.
34
35
36 5 chin-yeh
h3. Input Parameters
37
38 6 chin-yeh
* *orderNo* - the unique order number 
39
* *txtDate* - the transaction date
40
* *amount* - the transaction amount
41
* *returnUrl* - mPay will redirect the user to this URL after made the payment
42
* *locale* - the display language of the payment form
43
* *paymentMethod* - the payment method, e.g. _CUP_, _Alipay_
44
45 5 chin-yeh
h3. Output Parameters
46 6 chin-yeh
47
Use the returned key-pair values to construct the *HTML form*. The recommended HTTP method is *POST*.
48 5 chin-yeh
49
h3. Code Snippets
50
51
52
h2. Query Payment Status
53
54
h3. Input Parameters
55
56
h3. Output Parameters
57
58
h3. Code Snippets