Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MchatAuth = utils.API{ Url: "/application/auth", Method: http.MethodGet, } MchatOnlineQrGenerate = utils.API{ Url: "/worker/onlineqr/generate", Method: http.MethodPost, } MchatOnlineQrcheck = utils.API{ Url: "/worker/onlineqr/status", Method: http.MethodPost, } MchatTransactionSettlement = utils.API{ Url: "/worker/settle/upload", Method: http.MethodPost, } )
Functions ¶
This section is empty.
Types ¶
type MchatOnlineQrCheckResponse ¶
type MchatOnlineQrCheckResponse struct { Status string `json:"status"` Code int `json:"code"` Message string `json:"message"` ID string `json:"id"` // if status is paid this field filled with transaction id WhoPaid string `json:"who_paid"` // if status is paid this field filled with who_paid UserRefID string `json:"user_ref_id"` // if status is paid this field filled with user_ref_id }
type MchatOnlineQrGenerateRequest ¶
type MchatOnlineQrGenerateRequest struct { Amount int `json:"amount"` BranchID string `json:"branch_id"` // optional Products []MchatProduct `json:"products"` Title string `json:"title"` SubTitle string `json:"sub_title"` NOAT string `json:"noat"` NHAT string `json:"nhat"` TTD string `json:"ttd"` ReferenceNumber string `json:"reference_number"` ExpireTime string `json:"expire_time"` }
type MchatProduct ¶
type MchatQrGenerateInput ¶
type MchatQrGenerateInput struct { Amount int `json:"amount"` PaymentUUID string `json:"payment_uuid"` Products []MchatProduct `json:"products"` }
type MchatWebookInput ¶
type MchatWebookInput struct { Type string `json:"type"` Data interface{} `json:"data"` }
type MchatWebookOrder ¶
type MchatWebookOrder struct { ReferenceNumber string `json:"reference_number"` WhoPaid string `json:"who_paid"` UserRefID string `json:"user_ref_id"` TransactionID string `json:"transaction_id"` OrderID string `json:"order_id"` Amount float64 `json:"amount"` Date string `json:"date"` Products []MchatProduct `json:"products"` }
type MchatWebookQuickpay ¶
type MchatWebookScanQR ¶
type MchatWebookScanQR struct { ReferenceNumber string `json:"reference_number"` WhoPaid string `json:"who_paid"` UserRefID string `json:"user_ref_id"` TransactionID string `json:"transaction_id"` GeneratedQRcode string `json:"generated_qrcode"` Amount float64 `json:"amount"` Date string `json:"date"` Products []MchatProduct `json:"products"` }
type MongolChat ¶
type MongolChat interface { GenerateQR(input MchatOnlineQrGenerateRequest) (MchatOnlineQrGenerateResponse, error) CheckQR(qr string) (MchatOnlineQrCheckResponse, error) }
func New ¶
func New(endpoint, apikey, workerkey, appsecret, branchno string) MongolChat
Click to show internal directories.
Click to hide internal directories.