Project

General

Profile

Specification » History » Revision 7

Revision 6 (chin-yeh, 10/21/2010 12:42 PM) → Revision 7/14 (chin-yeh, 10/21/2010 08:19 PM)

{{toc}} 

 h1. Specification 

 The chosen integration method is *HTML Link Method*. By using this method, the customer(consumer) enters her/his credit card information through MAXCONNECT's payment form. Once the payment is processed by MAXCONNECT, the customer will be redirected back to merchant site either through <code>Kick System</code> or <code>Return Button</code>. 

 See attachment:diagram.pdf for the high level view of the payment flow. 

 h2. Java Package Name 

 The package name is  
 <pre>my.com.eCosway.maxconnect</pre> 

 h3. Required libraries 

 List of the required libraries: 
 * junit 4.7 
 * 2 

 h2. Integration Guide How to build JAR 

 MAXCONNECT returns This project uses <code>ANT</code> tool to build the payment result via *RETURN* button and *KICK System*. For security concern, JAR. You can use <code>Eclipse</code> or <code>ANT</code> to run the order update will only be done on ant script. The following guide executes the *KICK system*, which is a server-to-server calls (via HTTP GET method). ant script using ANT. 

 See attachment:diagram.pdf for the high level view of the payment flow. 

 h3. RETURN URL and KICK URL For Production 

 Site ID: 21400201 <pre> 
 Site Password: ARn7Nez8 ant script: build.xml 
 <pre> target name: package 
 RETURN URL: http://219.94.77.229/nzstore/nz/mc_back_url_nz.jsp   	
 KICK URL: http://219.94.77.229/nzstore/nz/mc_kick_callback_nz.jsp 
 </pre> 

 h3. Programming Guide 

 There is an utility to populate all of # Checkout the required fields for the MAXCONNECT payment form. One could use the utility project from [[Wiki#SCM|Source repository]] 
 # <code>cd</code> to customize the presentation of the HTML form. Sample code: checkout-ed folder and executes: 
 <pre> 
 <% 
	 final String orderId = "test ID 123"; 
	 final BigDecimal amount = new BigDecimal("88.34"); 
	 final String redirectUrl = "http://google.com"; 
	 final Commons.Locale language = Commons.Locale.CHINESE; 

	 PaymentFormBean formBean = PaymentUtils.generatePaymentFormBean(orderId,  
			 amount, redirectUrl, language); # ant package 
 </pre> 

 %> h3. For Development 

 <pre> 
 <form name="paymentFrm" method="<%=formBean.getFormMethod()%>" action="<%=formBean.getFormActionUrl() %>"> 
	
	
	 <% 
		 // iterate over the input items 	
		 final String inputTemplate = "<input type=\"hidden\" name=\"%1$s\" value=\"%2$s\""; 
		 for (Map.Entry<String, String> item : formBean.getFormElement().entrySet()) { 
			 out.print(String.format(inputTemplate, item.getKey(), item.getValue())); 
		 } 
	 %> 

	 <input type="submit" value="Submit"/> ant script: build.xml 
 </form> target name: package-dev 
 </pre> 

 </pre> 
 * *orderId* - # Checkout the unique ID of the order project from [[Wiki#SCM|Source repository]] 
 * *amount* - the settlement amount 
 * *redirectUrl* - this parameter will be returned by MAXCONNECT. One could use this # <code>cd</code> to do the page redirection checkout-ed folder and executes: 
 * *language* - the language to be used in the MAXCONNECT payment form 

 The payment result will be captured via *KICK* URL so that you can query the result based on the <code>orderId</code>. <pre> 
 # ant package-dev 
 </pre>