|
|
@@ -1,6 +1,7 @@ |
|
|
|
package yibao_pay |
|
|
|
|
|
|
|
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" |
|
|
|
"encoding/json" |
|
|
|
"errors" |
|
|
@@ -13,6 +14,7 @@ import ( |
|
|
|
"net/url" |
|
|
|
"os" |
|
|
|
"strings" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
|
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 |
|
|
|
} |
|
|
|
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 |
|
|
|
} |