|
@@ -307,7 +307,7 @@ func getPayPrepayId(openid, outTradeNo string, totalPrice int64, body, notifyUrl
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 订单退款接口
|
|
// 订单退款接口
|
|
|
-func GetRefundDataPay(outTradeNo, outRefundNo string, totalPrice int64, transactionId, remark, payCode string) (ret map[string]string) {
|
|
|
|
|
|
|
+func GetRefundDataPay(outTradeNo, outRefundNo string, refundFee, totalPrice int64, transactionId, remark, payCode string) (ret map[string]string) {
|
|
|
outTradeNo = fmt.Sprintf("%s_%d", outTradeNo, time.Now().Unix())
|
|
outTradeNo = fmt.Sprintf("%s_%d", outTradeNo, time.Now().Unix())
|
|
|
appId := beego.AppConfig.String("WxFohowXcxAppId") //获取小程序渠道appId
|
|
appId := beego.AppConfig.String("WxFohowXcxAppId") //获取小程序渠道appId
|
|
|
mechantInfo := GetMechantInfo(payCode) //商户号配置信息
|
|
mechantInfo := GetMechantInfo(payCode) //商户号配置信息
|
|
@@ -324,7 +324,7 @@ func GetRefundDataPay(outTradeNo, outRefundNo string, totalPrice int64, transact
|
|
|
//"out_trade_no": outTradeNo,
|
|
//"out_trade_no": outTradeNo,
|
|
|
"out_refund_no": outRefundNo,
|
|
"out_refund_no": outRefundNo,
|
|
|
"total_fee": fmt.Sprintf("%d", totalPrice), //分为单位,订单总金额
|
|
"total_fee": fmt.Sprintf("%d", totalPrice), //分为单位,订单总金额
|
|
|
- "refund_fee": fmt.Sprintf("%d", totalPrice), //分为单位,退款总金额
|
|
|
|
|
|
|
+ "refund_fee": fmt.Sprintf("%d", refundFee), //分为单位,退款总金额
|
|
|
//"notify_url": notifyUrl,
|
|
//"notify_url": notifyUrl,
|
|
|
"refund_desc": remark,
|
|
"refund_desc": remark,
|
|
|
}
|
|
}
|
|
@@ -337,6 +337,7 @@ func GetRefundDataPay(outTradeNo, outRefundNo string, totalPrice int64, transact
|
|
|
//fmt.Println(err)
|
|
//fmt.Println(err)
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|
|
|
|
|
+ beego.BeeLogger.Warn("refund result----%v", ret)
|
|
|
return ret
|
|
return ret
|
|
|
}
|
|
}
|
|
|
|
|
|