提现城市分成比例
This commit is contained in:
@@ -21,8 +21,6 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
CashPercentage = 90
|
||||
|
||||
sigKey = "sign"
|
||||
sigTypeMd5 = "MD5"
|
||||
sigTypeSha256 = "HMAC-SHA256"
|
||||
@@ -132,11 +130,15 @@ func (p *PayHandler) CreateRefund() (err error) {
|
||||
Desc: "冲天猴儿app提现到账",
|
||||
SpbillCreateIP: p.Ctx.GetRealRemoteIP(),
|
||||
}
|
||||
//1元以下免费,以上收取10%手续费
|
||||
//1元以下免费,以上收取对应城市手续费
|
||||
place, err := dao.GetPlaceByCode(dao.GetDB(), p.Order.CityCode)
|
||||
if err != nil || place == nil {
|
||||
return fmt.Errorf("未找到该城市!code:%v", p.Order.CityCode)
|
||||
}
|
||||
if p.Order.PayPrice < 100 {
|
||||
param.Amount = p.Order.PayPrice
|
||||
} else {
|
||||
param.Amount = p.Order.PayPrice * CashPercentage / 100 //手续费10%
|
||||
param.Amount = p.Order.PayPrice * place.DividePercentage / 100 //手续费10%
|
||||
}
|
||||
if authInfo, err := p.Ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeWxApp {
|
||||
param.OpenID = authInfo.GetAuthID()
|
||||
|
||||
Reference in New Issue
Block a user