Browse Source

汇付天下支付

tags/v1.4.6
jiaoboxiang 2 years ago
parent
commit
60d5a31aeb
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      lib/adapay-sdk/adapay-core/http.go

+ 6
- 1
lib/adapay-sdk/adapay-core/http.go View File

@@ -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) {


Loading…
Cancel
Save