diff --git a/lib/adapay-sdk/adapay-core/http.go b/lib/adapay-sdk/adapay-core/http.go index 1f45321..4d27f9c 100644 --- a/lib/adapay-sdk/adapay-core/http.go +++ b/lib/adapay-sdk/adapay-core/http.go @@ -2,6 +2,7 @@ package adapayCore import ( "bytes" + "crypto/tls" "encoding/json" "errors" "fmt" @@ -146,8 +147,12 @@ func DoPostReq(url string, params map[string]interface{}, msc *MerchSysConfig) ( request.Header.Add("sdk_version", "go_v"+Version) sign, _ := RsaSign(url+paramText, msc) request.Header.Add("signature", sign) + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + client := &http.Client{Transport: tr} - return http.DefaultClient.Do(request) + return client.Do(request) } func DoUploadFile(url string, params map[string]interface{}, fileParamName string, msc *MerchSysConfig) (*http.Response, error) {