huangjiajun 1ヶ月前
コミット
5328593f0a
1個のファイルの変更17行の追加0行の削除
  1. +17
    -0
      yibao_pay/api.go

+ 17
- 0
yibao_pay/api.go ファイルの表示

@@ -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
}

読み込み中…
キャンセル
保存