From a461fdb31a61142b4783f75230a4a00db1d86b79 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Fri, 6 Oct 2023 12:22:57 +0800 Subject: [PATCH] update --- app/customer/hdl/hdl_pay.go | 57 +++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/app/customer/hdl/hdl_pay.go b/app/customer/hdl/hdl_pay.go index 73af10f..5286b49 100644 --- a/app/customer/hdl/hdl_pay.go +++ b/app/customer/hdl/hdl_pay.go @@ -50,34 +50,35 @@ func OrdState(c *gin.Context) { e.OutErr(c, e.ERR_NO_DATA, "未查询到对应订单记录") return } - if ord.State == enum.CentralKitchenForSchoolPackageOrdStateForWait { - //处于待支付状态,请求支付宝同步订单状态 - sysCfgDb := db.SysCfgDb{} - sysCfgDb.Set() - sysCfg := sysCfgDb.SysCfgFindWithDb(enum.JsapiPayAppAutToken, enum.OpenAlipayAppid, enum.OpenAlipayAppPrivateKey, enum.OpenAlipayPublicKey) - err2, result := svc.CurlAlipayTradeQuery(md.CurlAlipayTradeQueryReq{ - Config: struct { - PayAliAppId string `json:"pay_ali_app_id" label:"支付宝开放平台-第三方应用-appid"` - PayAliPrivateKey string `json:"pay_ali_private_key" label:"支付宝开放平台-第三方应用-接口加签-应用私钥"` - PayAliPublicKey string `json:"pay_ali_public_key" label:"支付宝开放平台-第三方应用-接口加签-支付宝公钥"` - }{ - PayAliAppId: sysCfg[enum.OpenAlipayAppid], - PayAliPrivateKey: sysCfg[enum.OpenAlipayAppPrivateKey], - PayAliPublicKey: sysCfg[enum.OpenAlipayPublicKey], - }, - OutTradeNo: outTradeNo, - AppAuthToken: sysCfg[enum.JsapiPayAppAutToken], - }) - if err2 != nil { - e.OutErr(c, e.ERR, err2.Error()) - return - } - ord.State, err2 = svc.DealCentralKitchenForSchoolOrderCallBack(outTradeNo, result.TradeStatus) - if err != nil { - e.OutErr(c, e.ERR, err2.Error()) - return - } - } + + //if ord.State == enum.CentralKitchenForSchoolPackageOrdStateForWait { + // //处于待支付状态,请求支付宝同步订单状态 + // sysCfgDb := db.SysCfgDb{} + // sysCfgDb.Set() + // sysCfg := sysCfgDb.SysCfgFindWithDb(enum.JsapiPayAppAutToken, enum.OpenAlipayAppid, enum.OpenAlipayAppPrivateKey, enum.OpenAlipayPublicKey) + // err2, result := svc.CurlAlipayTradeQuery(md.CurlAlipayTradeQueryReq{ + // Config: struct { + // PayAliAppId string `json:"pay_ali_app_id" label:"支付宝开放平台-第三方应用-appid"` + // PayAliPrivateKey string `json:"pay_ali_private_key" label:"支付宝开放平台-第三方应用-接口加签-应用私钥"` + // PayAliPublicKey string `json:"pay_ali_public_key" label:"支付宝开放平台-第三方应用-接口加签-支付宝公钥"` + // }{ + // PayAliAppId: sysCfg[enum.OpenAlipayAppid], + // PayAliPrivateKey: sysCfg[enum.OpenAlipayAppPrivateKey], + // PayAliPublicKey: sysCfg[enum.OpenAlipayPublicKey], + // }, + // OutTradeNo: outTradeNo, + // AppAuthToken: sysCfg[enum.JsapiPayAppAutToken], + // }) + // if err2 != nil { + // e.OutErr(c, e.ERR, err2.Error()) + // return + // } + // ord.State, err2 = svc.DealCentralKitchenForSchoolOrderCallBack(outTradeNo, result.TradeStatus) + // if err != nil { + // e.OutErr(c, e.ERR, err2.Error()) + // return + // } + //} e.OutSuc(c, map[string]interface{}{ "sate": ord.State,