Просмотр исходного кода

add Reverse:for v1.0.6

tags/v1.0.6
huangjuajun 2 лет назад
Родитель
Сommit
01aec0ce03
3 измененных файлов: 2 добавлений и 27 удалений
  1. +1
    -1
      go.mod
  2. +1
    -4
      pay/pay_by_own.go
  3. +0
    -22
      pay/pay_config.go

+ 1
- 1
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


+ 1
- 4
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

}

+ 0
- 22
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
}

Загрузка…
Отмена
Сохранить