fix
This commit is contained in:
parent
15e8c2b6c6
commit
9916c644de
|
@ -4,16 +4,17 @@ import (
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
vasproto "service/api/proto/vas/proto"
|
vasproto "service/api/proto/vas/proto"
|
||||||
"service/app/mix/service"
|
"service/app/mix/service"
|
||||||
|
"service/bizcommon/util"
|
||||||
"service/library/logger"
|
"service/library/logger"
|
||||||
"service/library/payclients/alipaycli"
|
"service/library/payclients/alipaycli"
|
||||||
)
|
)
|
||||||
|
|
||||||
func AlipayCallback(ctx *gin.Context) {
|
func AlipayCallback(ctx *gin.Context) {
|
||||||
req, _ := ctx.GetRawData()
|
//req, _ := ctx.GetRawData()
|
||||||
logger.Info("_AlipayCallback req: %v", string(req))
|
//logger.Info("_AlipayCallback req: %v", string(req))
|
||||||
bm, err := alipaycli.GetDefaultAlipayClient().ParseNotify(ctx.Request)
|
bm, err := alipaycli.GetDefaultAlipayClient().ParseNotify(ctx.Request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("ParseNotify fail, req: %v, err: %v", string(req), err)
|
logger.Error("ParseNotify fail, req: %v, err: %v", util.ToJson(bm), err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ func (c *AlipayClient) ParseNotify(req *http.Request) (notify gopay.BodyMap, err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 验签
|
// 验签
|
||||||
ok, err := alipay.VerifySign("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAngPAA49Gqy81CuQd0eW6mzpF5vEwXtHSOl6Xn8Zx3jcpLBBYULlkxbUAOedJRo/1TMjUAtEfoC+lSv+UnYKJ88TMfGwvv9ZSFq5d0PBfiS7AFHDYegvlsw8O5uWEqxvd+tX9/ov4D1QuBkU88fdai3ZNckhmb/xqUlb+PZParQ/N4EQm8SauRWNUAPN1m+cZCaDMJfkpSrxSzcSCMz0IfQ7wxft9hU7FUIJt7F9ZbAK0wOMqe2OEhtwPJpDmp4nWF9SolGsDAVmg4GYtQjKUPmW298NAtLcQnmfHpOSXlMNhGBydGsDJxROvrzw5tSzSdA6HZL7Mxm5i710EtnjH1QIDAQAB", notifyTmp)
|
ok, err := alipay.VerifySign("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl9Pj5j6cNRdaDyWTWWFkcBViDqw/py1bDrqe7VykND1JywgLsFogeKGG0YhJfTfEeExAlGlP2DUV7z0uc8QhCMF7N+qdfXNb/RemFIpSs71i9kkaFIJEl20JnWipps96LwZLDpNRck3Nho/Xnbs4wuft3sQtd7T0sB2zEYyl7OyuTqehcoz3uAQp0JOYBosVPpgofaD6BN2RSZQ33QvqS37w3xHLif8P7hfYXdeIe+JxeHmchzQK22dRzJinYfU+pKE5J2Wm+dq1l3/ls4w8Xc3RyqvvW2UMx2lOMtSg2WWXDDi1skmHn/l1BbBP/uogNq4Avf50eoZ1UE6JxPrZpQIDAQAB", notifyTmp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Error("VerifySign fail, bm: %v, err: %v", util.ToJson(notifyTmp), err)
|
logger.Error("VerifySign fail, bm: %v, err: %v", util.ToJson(notifyTmp), err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue