1
This commit is contained in:
@@ -557,20 +557,13 @@ func (a *API) QueryAuthentication(param *QueryAuthentication, authType string) (
|
||||
// AccountStatusQuery 开户状态查询
|
||||
// https://o.lakala.com/#/home/document/detail?id=528
|
||||
func (a *API) AccountStatusQuery(tradeMode, subMerchantId, merchantNo string) (map[string]interface{}, error) {
|
||||
activityUrl := ""
|
||||
switch tradeMode {
|
||||
case "ALIPAY":
|
||||
activityUrl = AlibabaAccountStatusQuery
|
||||
case "WECHAT":
|
||||
activityUrl = WeChatAccountStatusQuery
|
||||
}
|
||||
reqParameter := map[string]interface{}{
|
||||
"reqData": map[string]interface{}{"tradeMode": tradeMode, "subMerchantId": subMerchantId, "merchantNo": merchantNo},
|
||||
"ver": Version,
|
||||
"timestamp": utils.Int64ToStr(time.Now().Unix()),
|
||||
"reqId": utils.GetUUID(),
|
||||
}
|
||||
result, err := a.AccessAPISign(PayAccountProdUrl, activityUrl, http.MethodPost, "", reqParameter)
|
||||
result, err := a.AccessAPISign(PayAccountProdUrl, WeChatAccountStatusQuery, http.MethodPost, "", reqParameter)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -36,9 +36,8 @@ const (
|
||||
WeChatUpdateAuthentication = "wechatRealName/modifyCommit" // 微信修改实名认证
|
||||
AlibabaUpdateAuthentication = "alipayRealName/modifyCommit" // 阿里修改实名认证
|
||||
WeChatQueryAuthentication = "wechatRealNameQuery" // 微信实名认证结果查询
|
||||
AlibabaQueryAuthentication = "alipayRealNameQuery" // 阿里修改实名认证
|
||||
WeChatAccountStatusQuery = "sme/mrchAuthStateQuery" // 微信开户状态差取暖
|
||||
AlibabaAccountStatusQuery = "sme/alipayRealNameQuery" // 阿里开户状态查询
|
||||
AlibabaQueryAuthentication = "alipayRealNameQuery" // 阿里实名认证结果查询
|
||||
WeChatAccountStatusQuery = "sme/mrchAuthStateQuery" // 微信/阿里开户状态差取暖
|
||||
SubMerchantQuery = "querySubMerInfo" // 报备查询
|
||||
)
|
||||
|
||||
|
||||
@@ -79,5 +79,5 @@ func TestSaveAuthentication(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAccountStatusQuery(t *testing.T) {
|
||||
api.AccountStatusQuery("WECHAT", "793879932", "822651059990E2S")
|
||||
api.AccountStatusQuery("ALIPAY", "2088770536505954", "822651059990E2S")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user