修改支付状态
This commit is contained in:
parent
79948994ec
commit
a39d583c6b
@ -56,6 +56,8 @@ type WxPayRefundResult struct {
|
||||
|
||||
// HandlePayStatus 处理支付状态
|
||||
func HandlePayStatus(t *payments.Transaction) (w *WxPayResult, err error) {
|
||||
w = &WxPayResult{}
|
||||
|
||||
switch *t.TradeState {
|
||||
case "SUCCESS": // 支付成功
|
||||
w.OrderStatus = 2
|
||||
@ -78,6 +80,8 @@ func HandlePayStatus(t *payments.Transaction) (w *WxPayResult, err error) {
|
||||
|
||||
// HandlePayRefundStatus 处理退款状态
|
||||
func HandlePayRefundStatus(r *refunddomestic.Refund) (w *WxPayRefundResult, err error) {
|
||||
w = &WxPayRefundResult{}
|
||||
|
||||
switch *r.Status {
|
||||
case "SUCCESS": // 退款成功
|
||||
w.RefundStatus = 3
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user