This commit is contained in:
苏尹岚
2020-11-23 16:03:38 +08:00
parent e16b3b5e6c
commit 8d5112c619

View File

@@ -175,8 +175,8 @@ type CreateOrderParam struct {
TradeType string `json:"trade_type" xml:"trade_type"`
TotalFee int `json:"total_fee" xml:"total_fee"`
SubAppID string `json:"subAppID" xml:"sub_appid,omitempty"`
SubMchID string `json:"subMchID" xml:"sub_mch_id,omitempty"`
// SubAppID string `json:"sub_appid" xml:"sub_appid,omitempty"`
SubMchID string `json:"sub_mch_id" xml:"sub_mch_id,omitempty"`
Detail CData `json:"detail.omitempty" xml:"detail,omitempty"`
Attach string `json:"attach,omitempty" xml:"attach,omitempty"`
FeeType string `json:"fee_type,omitempty" xml:"fee_type,omitempty"`
@@ -442,7 +442,6 @@ func (a *API) signParam(signType string, params map[string]interface{}) (sig str
sort.Sort(sort.StringSlice(valueList))
valueList = append(valueList, fmt.Sprintf("key=%s", a.appKey))
sig = strings.Join(valueList, "&")
fmt.Println("tettttttttttttttttttttttttttttttttttttttttt", sig)
var binSig []byte
if signType == sigTypeSha256 {
mac := hmac.New(sha256.New, []byte(a.appKey))