Bläddra i källkod

add Reverse: for v1.3.5

tags/v1.3.5
jiaoboxiang 2 år sedan
förälder
incheckning
f798272211
1 ändrade filer med 4 tillägg och 4 borttagningar
  1. +4
    -4
      pay/pay_by_join.go

+ 4
- 4
pay/pay_by_join.go Visa fil

@@ -9,7 +9,7 @@ import (
"strings"
)

func UniPayByJoin(payParams *md.JoinPayReq, isPrd bool) (map[string]interface{}, error) {
func UniPayByJoin(payParams *md.JoinPayReq, paySecretKey string,isPrd bool) (map[string]interface{}, error) {
payParams.P0Version = "2.1"
//payParams.P1MerchantNo = md.PayTestAccount
payParams.P4Cur = "1"
@@ -24,7 +24,7 @@ func UniPayByJoin(payParams *md.JoinPayReq, isPrd bool) (map[string]interface{},
//商家报备编号(分微信和支付宝的);支付宝的://payParams.QATradeMerchantNo = md.PayTestAliAccount
//商家报备编号(分微信和支付宝的);微信的://payParams.QATradeMerchantNo = md.PayTestWeChatAccount
postData := url.Values{}
creatHmac(payParams, &postData)
creatHmac(payParams,paySecretKey, &postData)
zhios_pay_utils.FilePutContents("UniPayByJoin", zhios_pay_utils.SerializeStr(map[string]interface{}{
"data": payParams,
}))
@@ -39,7 +39,7 @@ func UniPayByJoin(payParams *md.JoinPayReq, isPrd bool) (map[string]interface{},
return resp, err
}

func creatHmac(payParams *md.JoinPayReq, postData *url.Values) {
func creatHmac(payParams *md.JoinPayReq,paySecretKey string, postData *url.Values) {
hmac := ""
if payParams.P0Version != "" {
postData.Add("p0_Version", payParams.P0Version)
@@ -129,6 +129,6 @@ func creatHmac(payParams *md.JoinPayReq, postData *url.Values) {
postData.Add("ql_TerminalIp", payParams.QLTerminalIp)
hmac = hmac + payParams.QLTerminalIp
}
payParams.Hmac = zhios_pay_utils.Md5(hmac + md.PayTestSecretKey)
payParams.Hmac = zhios_pay_utils.Md5(hmac + paySecretKey)
postData.Add("hmac", payParams.Hmac)
}

Laddar…
Avbryt
Spara