Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
157fc7ed78
2 changed files with 29 additions and 4 deletions
  1. +6
    -4
      card_pay/api.go
  2. +23
    -0
      card_pay/card_pay.go

+ 6
- 4
card_pay/api.go View File

@@ -21,14 +21,16 @@ const (
) )


func CardPaySend(method string, keyArr map[string]string, param map[string]string) (string, error) { func CardPaySend(method string, keyArr map[string]string, param map[string]string) (string, error) {
url := "https://efps.epaylinks.cn/" + method
url := "https://test-efps.epaylinks.cn/" + method
//https://efps.epaylinks.cn/ //https://efps.epaylinks.cn/
for key, value := range param { for key, value := range param {
if value == "" { if value == "" {
delete(param, key) delete(param, key)
} }
} }
param["customerCode"] = keyArr["customerCode"]
if param["customerCode"] == "" {
param["customerCode"] = keyArr["customerCode"]
}
param["nonceStr"] = randomString(32) param["nonceStr"] = randomString(32)
data := zhios_third_party_utils.SerializeStr(param) data := zhios_third_party_utils.SerializeStr(param)
sign, err := CardPayGetSign(keyArr["privateKeyStr"], data) sign, err := CardPayGetSign(keyArr["privateKeyStr"], data)
@@ -53,7 +55,7 @@ func CardPaySend(method string, keyArr map[string]string, param map[string]strin


} }
func CardPaySendSecond(method string, keyArr map[string]string, param map[string]interface{}) (string, error) { func CardPaySendSecond(method string, keyArr map[string]string, param map[string]interface{}) (string, error) {
url := "https://efps.epaylinks.cn/" + method
url := "https://test-efps.epaylinks.cn/" + method
//https://efps.epaylinks.cn/ //https://efps.epaylinks.cn/
for key, value := range param { for key, value := range param {
if value == "" { if value == "" {
@@ -85,7 +87,7 @@ func CardPaySendSecond(method string, keyArr map[string]string, param map[string


} }
func CardPayApplySend(method string, keyArr map[string]string, param map[string]string) (string, error) { func CardPayApplySend(method string, keyArr map[string]string, param map[string]string) (string, error) {
url := "https://efps.epaylinks.cn/" + method
url := "https://test-efps.epaylinks.cn/" + method
//https://efps.epaylinks.cn/ //https://efps.epaylinks.cn/
for key, value := range param { for key, value := range param {
if value == "" { if value == "" {


+ 23
- 0
card_pay/card_pay.go View File

@@ -203,3 +203,26 @@ func ApplyStoreQuery(keyArr, param map[string]string) (string, error) {
//} //}
return CardPayApplySend("api/cust/SP/Merchant/query", keyArr, param) return CardPayApplySend("api/cust/SP/Merchant/query", keyArr, param)
} }

func AccountQuery(keyArr, param map[string]string) (string, error) {

//param := map[string]string{
// "accountType": "2",
// "customerCode": "562932003186159",
//}
return CardPaySend("api/acc/accountQuery", keyArr, param)
}
func WithdrawalForSubMerchant(keyArr, param map[string]string) (string, error) {

//param := map[string]string{
// "version": "3.0",
// "outTradeNo": "1233333444",
// "memberId": "562658004035964",
// //"protocol": "p202306201841814421887",
// "payAmount": "98",
// "procedureCustomerCode": "",
// "payCurrency": "CNY",
// "notifyUrl": "http://inapi.izhyin.cn/api/v1/swipe/withdrawal/notify/123456",
//}
return CardPaySend("/api/txs/pay/WithdrawalForSubMerchant", keyArr, param)
}

Loading…
Cancel
Save