huangjiajun 1 month ago
parent
commit
5328593f0a
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      yibao_pay/api.go

+ 17
- 0
yibao_pay/api.go View File

@@ -1,6 +1,7 @@
package yibao_pay package yibao_pay


import ( import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/db/offical"
zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils" zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
"encoding/json" "encoding/json"
"errors" "errors"
@@ -13,6 +14,7 @@ import (
"net/url" "net/url"
"os" "os"
"strings" "strings"
"xorm.io/xorm"
) )


func GetSend(method, appId, isvPriKey string, param map[string]string) (*response.YopResponse, error) { func GetSend(method, appId, isvPriKey string, param map[string]string) (*response.YopResponse, error) {
@@ -78,3 +80,18 @@ func GetYibao(bodyStr string) (*YibaoJoinCallback, error) {
} }
return &args, nil return &args, nil
} }
func CommKey(eg *xorm.Engine, Prd bool) map[string]string {
appId := offical.SysCfgByKeyStr(eg, "yibao_appid")
isvPriKey := offical.SysCfgByKeyStr(eg, "yibao_key")
parentMerchantNo := offical.SysCfgByKeyStr(eg, "yibao_merchant_no")
if Prd == false {
appId = offical.SysCfgByKeyStr(eg, "yibao_appid_test")
isvPriKey = offical.SysCfgByKeyStr(eg, "yibao_key_test")
}
res := map[string]string{
"appId": appId,
"isvPriKey": isvPriKey,
"parentMerchantNo": parentMerchantNo,
}
return res
}

Loading…
Cancel
Save