Versions in this module Expand all Collapse all v1 v1.3.1 Aug 17, 2022 Changes in this version + const Version + var GDefaultMerchSysConfig = MerchSysConfig + var GMultiMerchSysConfigs = map[string]MerchSysConfig + func DeepCopy(value interface{}) interface + func DeleteEmptyValue(src map[string]interface{}) map[string]interface + func DoGetReq(url string, params map[string]interface{}, msc *MerchSysConfig) (*http.Response, error) + func DoPostReq(url string, params map[string]interface{}, msc *MerchSysConfig) (*http.Response, error) + func DoUploadFile(url string, params map[string]interface{}, fileParamName string, ...) (*http.Response, error) + func FormatSignSrcText(method string, paramMap map[string]interface{}) (string, error) + func Println(v ...interface{}) + func RsaLongDecrypt(content string, msc *MerchSysConfig) (result string) + func RsaLongEncrypt(content string, msc *MerchSysConfig) (result string) + func RsaSign(content string, msc *MerchSysConfig) (result string, err error) + func RsaSignVerify(signData string, originalData string, msc *MerchSysConfig) (err error) + func ToString(v interface{}) string + type ApiError struct + ErrorCode string + ErrorMsg string + ErrorType string + InvalidParam string + Status string + func FilterApiError(respBodyString string) (*ApiError, error) + func HandleResponse(resp *http.Response, msc *MerchSysConfig) (map[string]interface{}, *ApiError, error) + func RequestAdaPay(reqUrl string, requestMethod RequestMethod, reqParam map[string]interface{}, ...) (map[string]interface{}, *ApiError, error) + func UploadAdaPay(reqUrl string, reqParam map[string]interface{}, fileParamName string, ...) (map[string]interface{}, *ApiError, error) + type MerchSysConfig struct + ApiKeyLive string + ApiKeyTest string + RspPriKey string + RspPubKey string + func GetMerchSysConfig(mscId string) MerchSysConfig + func ReadMerchConfig(configPath string) (*MerchSysConfig, error) + func (msc *MerchSysConfig) IsEmpty() bool + type RequestMethod string + const GET + const POST + const UPLOAD