DengBiao 9 månader sedan
förälder
incheckning
33cb7cd1be
2 ändrade filer med 27 tillägg och 5 borttagningar
  1. +23
    -1
      app/customer/hdl/hdl_demo.go
  2. +4
    -4
      app/customer/svc/svc_curl_smart_pay.go

+ 23
- 1
app/customer/hdl/hdl_demo.go Visa fil

@@ -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:"支付宝开放平台-小程序-应用私钥"`


+ 4
- 4
app/customer/svc/svc_curl_smart_pay.go Visa fil

@@ -680,9 +680,6 @@ func CurlEducateSceneTokenCreateForConcentratedCollectApplet(args md.CurlEducate
}

func CurlEducateFacepayApply(args md.CurlEducateFacepayApplyReq) (err error, resp interface{}) {
utils.FilePutContents("CurlEducateFacepayApply", utils.SerializeStr(map[string]interface{}{
"args": args,
}))

//1、TODO::alipay.commerce.educate.facepay.apply(人脸开通支付申请)
url := cfg.SmartCanteenPay + "/alipay/faceScanPay/educateFacepayApply"
@@ -704,11 +701,14 @@ func CurlEducateFacepayApply(args md.CurlEducateFacepayApplyReq) (err error, res
Msg string `json:"msg"`
Data interface{} `json:"data"`
}
utils.FilePutContents("CurlEducateFacepayApply", utils.SerializeStr(result))
err = json.Unmarshal(bytes, &result)
if err != nil {
return
}
utils.FilePutContents("CurlEducateFacepayApply", utils.SerializeStr(map[string]interface{}{
"args": args,
"result": result,
}))
if result.Code != 0 {
if result.Msg != "" {
err = errors.New(result.Msg)


Laddar…
Avbryt
Spara