|
|
@@ -107,7 +107,7 @@ func GetAmtInByPaid(accountId int, exchticket string, channelMode string) (rsp *
|
|
|
var has bool
|
|
|
|
|
|
// 尝试 ChillPay
|
|
|
- if channelMode == "ChillPay" || channelMode == "" {
|
|
|
+ if channelMode == "chillpay" || channelMode == "" {
|
|
|
var rec Chillpayamtinrec
|
|
|
has, err = engine.Where("accountid = ? and exch_seq = ? and deal_status = 2", accountId, exchticket).Get(&rec)
|
|
|
if err != nil {
|
|
|
@@ -115,7 +115,7 @@ func GetAmtInByPaid(accountId int, exchticket string, channelMode string) (rsp *
|
|
|
}
|
|
|
if has {
|
|
|
rsp = &GetAmtInByPaidUrlRsp{
|
|
|
- ChannelMode: "ChillPay",
|
|
|
+ ChannelMode: "chillpay",
|
|
|
URL: rec.PAYMENTURL,
|
|
|
}
|
|
|
return
|
|
|
@@ -123,7 +123,7 @@ func GetAmtInByPaid(accountId int, exchticket string, channelMode string) (rsp *
|
|
|
}
|
|
|
|
|
|
// 尝试 PayerMax
|
|
|
- if channelMode == "PayerMax" || channelMode == "" {
|
|
|
+ if channelMode == "payermax" || channelMode == "" {
|
|
|
var rec Payermaxamtinrec
|
|
|
has, err = engine.Where("accountid = ? and exch_seq = ? and deal_status = 2", accountId, exchticket).Get(&rec)
|
|
|
if err != nil {
|
|
|
@@ -131,7 +131,7 @@ func GetAmtInByPaid(accountId int, exchticket string, channelMode string) (rsp *
|
|
|
}
|
|
|
if has {
|
|
|
rsp = &GetAmtInByPaidUrlRsp{
|
|
|
- ChannelMode: "PayerMax",
|
|
|
+ ChannelMode: "payermax",
|
|
|
URL: rec.REDIRECTURL,
|
|
|
}
|
|
|
return
|
|
|
@@ -139,7 +139,7 @@ func GetAmtInByPaid(accountId int, exchticket string, channelMode string) (rsp *
|
|
|
}
|
|
|
|
|
|
// 尝试 Asia Pay
|
|
|
- if channelMode == "AsiaPay" || channelMode == "" {
|
|
|
+ if channelMode == "asiapay" || channelMode == "" {
|
|
|
var rec Asiapayamtinrec
|
|
|
has, err = engine.Where("accountid = ? and exch_seq = ? and deal_status = 2", accountId, exchticket).Get(&rec)
|
|
|
if err != nil {
|
|
|
@@ -147,7 +147,7 @@ func GetAmtInByPaid(accountId int, exchticket string, channelMode string) (rsp *
|
|
|
}
|
|
|
if has {
|
|
|
rsp = &GetAmtInByPaidUrlRsp{
|
|
|
- ChannelMode: "AsiaPay",
|
|
|
+ ChannelMode: "asiapay",
|
|
|
URL: rec.REDIRECTURL,
|
|
|
Params: rec.REDIRECTPARAMS,
|
|
|
}
|
|
|
@@ -155,6 +155,22 @@ func GetAmtInByPaid(accountId int, exchticket string, channelMode string) (rsp *
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // 尝试混合支付
|
|
|
+ if channelMode == "hybrid" || channelMode == "" {
|
|
|
+ var rec Hybridamtrec
|
|
|
+ has, err = engine.Where("TRADE_ACCT = ? and exch_seq = ? and deal_status = 2", accountId, exchticket).Get(&rec)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if has {
|
|
|
+ rsp = &GetAmtInByPaidUrlRsp{
|
|
|
+ ChannelMode: "hybrid",
|
|
|
+ URL: rec.PAYMENT_URL,
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return
|
|
|
}
|
|
|
|