Project

General

Profile

Specification » History » Revision 2

Revision 1 (Soh Keong, 11/25/2020 03:29 PM) → Revision 2/3 (Soh Keong, 11/25/2020 03:50 PM)

{{toc}} 

 h1. Specification 

 h1. Activity Diagram 
 !express_checkout.png! 

 h1. Programming Guide 

 h3. Jar version  

 |_. version |_. Description    | 
 | 1.0         | Init             | 

 h3. Jar File Download 

 "Jar":/redmine/attachments/download/524/Paypal_Connector-1.8.jar 
 "Properties":/redmine/attachments/download/525/paypal_Aces.properties 

 * *mol.properties* 

 # *PP_USER_MALL*                    - Provided by PayPal 
 # *PP_PASSWORD_MALL*                - Provided by PayPal 
 # *PP_SIGNATURE_MALL*               - Provided by PayPal 
 # *PP_CHECKOUT_URL_MALL*            - Provided by PayPal 
 # *PP_NVP_ENDPOINT_MALL*            - Provided by PayPal 
 # *PP_ALLOW_STATUS_PENDING_MALL*    - Provided by PayPal 
 # *API_VERSION*                     - Provided by PayPal 
 # *LOGO_IMG*                        - Logo @payment page 
 # *SOLUTIONTYPE*                    - Sole (no need Paypal account) / Mark (Must have Paypal account) 
 # *CONNECTION_TIMEOUT*              - Set connection timeout 
 # *READ_TIMEOUT*                    - Set connection read timeout 

 h3. Database Table 

 <pre> 
 CREATE TABLE PAYPAL_INTERFACE ( 
	 ORDER_ID VARCHAR(15) NOT NULL,  
	 TRX_TYPE VARCHAR(5), 
	 SHOPPER_REF_NO INTEGER, 
	 CHARGE_AMT DECIMAL(15,2),  
	 CURRENCY_CODE VARCHAR(3), 
	 STATUS VARCHAR(2),  
	 RESPONSE_CODE VARCHAR(20), 
	 RESPONSE_MESSAGE VARCHAR(100), 
	 IS_VALID CHARACTER NOT NULL,  
	 PAY_DATE TIMESTAMP, 
	 CREATE_DATETIME TIMESTAMP NOT NULL, 
	 MODIFY_DATETIME TIMESTAMP,  
	 PRIMARY KEY (ORDER_ID)); 
 </pre> 

 h3. getUrl 

 <pre> 
 com.ecosway.paypal.service.PaypalService service = new com.ecosway.paypal.service.PaypalServiceImpl(); 

 String[] results = service.getUrl(Connection conn, com.ecosway.paypal.model.PaymentPaypal bean) 
 </pre> 

 # *String[] results*  
 # * *[0]* - com.ecosway.paypal.common.CommonConstant.PAYPAL_ACK_SUCCESS | PAYPAL_ACK_SUCCESS_WITH_WARNING | PAYPAL_ACK_ERROR 
 # * *[1]* - Token 

 # *conn*          - Database connection. 
 # *bean*          - PaymentPaypal object. 
 # * *company*           - String 
 # * *orderID*           - String 
 # * *amount*            - double 
 # * *currencyCode*      - String 
 # * *transactionType* - String 
 # * *shopperRefID*      - int 
 # * *paymentType*       - String 
 # * *returnUrl*         - String 
 # * *cancelUrl*         - String 
 # * *itemPaypalList*    - List<ItemPaypal> 
 # * * *itemName*          - String  
 # * * *description*       - String 
 # * * *itemCode*          - String 
 # * * *itemPrice*         - double 
 # * * *quantity*          - int 

 h3. updateTransaction 

 <pre> 
 com.ecosway.paypal.model.ResponsePaypal resultBean = service.updateTransaction(Connection conn, HttpServletRequest request, String company) 
 </pre> 

 # *com.ecosway.paypal.model.ResponsePaypal* 
 # * *company*           - String 
 # * *orderID*           - String 
 # * *amount*            - double 
 # * *currencyCode*      - String 
 # * *transactionType* - String 
 # * *status*            - String 
 # * *valid*             - boolean 
 # * *responseCode*      - String 
 # * *responseMessage* - String 
 # * *payDate*           - Date