订单增加字段
This commit is contained in:
parent
b447a78441
commit
5ee88c0261
|
@ -172,14 +172,14 @@ func OrderRefundService(userId int, orderId int) (code int) {
|
|||
|
||||
func OrderNotify(request front.YouChuRequest) (NotifyResponse front.YouChuOrderNotifyResponse) {
|
||||
requestStr, _ := json.Marshal(request)
|
||||
utils.Log(nil, "OrderNotify", string(requestStr))
|
||||
utils.Log(nil, "订单回调请求--原始数据:", string(requestStr))
|
||||
response := youchu.DecryptResponse(string(requestStr), false)
|
||||
utils.Log(nil, "订单回调请求--解密数据:", response)
|
||||
var YouChuOrderNotifyRequest front.YouChuOrderNotifyRequest
|
||||
err := json.Unmarshal([]byte(response), &YouChuOrderNotifyRequest)
|
||||
if err != nil {
|
||||
return front.YouChuOrderNotifyResponse{RespCode: "000001", RespMsg: "解析失败"}
|
||||
}
|
||||
utils.Log(nil, "YouChuOrderNotifyRequest", YouChuOrderNotifyRequest)
|
||||
// 03-支付成功 04-支付失败 05-检查失败
|
||||
if YouChuOrderNotifyRequest.OrderSta != "03" {
|
||||
return front.YouChuOrderNotifyResponse{RespCode: "000002", RespMsg: "交易失败"}
|
||||
|
|
Loading…
Reference in New Issue