feat:ras加密fix
This commit is contained in:
parent
2e938f241a
commit
99aa763357
|
@ -189,3 +189,23 @@ func BrokerWechatUrl(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
}
|
||||
|
||||
//// 首页
|
||||
//func Ind/*ex(c *gin.Context) {
|
||||
// c.HTML(200, "index.html", gin.H{})
|
||||
//}
|
||||
|
||||
//// 获取微信授权链接
|
||||
//func GetWxAuthUrl(c *gin.Context) {
|
||||
// req, _ := controllers.GetRequest(c).(*front.GetWxAuthUrlRequest)
|
||||
//
|
||||
// url, code := services.GetWxAuthUrl(*req)
|
||||
// controllers.HandCodeRes(c, url, code)
|
||||
//}
|
||||
//
|
||||
//// 通过code获取授权,openid
|
||||
//func GetWxAuth(c *gin.Context) {
|
||||
// //req, _ := controllers.GetRequest(c).(*front.GetWxAuthRequest)
|
||||
// //openId, code := services.GetWxAuth(*req)
|
||||
// //controllers.HandCodeRes(c, openId, code)
|
||||
//}*/
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package front
|
||||
|
||||
type GetWxAuthUrlRequest struct {
|
||||
PayChannelId string `json:"pay_channel_id" form:"pay_channel_id" validate:"required"`
|
||||
}
|
||||
|
||||
type GetWxAuthRequest struct {
|
||||
Code string `json:"code" form:"code" `
|
||||
State string `json:"state" form:"state"`
|
||||
PayChannelId string `json:"pay_channel_id" form:"pay_channel_id"`
|
||||
}
|
|
@ -33,10 +33,10 @@ func ServerRecovery() gin.HandlerFunc {
|
|||
}
|
||||
|
||||
c.JSON(500, gin.H{
|
||||
"code": 500,
|
||||
"msg": "system error",
|
||||
"request_uri": c.Request.URL.Path,
|
||||
"data": make(map[string]string),
|
||||
"code": 500,
|
||||
"msg": "system error",
|
||||
//"request_uri": c.Request.URL.Path,
|
||||
//"data": make(map[string]string),
|
||||
})
|
||||
}
|
||||
}()
|
||||
|
|
|
@ -18,4 +18,6 @@ var FrontRequestMapBeforeDecrypt = map[string]func() interface{}{
|
|||
common.FRONT_V1 + "/pay/refund": func() interface{} { return new(front.RequestBody) },
|
||||
common.FRONT_V1 + "/pay/query": func() interface{} { return new(front.RequestBody) },
|
||||
common.FRONT_V1 + "/pay/close": func() interface{} { return new(front.CloseReqs) },
|
||||
//common.FRONT_V1 + "/wx/index": func() interface{} { return new(entities.PageRequest) },
|
||||
//common.FRONT_V1 + "/wx/getWxAuthUrl": func() interface{} { return new(front.GetWxAuthUrlRequest) },
|
||||
}
|
||||
|
|
|
@ -67,6 +67,15 @@ func RegisterRoute(router *gin.Engine) {
|
|||
v1.GET("/brokerWechatUrl", front.BrokerWechatUrl)
|
||||
}
|
||||
|
||||
// 微信获取授权相关
|
||||
router.LoadHTMLGlob("./front/templates/*")
|
||||
//wx := v1.Group("/wx", middlewares.ValidateRequest())
|
||||
//{
|
||||
// wx.GET("/index", front.Index) // 获取页面
|
||||
// wx.POST("/getWxAuthUrl", front.GetWxAuthUrl) // 获取授权code
|
||||
// wx.GET("/getWxAuth", front.GetWxAuth) // 获取openId
|
||||
//}
|
||||
|
||||
router.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
package services
|
||||
|
||||
import (
|
||||
"PaymentCenter/app/constants/common"
|
||||
"PaymentCenter/app/http/entities/front"
|
||||
"PaymentCenter/app/models/paychannelmodel"
|
||||
"PaymentCenter/app/third/paymentService"
|
||||
"PaymentCenter/config"
|
||||
"encoding/json"
|
||||
"net/url"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// 获取授权链接
|
||||
func GetWxAuthUrl(param front.GetWxAuthUrlRequest) (targetUrl string, code int) {
|
||||
var (
|
||||
// 重定向地址
|
||||
redirectUri = config.GetConf().PayService.Host + common.FRONT_V1 + "/wx/getOpenId"
|
||||
)
|
||||
baseUrl := "https://open.weixin.qq.com/connect/oauth2/authorize"
|
||||
|
||||
// 获取支付渠道的配置
|
||||
id, err := strconv.Atoi(param.PayChannelId)
|
||||
if err != nil {
|
||||
code = handErr(err)
|
||||
return
|
||||
}
|
||||
payChannel := paychannelmodel.PayChannel{Id: int64(id)}
|
||||
code = PayChannelGet(&payChannel)
|
||||
if code != 200 {
|
||||
return
|
||||
}
|
||||
//// 配置解析
|
||||
//wxConfig := paymentService.WxPay{}
|
||||
//err = json.Unmarshal([]byte(payChannel.ExtJson), &wxConfig)
|
||||
//if err != nil {
|
||||
// code = handErr(err)
|
||||
// return
|
||||
//}
|
||||
|
||||
appid := payChannel.AppId
|
||||
redirectUri = url.QueryEscape(redirectUri)
|
||||
responseType := "code"
|
||||
scope := "snsapi_base"
|
||||
|
||||
targetUrl = baseUrl + "?appid=" + appid + "&redirect_uri=" + redirectUri + "&response_type=" + responseType + "&scope=" + scope + "#wechat_redirect"
|
||||
return
|
||||
}
|
||||
|
||||
// 通过code换取网页授权access_token
|
||||
func GetWxAuth(param front.GetWxAuthRequest) (code int) {
|
||||
|
||||
// 获取支付渠道的配置
|
||||
id, err := strconv.Atoi(param.PayChannelId)
|
||||
if err != nil {
|
||||
code = handErr(err)
|
||||
return
|
||||
}
|
||||
payChannel := paychannelmodel.PayChannel{Id: int64(id)}
|
||||
code = PayChannelGet(&payChannel)
|
||||
if code != 200 {
|
||||
return
|
||||
}
|
||||
|
||||
// 配置解析
|
||||
wxConfig := paymentService.WxPay{}
|
||||
err = json.Unmarshal([]byte(payChannel.ExtJson), &wxConfig)
|
||||
if err != nil {
|
||||
code = handErr(err)
|
||||
return
|
||||
}
|
||||
|
||||
//targetUrl := fmt.Sprintf("https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code",
|
||||
// payChannel.AppId,
|
||||
// wxConfig.SerialNo,
|
||||
// param.Code,
|
||||
//)
|
||||
|
||||
return
|
||||
}
|
|
@ -14,13 +14,14 @@ import (
|
|||
type PayOrderRequest struct {
|
||||
PayChannelId int64 `json:"pay_channel_id"` // 支付方式ID
|
||||
OrderId int64 `json:"order_id"` // 平台订单号
|
||||
ChannelType int `json:"channel_type"` // 支付方式
|
||||
ChannelType int `json:"channel_type"` // 支付渠道枚举,1微信JSAPI,2微信H5,3微信app,4微信Native,5微信小程序,6支付宝网页&移动应用,7支付宝小程序,8支付宝JSAPI
|
||||
Description string `json:"description"` // 商品描述
|
||||
Amount int `json:"amount"` // 金额单位为分
|
||||
PayerClientIp string `json:"payer_client_ip"` // 终端IP
|
||||
ReturnUrl string `json:"return_url"` // 支付成功后回调地址
|
||||
Wx WxPay `json:"wx"`
|
||||
Ali AliPay `json:"ali"`
|
||||
Wx WxPay `json:"wx"` // 微信支付参数
|
||||
Ali AliPay `json:"ali"` // 支付宝参数
|
||||
OpenId string `json:"open_id"` // 支付者信息。 openid
|
||||
}
|
||||
|
||||
type WxPay struct {
|
||||
|
@ -58,6 +59,10 @@ func PaymentService(c context.Context, payOrderRequest PayOrderRequest) PayOrder
|
|||
case payCommon.PAY_CHANNEL_ALIPAY_WEB:
|
||||
// 支付宝H5支付
|
||||
info, err = ALiH5PayInfo(c, payOrderRequest)
|
||||
case payCommon.PAY_CHANNEL_WECHAT_JSAPI:
|
||||
// 微信JSAPI支付
|
||||
info, err = WxJsApiPayInfo(c, payOrderRequest)
|
||||
|
||||
default:
|
||||
payOrderResponse = PayOrderResponse{
|
||||
Code: payCommon.PAY_NOT_FOUND_CODE,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -31,14 +31,14 @@ func InitClient(wxConfig WxPay) (*wechat.ClientV3, error) {
|
|||
wxConfig.ApiV3Key,
|
||||
wxConfig.PrivateKey,
|
||||
)
|
||||
if clientErr != nil {
|
||||
return nil, clientErr
|
||||
}
|
||||
// 启用自动同步返回验签,并定时更新微信平台API证书(开启自动验签时,无需单独设置微信平台API证书和序列号)
|
||||
clientErr = wxClient.AutoVerifySign()
|
||||
if wxClient == nil {
|
||||
return nil, errors.New("client not initialized")
|
||||
}
|
||||
if clientErr != nil {
|
||||
return nil, clientErr
|
||||
}
|
||||
|
||||
// 自定义配置http请求接收返回结果body大小,默认 10MB
|
||||
wxClient.SetBodySize(10) // 没有特殊需求,可忽略此配置
|
||||
|
@ -95,6 +95,49 @@ func WxH5PayInfo(c context.Context, payOrderRequest PayOrderRequest) (string, er
|
|||
return wxRsp.Response.H5Url, nil
|
||||
}
|
||||
|
||||
// 微信JSAPI支付
|
||||
func WxJsApiPayInfo(c context.Context, payOrderRequest PayOrderRequest) (string, error) {
|
||||
// 初始化微信客户端
|
||||
wxClient, err := InitClient(payOrderRequest.Wx)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
expire := time.Now().Add(10 * time.Minute).Format(time.RFC3339)
|
||||
// 初始化 BodyMap
|
||||
envConfig := config.GetConf()
|
||||
bm := make(gopay.BodyMap)
|
||||
bm.Set("appid", payOrderRequest.Wx.AppId).
|
||||
Set("mchid", payOrderRequest.Wx.MchId).
|
||||
Set("description", payOrderRequest.Description).
|
||||
Set("out_trade_no", strconv.FormatInt(payOrderRequest.OrderId, 10)).
|
||||
Set("time_expire", expire).
|
||||
Set("notify_url", fmt.Sprintf(envConfig.PayService.Host+payCommon.WX_NOTIFY_URL_TEST+"%d", payOrderRequest.PayChannelId)).
|
||||
SetBodyMap("amount", func(bm gopay.BodyMap) {
|
||||
bm.Set("total", payOrderRequest.Amount).
|
||||
Set("currency", "CNY")
|
||||
}).
|
||||
SetBodyMap("payer", func(bm gopay.BodyMap) {
|
||||
bm.Set("openid", payOrderRequest.OpenId)
|
||||
})
|
||||
|
||||
wxRsp, err := wxClient.V3TransactionJsapi(c, bm)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if wxRsp.Code != wechat.Success || wxRsp.Response.PrepayId == "" {
|
||||
//logger.Error(c, "WxJsApiPayInfo 发生错误", fmt.Sprintf("错误状态码:%d, 错误信息:%s", wxRsp.Code, wxRsp.Error))
|
||||
return "", errors.New(fmt.Sprintf("发起支付失败,失败状态码:%d, 失败原因:%s", wxRsp.Code, wxRsp.Error))
|
||||
}
|
||||
//if payOrderRequest.ReturnUrl != "" {
|
||||
// values := url.Values{}
|
||||
// values.Set("redirect_url", payOrderRequest.ReturnUrl)
|
||||
// encodedStr := values.Encode()
|
||||
// //wxRsp.Response.H5Url = wxRsp.Response.H5Url + "&" + encodedStr
|
||||
//}
|
||||
return wxRsp.Response.PrepayId, nil
|
||||
}
|
||||
|
||||
// WxPayCallBack 微信支付回调
|
||||
func WxPayCallBack(notifyReq *wechat.V3NotifyReq, wxConfig WxPay) error {
|
||||
// 初始化微信客户端
|
||||
|
|
|
@ -8,9 +8,12 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
PRI = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmjK6SPkrP03ssex5Dxn4KZeVm9rQoJMslru13GNgoGKJAq13xwUGl6lpGlhzM9IMzg0ldOO2a0SQPPjc0fLrDjIgHPfIT6H1hDGkZdPaF4D0OfiHGzlLwXq7FyyyGc2JXILsniMBXcCxNFhbW0jAaJyYrBJb3q84a5y5AtK3IC+eDV6Bj2J4HlQVGKgW9u2ic6Jxl23sacXY6iifi+KEuoXNCJrmYlgRWTaQovLmTCLkErkzxzG9DFRDWGoz25LthDPqcCSUmWEbJ+obwIGB4r2WCbFXvaeVBQORlyVRyNUvYMItjHBQIKinDWZ6y8KzA0YKOoxEfr0KfE8Uk4PQBAgMBAAECggEABTAX0PzelN4uyvTT0sMi/R0YRKPgepP40vtBsNvF10E7Lp4ClAupHpYFSrJq178xu1/2dVBXEGM9hw8GUQd7RCjuD3cFwcp/EKU+Zy6uQ38iZRTskEDa3bC+q3EXzuFXDxqOfIhai262UTlkATw0sjUwJRdkbMxoeWHkSNuH7UBVddxFL8Bq1DKaPzRCqQ8zlkMZHy8Xbf2b8rFoi1oPBoPjHyxCo33zcnSg5xntIoA5pkD6x4z5cAnU55aBoYUiRv7jmG+MVp1jpDvAmJLfUayVZNakgX1r74bMPsl9kpA7dVdgOlWrIkbJE1plVXXswBb8QKN0/Yx2vv/YASSi0QKBgQDa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22,9 @@ func TestRsaEncrypt(t *testing.T) {
|
|||
|
||||
func TestRsaDecrypt(t *testing.T) {
|
||||
data := "pPnAPy7v2SY9Fu0LFcQH8UBA6VQ2FCfSg3nRZdMXS7mWjBwlacKHuFnh9UhobL7mxnmMyZPP100bpjCg2kvcfOpOp3ci85p+OYWINt4Fh3qgEOTG5FUyziaagGLm882t/I36KsDTVvbMZvC5sg4gZ9JQ5yAR+nuJfr0IxI0se/iD5luV1rms1kZHggd30iXdZtbkbX7xJ4xtnIiJmZU7kL+Xmvv1rDdPLxbol65QfnM1me1IHkXJapqSBnhEEmFQyBx31vp1ccNjkza8ZWbvTPCngc1k4kvlm6lKfwsG4hMuSdXUzveDm+Oo8StAKnyVoerJ202n7Vfx1XhehineQT0TPD7bO0HCEsDXXYEWwvcax8VdzYvHk7qSbH6e154qCr4LgDRSHKwAAExinTrzxx2rtSimieBLaEpDL2v5ch45HnhjRhWTRmM61W1g6sdHaVX1mQxaXvrT4v+h+f4TbIV4r4qeGJ6rXG+yKRoYseLzyGgystoOny9P0UH15W8rWPytV2eioWT7i3Cglg04BWP9mst67LQXeFH4CA6CkwVV2w9nCHrzxX2ouYSQELUEkTlIMry2AlkZubUnupGJLmLLUyZj7pM/6cLjyAgm02/gRc4wwf7JBBq/ipmKXpkhHXWLtQDWJEZTT+ug2v9EXy5dgPNPe8ZI0MILAeipjIc="
|
||||
privateKeyPEM := `-----BEGIN RSA PRIVATE KEY-----
|
||||
data = "UaUJQUa2leqvgS5Brd0jjlMC4JFfQqavzk8VVSuHurBzC0l0Kz0EUY2nm8QRKB6ndCQZo4ktk/row+V1L/Zjn+3gBDhh4rNr0JNSvY/C+7AHpugvN+V8M0aEkFvZkaEaQiwjTExP8lz5w6Q/1O7Srb3KjnKs9wX97viyUbhUS4diGPCFnXLsWYnf6qSXvwNQwjgr3QykF45E2bN6VxsO/60OVZNN/yYgREe+IuuUyGvm+FlymnpMADGpDaViIOhqA77DNV4JkAsAv1Zjxtg+DFaeW9CcUOczw2yeQHXeEP/vzWfmcHXOZq17NKfSeiVotvLTUcT21UygD4oAUBPRmUTuqqa2095NCiNxxqFnRtHaWeY/dwp4ymNiHLFPh1HFwjVtvlazrEiLflsP0CI6zqn/bL8YhcV2VSSWx4g2YTTc3Xl56QeXa1PhdjSZg/apBRb/mEXTo1WNy/NQ5hVdNhtydB10WtA3YSr5vOEXSIbue4GJDYNNyMQTVBnfn3PTHl89/unlkFNI9AD60IfUCfhxOfg5Ddqa+8thTEBj4yOod/2dh6z2Dl7GZ7Ak0gWy1iFvFQm/6Y4p7dA44foAg9MwbV1wYbrdGauC5o7VRg0x6Sklzu/z5LeU4YUMruT0cd/Ov2kXkqiDyMn3GzdmIIWFadXISTbr7s1yU4uovn8="
|
||||
|
||||
privateKeyPEM := `-----BEGIN RSA PRIVATE KEY-----
|
||||
` + PRI + `
|
||||
-----END RSA PRIVATE KEY-----`
|
||||
res, err := Decrypt(privateKeyPEM, data)
|
||||
|
@ -27,7 +32,7 @@ func TestRsaDecrypt(t *testing.T) {
|
|||
}
|
||||
|
||||
func encrypt() string {
|
||||
data := "{\"pay_channel_id\":8935141660703064070,\"out_trade_no\":\"refundOutTreadNo001\",\"amount\":1,\"desc\":\"退款\",\"ext_json\":\"\",\"app_id\":5476377146882523138,\"timestamp\":53612533412643,\"refund_out_trade_no\":\"asdadasdas\"}"
|
||||
data := "{\"pay_channel_id\":1729382256910270476,\"out_trade_no\":\"zxp1234D56711tuikuan\",\"order_type\":1,\"amount\":1,\"desc\":\"测试支付宝退款商品zxp\",\"ext_json\":\"\",\"app_id\":8070450532247928844,\"timestamp\":1723096731}"
|
||||
pub := `-----BEGIN PUBLIC KEY-----
|
||||
` + PUB + `
|
||||
-----END PUBLIC KEY-----`
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package sm2
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
@ -38,7 +40,7 @@ func Test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pNRFU0WkdReE9XSmhZelV6TkRaak5XSmxNVE14Wm1Wa1ltRTJZVE0yWWpnelpXWTBNbVl4T1RabU5EWXpNMlk1WVdNeE4yVXpOalZpT0RabU1qQXhZbU0wTXpjM01qRmtZV1U1WVdJeE5ESTVPVE00TmpabVpXRXhNelV5Tm1aaE5EVmhaRGxrTTJWaU4yUm1aR1U0T0dRNVpUQXpabUl3TmpabE16TTFOekl4TnpsaFpETXhOV05oWmpNMk4yRmlOVEl5TlRRM1lUVTVNakJqWW1Nek1HRXpOR1l3T1RKa00ySmpPV0ZsTVRBeVkyVm1ZVEZqTkRRM01EaG1aV1UzTnpSallqWmpZVEZtWTJVMVpUYzJOMlE0WmpoaE1UTXlOMkU1WWpVek5tUTBORGcyTjJaaFlqazJaRGd5T0RBME9ETmtZVFZqTUdFMk1qUmhZV1ptWTJSa09UZGlOemN4WlRaaFltSmhNR0kzT0RNNFpETXdOV1UyWTJGbU5tVmtZak5pTURCbU4yVTJaakkxTkRWa1pqWTBPR05rTURBeE5XTmxOamt5TkRJNE1tTmlORE14T0dRM01USXpaREkxWW1ZeE1qRmxPRFU0TlRkall6RTJPVFJoWTJWak9EbGxPV0kyTlRVeFpUYzJOemsxTTJJMU56VTNNall4T1dGbU1EWTBabU0yTkdOaVkyUXhaVFZsTUdGa09EUTBNVFZqTkdVNE5tWXlaakpsT1dVM09Ea3pZVEZsTmpJMllqRmlaakl5T1dFeE9USXpNR0pqWVRjeU1ERmpOV1V4TXprME9UbGtOemN6TWpReVkySm1ORGMxTVdObFpHUTJOR05tTlRjPQ=="
|
||||
decrypt, err := SM2Decrypt(en, SELF_PUB, SELF_PRI)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -47,10 +49,28 @@ func TestSM2Decrypt(t *testing.T) {
|
|||
}
|
||||
|
||||
func encrypt() string {
|
||||
data := "{\"order_no\":5476377146882523228,\"order_type\":1,\"out_tread_no\":\"asdadasdas\",\"amount\":1,\"desc\":\"abc\",\"status\":2,\"create_time\":\"2024-08-08 14:47:35\"}"
|
||||
data := "{\"pay_channel_id\":1729382256910270476,\"out_trade_no\":\"zxp1234D56711tuikuan\",\"order_type\":1,\"amount\":1,\"desc\":\"测试支付宝退款商品zxp\",\"ext_json\":\"\",\"app_id\":1729382256910270475,\"timestamp\":1723096731}"
|
||||
|
||||
//data := "{\"refund_out_trade_no\":\"zxp1234D56711tuikuan\",\"pay_channel_id\":1729382256910270476,\"out_trade_no\":\"4123412341234\",\"order_type\":2,\"amount\":1,\"desc\":\"测试支付宝退款商品zxp\",\"ext_json\":\"\",\"app_id\":1729382256910270475,\"timestamp\":1723096731}"
|
||||
en, err := SM2Encrypt(data, SELF_PUB)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return en
|
||||
}
|
||||
|
||||
func TestSm2Decode(t *testing.T) {
|
||||
en := "TURRd1lUZGlZamt4T1RGbU9XWmhOR1pqTkRKa05HWmpORFkyTjJNd05qVmtNR1EwTTJNellUVmhPR1ZsTm1GbVpqZzFPRGMwTW1Oak5EQmtaRGszTkRrek5tRTVNREEwTkdFMFlXRXhaREl5T0RVME1ESmtObVk1TWpWaVpqYzNORGhoT1RObE0yVmtaVGc1T0dVellUZGlabU15WkRNNU1EQXpNR0ZsTm1Oa05XSTBPVEJpT1dFMU9XUTVObU15TURCaU9EVTNNR0UzWTJFNU9UYzVNalF3TnpFeVl6RTVZemd4TW1WbVpUQTNZbVV5WVRoaU1tRmtaak5tWkRjek1XVXdabVZrTlRnMVpUTXlNR0U0WldWaVlURXlNREExWWpnek1XRTBNVFk1WlRCa09ERXpaVGN6WWpJMFpEUmpOVFV5WlRRMU1HTmxNbVEwWlRkbU5tTTFaR1l5TUdZeU5XTXdNV1kwTVdFNU5EZGxaRFV3TnpjME9EWTFaVFJoWVRreU5HTm1ZVFU1WXpoa01USmxNREF3WTJOa01qRTVNell6T1RObFpXWXpNelEyTnpObU9HTTJaV00xTkdVd1ltRmhOVFZsWVRka09UQTFaRFZrTXpobVlqSTJabVEzWldFelptWmpNbU5tTldFd01tUmhOak5qTWpBeVl6azVaR0poT0RRMFpHTTJNbVJtTkdRM05Ea3dZems0TmprMk9UTmpNbVF3TnpFeE1qUmlaVFJpT1RrMk9UY3pNR0prTmpZNVpqYzFPRFJpWVRCbE5tTXdZV1JqTnpOak4yVmpaR1ExWmpJellUWmtaR1EwTVRCbE1qSTVZV1F5WW1GbFl6YzRPRGhsWXpjME5HTmlNekk0TnpRek1UZGhNak0xWVRWbFlUYzNNR1JsTVRZMU1tWmpOVEEzT1dVMllqSTNabUl5TVRNM09URmpPRFF4TXpsa09ETm1OelExWTJVNVlUTXlZams0TVRZd1pqUXdNV1k1TjJSbVpEazRZV1kxWXpZeE1USTRaREEzT0dRME5tVXlaQT09"
|
||||
|
||||
content, _ := base64.StdEncoding.DecodeString(en)
|
||||
|
||||
decrypt, err := SM2Decrypt(string(content), SELF_PUB, SELF_PRI)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
t.Log(decrypt)
|
||||
|
||||
tempMap := make(map[string]interface{})
|
||||
json.Unmarshal([]byte(decrypt), &tempMap)
|
||||
t.Log(tempMap)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>微信授权登录</title>
|
||||
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
</head>
|
||||
<body onload="getCode()">
|
||||
<button id="loginBtn">微信登录</button>
|
||||
<script>
|
||||
function getCode() {
|
||||
// 获取当前 URL 的查询参数
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
// 获取名为 "id" 的查询参数值
|
||||
const id = urlParams.get('id');
|
||||
|
||||
fetch('/pay/front/api/v1/wx/getWxAuthUrl', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
'pay_channel_id': id
|
||||
}),
|
||||
})
|
||||
.then(async response => {
|
||||
if (response.ok) {
|
||||
const data = await response.json()
|
||||
console.log(data)
|
||||
if (data.code === 200) {
|
||||
return data;
|
||||
} else {
|
||||
throw new Error('获取url失败');
|
||||
}
|
||||
} else {
|
||||
throw new Error('获取url失败');
|
||||
}
|
||||
})
|
||||
.then(data => {
|
||||
console.log('获取url:', data);
|
||||
console.log('获取url:', data.data);
|
||||
window.location.href = data.data; // 跳转
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取url失败:', error);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
17
go.mod
17
go.mod
|
@ -3,9 +3,7 @@ module PaymentCenter
|
|||
go 1.21
|
||||
|
||||
require (
|
||||
gitee.com/chengdu_blue_brothers/openapi-go-sdk v0.0.2
|
||||
github.com/BurntSushi/toml v0.4.1
|
||||
github.com/Shopify/sarama v1.19.0
|
||||
github.com/ZZMarquis/gm v1.3.2
|
||||
github.com/ahmetb/go-linq/v3 v3.2.0
|
||||
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
|
||||
|
@ -13,10 +11,12 @@ require (
|
|||
github.com/forgoer/openssl v1.6.0
|
||||
github.com/gin-gonic/gin v1.7.7
|
||||
github.com/go-pay/gopay v1.5.103
|
||||
github.com/go-pay/util v0.0.2
|
||||
github.com/go-playground/locales v0.14.0
|
||||
github.com/go-playground/universal-translator v0.18.0
|
||||
github.com/go-sql-driver/mysql v1.6.0
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0
|
||||
github.com/jinzhu/copier v0.4.0
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.2.5
|
||||
github.com/nats-io/nats.go v1.9.1
|
||||
github.com/openzipkin/zipkin-go v0.2.2
|
||||
|
@ -25,12 +25,12 @@ require (
|
|||
github.com/qit-team/snow-core v0.1.28
|
||||
github.com/qit-team/work v0.3.11
|
||||
github.com/robfig/cron v1.2.0
|
||||
github.com/spf13/cobra v1.2.1
|
||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271
|
||||
github.com/swaggo/gin-swagger v1.3.3
|
||||
github.com/swaggo/swag v1.7.9
|
||||
github.com/tjfoc/gmsm v1.4.1
|
||||
github.com/valyala/fasthttp v1.31.0
|
||||
github.com/wechatpay-apiv3/wechatpay-go v0.2.20
|
||||
google.golang.org/grpc v1.56.3
|
||||
google.golang.org/protobuf v1.30.0
|
||||
gopkg.in/go-playground/validator.v9 v9.31.0
|
||||
|
@ -55,13 +55,8 @@ require (
|
|||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
||||
github.com/chenzhuoyu/iasm v0.9.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/eapache/go-resiliency v1.1.0 // indirect
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
|
||||
github.com/eapache/queue v1.1.0 // indirect
|
||||
github.com/emirpasic/gods v1.12.0 // indirect
|
||||
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 // indirect
|
||||
github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.19.6 // indirect
|
||||
|
@ -69,7 +64,6 @@ require (
|
|||
github.com/go-openapi/swag v0.19.15 // indirect
|
||||
github.com/go-pay/crypto v0.0.1 // indirect
|
||||
github.com/go-pay/errgroup v0.0.2 // indirect
|
||||
github.com/go-pay/util v0.0.2 // indirect
|
||||
github.com/go-pay/xlog v0.0.3 // indirect
|
||||
github.com/go-pay/xtime v0.0.2 // indirect
|
||||
github.com/go-playground/validator/v10 v10.9.0 // indirect
|
||||
|
@ -81,8 +75,6 @@ require (
|
|||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/hetiansu5/accesslog v1.0.0 // indirect
|
||||
github.com/hetiansu5/cores v1.0.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/jinzhu/copier v0.4.0 // indirect
|
||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
|
@ -99,14 +91,11 @@ require (
|
|||
github.com/nats-io/jwt v0.3.2 // indirect
|
||||
github.com/nats-io/nkeys v0.1.3 // indirect
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
|
||||
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/syndtr/goleveldb v1.0.0 // indirect
|
||||
github.com/tidwall/gjson v1.12.1 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
|
|
17
go.sum
17
go.sum
|
@ -39,8 +39,6 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
|
|||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
|
||||
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU=
|
||||
gitee.com/chengdu_blue_brothers/openapi-go-sdk v0.0.2 h1:f4Rj4jVshXYX7wl7aIrd7W9DbGfqxYrZ/c7ppoVL4a4=
|
||||
gitee.com/chengdu_blue_brothers/openapi-go-sdk v0.0.2/go.mod h1:OEBHFTBQOvsJGzLyMZS8K98F8aZHWg+O8Stycuh94Dk=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
|
||||
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
|
@ -53,14 +51,14 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN
|
|||
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
|
||||
github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s=
|
||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc=
|
||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
|
||||
github.com/ZZMarquis/gm v1.3.2 h1:lFtpzg5zeeVMZ/gKi0gtYcKLBEo9XTqsZDHDz6s3Gow=
|
||||
github.com/ZZMarquis/gm v1.3.2/go.mod h1:wWbjZYgruQVd7Bb8UkSN8ujU931kx2XUW6nZLCiDE0Q=
|
||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
|
||||
github.com/agiledragon/gomonkey v2.0.2+incompatible h1:eXKi9/piiC3cjJD1658mEE2o3NjkJ5vDLgYjCQu0Xlw=
|
||||
github.com/agiledragon/gomonkey v2.0.2+incompatible/go.mod h1:2NGfXu1a80LLr2cmWXGBDaHEjb1idR6+FVlX5T3D9hw=
|
||||
github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs=
|
||||
github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
|
||||
github.com/ahmetb/go-linq/v3 v3.2.0 h1:BEuMfp+b59io8g5wYzNoFe9pWPalRklhlhbiU3hYZDE=
|
||||
|
@ -161,11 +159,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
|
|||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU=
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
|
||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
|
||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
|
||||
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
|
||||
|
@ -188,7 +183,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
|
|||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
|
||||
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
|
||||
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 h1:6VSn3hB5U5GeA6kQw4TwWIWbOhtvR2hmbBJnTOtqTWc=
|
||||
github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6/go.mod h1:YxOVT5+yHzKvwhsiSIWmbAYM3Dr9AEEbER2dVayfBkg=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/gin-contrib/gzip v0.0.3 h1:etUaeesHhEORpZMp18zoOhepboiWnFtXrBZxszWUn4k=
|
||||
|
@ -393,7 +387,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO
|
|||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
|
||||
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
|
||||
|
@ -609,7 +602,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP
|
|||
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
|
@ -655,7 +647,6 @@ github.com/qit-team/snow-core v0.1.28 h1:RrX7i6GLbcMMSVzAT1lXgS/S3M2b1OrAnsoPaRG
|
|||
github.com/qit-team/snow-core v0.1.28/go.mod h1:J9CNj6P2IRh72yVa7rut4T8ikq/4DjaisLqXZy40TNg=
|
||||
github.com/qit-team/work v0.3.11 h1:AAtLTCOJ01WMFcvviK9rDGhHzaHE3bvunMOnSZ/80k8=
|
||||
github.com/qit-team/work v0.3.11/go.mod h1:h5m1cZjn+BznChuAyMiR/+IUyWEmaMylPKRhq/AlxKw=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
|
||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=
|
||||
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
|
||||
|
@ -703,11 +694,9 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ
|
|||
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
|
||||
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
|
||||
github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
|
||||
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
|
||||
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
|
||||
|
@ -769,6 +758,8 @@ github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPU
|
|||
github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
|
||||
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
|
||||
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
|
||||
github.com/wechatpay-apiv3/wechatpay-go v0.2.20 h1:gS8oFn1bHGnyapR2Zb4aqTV6l4kJWgbtqjCq6k1L9DQ=
|
||||
github.com/wechatpay-apiv3/wechatpay-go v0.2.20/go.mod h1:A254AUBVB6R+EqQFo3yTgeh7HtyqRRtN2w9hQSOrd4Q=
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
|
|
Loading…
Reference in New Issue