huangjiajun 1 månad sedan
förälder
incheckning
5328593f0a
1 ändrade filer med 17 tillägg och 0 borttagningar
  1. +17
    -0
      yibao_pay/api.go

+ 17
- 0
yibao_pay/api.go Visa fil

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

Laddar…
Avbryt
Spara