Project

General

Profile

Actions

Programming Guide » History » Revision 6

« Previous | Revision 6/21 (diff) | Next »
chin-yeh, 09/21/2011 01:14 PM


Programming Guide

Describes how to integrate the mPay into online mall.

Demo application:
  • Generate Redirect URL (for hosted payment form)

http://192.168.2.68/ecosway/mpay-sample/payment_form.html

  • Query Payment Status:

http://192.168.2.68/ecosway/mpay-sample/query.html

Source files

Get the source files from SCM.

Files:
  • my.com.eCosway.mpay
    • Commons - list of common constant
    • MpayInterfaceUtils - an utility to perform data persistence related operation
    • MpayPaymentUtils - the mPay APIs
    • MpayProperties - data model of the mPay properties
    • PaymentRequest - data model of the mPay's payment request
    • PaymentResponse - data model of the mPay's payment response
  • resources.properties.mpay
    • mpay.properties - the application properties file

Demo application:

can be found in mpay-sample folder (web content)

Generate Redirect URL

Generates the URL which will be used to redirect user to the mPay's hosted payment form.

Input Parameters

  • orderNo - the unique order number
  • txtDate - the transaction date
  • amount - the transaction amount
  • returnUrl - mPay will redirect the user to this URL after made the payment
  • locale - the display language of the payment form
  • paymentMethod - the payment method, e.g. CUP, Alipay

Output Parameters

Use the returned key-pair values to construct the HTML form. The recommended HTTP method is POST.

Code Snippets

Query Payment Status

Input Parameters

Output Parameters

Code Snippets

Updated by chin-yeh almost 13 years ago · 6 revisions