|
@@ -2,6 +2,7 @@ package adapayCore |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"bytes" |
|
|
"bytes" |
|
|
|
|
|
"crypto/tls" |
|
|
"encoding/json" |
|
|
"encoding/json" |
|
|
"errors" |
|
|
"errors" |
|
|
"fmt" |
|
|
"fmt" |
|
@@ -146,8 +147,12 @@ func DoPostReq(url string, params map[string]interface{}, msc *MerchSysConfig) ( |
|
|
request.Header.Add("sdk_version", "go_v"+Version) |
|
|
request.Header.Add("sdk_version", "go_v"+Version) |
|
|
sign, _ := RsaSign(url+paramText, msc) |
|
|
sign, _ := RsaSign(url+paramText, msc) |
|
|
request.Header.Add("signature", sign) |
|
|
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) { |
|
|
func DoUploadFile(url string, params map[string]interface{}, fileParamName string, msc *MerchSysConfig) (*http.Response, error) { |
|
|