fix
This commit is contained in:
parent
15e8c2b6c6
commit
9916c644de
|
@ -4,16 +4,17 @@ import (
|
|||
"github.com/gin-gonic/gin"
|
||||
vasproto "service/api/proto/vas/proto"
|
||||
"service/app/mix/service"
|
||||
"service/bizcommon/util"
|
||||
"service/library/logger"
|
||||
"service/library/payclients/alipaycli"
|
||||
)
|
||||
|
||||
func AlipayCallback(ctx *gin.Context) {
|
||||
req, _ := ctx.GetRawData()
|
||||
logger.Info("_AlipayCallback req: %v", string(req))
|
||||
//req, _ := ctx.GetRawData()
|
||||
//logger.Info("_AlipayCallback req: %v", string(req))
|
||||
bm, err := alipaycli.GetDefaultAlipayClient().ParseNotify(ctx.Request)
|
||||
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
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ func (c *AlipayClient) ParseNotify(req *http.Request) (notify gopay.BodyMap, err
|
|||
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 {
|
||||
logger.Error("VerifySign fail, bm: %v, err: %v", util.ToJson(notifyTmp), err)
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue