Ver código fonte

汇付天下支付

tags/v1.4.6
jiaoboxiang 2 anos atrás
pai
commit
60d5a31aeb
1 arquivos alterados com 6 adições e 1 exclusões
  1. +6
    -1
      lib/adapay-sdk/adapay-core/http.go

+ 6
- 1
lib/adapay-sdk/adapay-core/http.go Ver arquivo

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


Carregando…
Cancelar
Salvar