|
|
@@ -152,7 +152,29 @@ func Demo(c *gin.Context) { |
|
|
|
sysCfgDb := db.SysCfgDb{} |
|
|
|
sysCfgDb.Set() |
|
|
|
sysCfg := sysCfgDb.SysCfgFindWithDb(enum.OpenAppletAppid, enum.OpenAppletAppPrivateKey, enum.OpenAppletPublicKey) |
|
|
|
err, info := svc.CurlEducateSceneTokenQueryV2(md.CurlEducateSceneTokenReq{ |
|
|
|
|
|
|
|
err, info := svc.CurlEducateFacepayApply(md.CurlEducateFacepayApplyReq{ |
|
|
|
Config: struct { |
|
|
|
AliAppId string `json:"ali_app_id" label:"支付宝开放平台-小程序-appid"` |
|
|
|
AliPrivateKey string `json:"ali_private_key" label:"支付宝开放平台-小程序-应用私钥"` |
|
|
|
AliPublicKey string `json:"ali_public_key" label:"支付宝开放平台-小程序-支付宝公钥"` |
|
|
|
}{ |
|
|
|
AliAppId: sysCfg[enum.OpenAppletAppid], |
|
|
|
AliPrivateKey: sysCfg[enum.OpenAppletAppPrivateKey], |
|
|
|
AliPublicKey: sysCfg[enum.OpenAppletPublicKey], |
|
|
|
}, |
|
|
|
FaceUid: "2088930289907324", |
|
|
|
FaceOpenId: "", |
|
|
|
SchoolStdCode: "3144003844", |
|
|
|
}) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR, err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
e.OutSuc(c, info, nil) |
|
|
|
return |
|
|
|
|
|
|
|
err, info = svc.CurlEducateSceneTokenQueryV2(md.CurlEducateSceneTokenReq{ |
|
|
|
Config: struct { |
|
|
|
AliAppId string `json:"ali_app_id" label:"支付宝开放平台-小程序-appid"` |
|
|
|
AliPrivateKey string `json:"ali_private_key" label:"支付宝开放平台-小程序-应用私钥"` |
|
|
|