@@ -26,6 +26,7 @@ type CurlAlipayTradeCreateReq struct { | |||||
OutTradeNo string `json:"out_trade_no" binding:"required" label:"商户订单号"` | OutTradeNo string `json:"out_trade_no" binding:"required" label:"商户订单号"` | ||||
Subject string `json:"subject" binding:"required" label:"订单标题"` | Subject string `json:"subject" binding:"required" label:"订单标题"` | ||||
AppAuthToken string `json:"app_auth_token" binding:"required" label:"应用授权token"` | AppAuthToken string `json:"app_auth_token" binding:"required" label:"应用授权token"` | ||||
NotifyUrl string `json:"notify_url" label:"异步通知地址"` | |||||
} | } | ||||
type CurlAlipayTradeCreateResp struct { | type CurlAlipayTradeCreateResp struct { | ||||
@@ -89,6 +89,7 @@ func BuyPackage(c *gin.Context, req md.BuyPackageReq) (outTradeNo, tradeNo, tota | |||||
OutTradeNo: outTradeNo, | OutTradeNo: outTradeNo, | ||||
Subject: "购买食堂套餐", | Subject: "购买食堂套餐", | ||||
AppAuthToken: sysCfg[enum2.JsapiPayAppAutToken], | AppAuthToken: sysCfg[enum2.JsapiPayAppAutToken], | ||||
NotifyUrl: sysCfg[enum2.JsapiPayNotifyUrl], | |||||
}) | }) | ||||
if err != nil { | if err != nil { | ||||
return | return | ||||
@@ -30,6 +30,7 @@ const ( | |||||
NursingHomeReserveMealTime = "nursing_home_reserve_meal_time" | NursingHomeReserveMealTime = "nursing_home_reserve_meal_time" | ||||
NursingHomeCancelMealTime = "nursing_home_cancel_meal_time" | NursingHomeCancelMealTime = "nursing_home_cancel_meal_time" | ||||
JsapiPayAppAutToken = "jsapi_pay_app_auth_token" | JsapiPayAppAutToken = "jsapi_pay_app_auth_token" | ||||
JsapiPayNotifyUrl = "jsapi_pay_notify_url" | |||||
) | ) | ||||
func (gt SysCfg) String() string { | func (gt SysCfg) String() string { | ||||
@@ -84,6 +85,8 @@ func (gt SysCfg) String() string { | |||||
return "养老院取消用餐时间" | return "养老院取消用餐时间" | ||||
case JsapiPayAppAutToken: | case JsapiPayAppAutToken: | ||||
return "支付宝开放平台-jsapi支付-app_auth_token" | return "支付宝开放平台-jsapi支付-app_auth_token" | ||||
case JsapiPayNotifyUrl: | |||||
return "支付宝开放平台-jsapi支付-异步通知" | |||||
default: | default: | ||||
return "未知" | return "未知" | ||||
} | } | ||||