diff --git a/go.mod b/go.mod index 6abc1a2..ce0841b 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git go 1.15 require ( - code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git v1.0.7 + code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git v1.0.8 github.com/go-sql-driver/mysql v1.6.0 github.com/iGoogle-ink/gopay v1.5.36 xorm.io/builder v0.3.10 // indirect diff --git a/pay/pay_by_own.go b/pay/pay_by_own.go index 7ae1ece..aa8b3ef 100644 --- a/pay/pay_by_own.go +++ b/pay/pay_by_own.go @@ -6,12 +6,10 @@ import ( zhios_tool_e "code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git/e" zhios_tool_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git/utils" "fmt" - "xorm.io/xorm" ) //自有支付 支付宝 -func Alipay(eg *xorm.Engine, args map[string]string) (string, error) { - args = OwnCustomAlipayConfig(eg, args) +func Alipay(args map[string]string) (string, error) { var paySet = &md.PayData{ PayAppCertSn: args["pay_app_cert_sn"], @@ -42,5 +40,4 @@ func Alipay(eg *xorm.Engine, args map[string]string) (string, error) { return "", zhios_tool_e.NewErr(400, "支付宝订单创建失败") } return zhios_tool_utils.AnyToString(param), nil - } diff --git a/pay/pay_config.go b/pay/pay_config.go index 672e2b0..f254cb4 100644 --- a/pay/pay_config.go +++ b/pay/pay_config.go @@ -4,8 +4,6 @@ import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db" "code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git/db/model" zhios_tool_e "code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git/e" - cache "code.fnuoos.com/go_rely_warehouse/zyos_go_tools.git/utils/cache" - "xorm.io/xorm" ) //支付渠道获取 @@ -23,23 +21,3 @@ func JudgePayChannel(mid, paySceneIdentifier string) (model.PayChannelMaster, er } return payChannelMaster, nil } - -//客户端支付宝配置 -func OwnCustomAlipayConfig(eg *xorm.Engine, args map[string]string) map[string]string { - cache.NewRedis(args["redis_addr"]) - var paySet = map[string]string{ - "pay_app_cert_sn": db.SysCfgGetWithDb(eg, args["master_id"], "pay_app_cert_sn"), - "pay_alipay_root_cert_sn": db.SysCfgGetWithDb(eg, args["master_id"], "pay_alipay_root_cert_sn"), - "pay_alipayrsa_public_key": db.SysCfgGetWithDb(eg, args["master_id"], "pay_alipayrsa_public_key"), - "pay_ali_use_type": db.SysCfgGetWithDb(eg, args["master_id"], "pay_ali_use_type"), - "private_key": db.SysCfgGetWithDb(eg, args["master_id"], "pay_ali_private_key"), - "app_id": db.SysCfgGetWithDb(eg, args["master_id"], "pay_ali_app_id"), - "rsa": db.SysCfgGetWithDb(eg, args["master_id"], "pay_ali_key_len_type"), - "pkcs": db.SysCfgGetWithDb(eg, args["master_id"], "pay_ali_key_format_type"), - } - if paySet["pay_ali_use_type"] == "1" { - paySet["private_key"] = db.SysCfgGetWithDb(eg, args["master_id"], "pay_ali_new_private_key") - paySet["app_id"] = db.SysCfgGetWithDb(eg, args["master_id"], "pay_ali_new_app_id") - } - return paySet -}