Project

General

Profile

Actions

Specification

Programming Guide

Jar version

version Description
1.2.1 Init

Jar File Download

Jar
Properties
Lib

properties file

  • wechat.properties
  1. payment.url
  2. qr.url
  3. mid
  4. tid
  5. msg.src
  6. msg.id
  7. md5.key
  8. inst.mid
  9. msg.type
  10. charset
  11. http.connection.timeout
  12. http.read.timeout

Database Table

CREATE TABLE WECHAT_INTERFACE ( 
    ORDER_ID VARCHAR(15) NOT NULL, 
    TRX_TYPE VARCHAR(15) NOT NULL, 
    SHOPPER_REF_NO INTEGER NOT NULL, 
    CURRENCY VARCHAR(3),
    CHARGE_AMT DECIMAL(15,2) NOT NULL, 
    QR_CODE VARCHAR(255),
    RESPONSE_CODE VARCHAR(15), 
    RESPONSE_MSG VARCHAR(100),
    IS_VALID CHARACTER NOT NULL, 
    PAY_DATE TIMESTAMP, 
    CREATE_DATETIME TIMESTAMP NOT NULL, 
    MODIFY_DATETIME TIMESTAMP, 
    PRIMARY KEY (ORDER_ID)) 

Method

com.vmart.wechat.service.WechatService service = new com.vmart.wechat.service.WechatService(); 

getDataURI / checkBillStatus

com.vmart.wechat.model.ResponseWechat response = service.getDataURI(Connection conn, com.vmart.wechat.model.PaymentWechat payment)
com.vmart.wechat.model.ResponseWechat response = service.checkBillStatus(Connection conn, com.vmart.wechat.model.PaymentWechat payment)
  1. conn - Database connection.
  2. payment - PaymentWechat object.
  • orderId - Order ID.
  • amount - Transaction amount.
  • currency -
  • requestTimestamp -
  • trxType -
  • shopperRefNo -
  • notifyUrl - Backend Status
  • returnUrl - Frontend redirect
  1. response - ResponseWechat object.
  • errorCode - String
  • errorDesc - String
  • orderId - Order ID.
  • qrCodeId -
  • billQRCode - Img billQRCode

updateTransaction

com.vmart.wechat.model.ResponseWechat updateTransaction(Connection conn, HttpServletRequest request)
  1. conn - Database connection.
  2. request - ResponseWechat object.
  • errorCode - String
  • errorDesc - String
  • orderId - String
  • trxType - Transaction Type.
  • valid - boolean

Updated by Soh Keong about 4 years ago ยท 2 revisions