通联宝支付测试

This commit is contained in:
苏尹岚
2020-02-27 14:00:33 +08:00
parent fdc91c20e4
commit cc5e35caa6

View File

@@ -170,17 +170,17 @@ func refundOrderByTL(ctx *jxcontext.Context, orderPay *model.OrderPay, refundID
RefundFee: orderPay.TotalFee, RefundFee: orderPay.TotalFee,
RefundCreatedAt: time.Now(), RefundCreatedAt: time.Now(),
} }
} db := dao.GetDB()
db := dao.GetDB() if result.TrxStatus == tonglianpayapi.TrxStatusSuccess {
if result.TrxStatus == tonglianpayapi.TrxStatusSuccess { orderPayRefund.Status = model.RefundStatusYes
orderPayRefund.Status = model.RefundStatusYes } else {
} else { orderPayRefund.Status = model.RefundStatusFailed
orderPayRefund.Status = model.RefundStatusFailed }
} orderPayRefund.OriginalData = utils.Format4Output(result, true)
orderPayRefund.OriginalData = utils.Format4Output(result, true) dao.CreateEntity(db, orderPayRefund)
dao.CreateEntity(db, orderPayRefund)
orderPay.Status = model.PayStatusRefund orderPay.Status = model.PayStatusRefund
dao.UpdateEntity(db, orderPay) dao.UpdateEntity(db, orderPay)
}
return orderPayRefund, err return orderPayRefund, err
} }