This commit is contained in:
邹宗楠
2025-07-29 16:10:01 +08:00
parent 1d0c8692f9
commit 3398ff6bde
3 changed files with 143 additions and 0 deletions

View File

@@ -922,3 +922,89 @@ func (c *LaKaLaController) GetCardBin() {
return
})
}
// SaveAuthentication 微信支付宝认证
// @Title 微信支付宝认证
// @Description 微信支付宝认证
// @Param token header string true "认证token"
// @Param payload formData string true "json数据lakala.AuthenticationInfo 对象"
// @Param authType formData string true "支付类型[支付宝传:ZFBZF(其他类型不传)]"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /SaveAuthentication [post]
func (c *LaKaLaController) SaveAuthentication() {
c.callSaveAuthentication(func(params *tLakalaSaveAuthenticationParams) (retVal interface{}, errCode string, err error) {
authentic := &lakala.AuthenticationInfo{}
if params.Payload != "" {
if err = utils.UnmarshalUseNumber([]byte(params.Payload), authentic); err != nil {
return nil, "", err
}
}
err = lakalaServer.SaveAuthentication(authentic, params.AuthType)
return
})
}
// UpdateAuthentication 微信支付宝修改认证
// @Title 微信支付宝修改认证
// @Description 微信支付宝修改认证
// @Param token header string true "认证token"
// @Param payload formData string true "json数据lakala.AuthenticationInfo 对象"
// @Param authType formData string true "支付类型[支付宝传:ZFBZF(其他类型不传)]"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /UpdateAuthentication [post]
func (c *LaKaLaController) UpdateAuthentication() {
c.callUpdateAuthentication(func(params *tLakalaUpdateAuthenticationParams) (retVal interface{}, errCode string, err error) {
authentic := &lakala.UpdateAuthentication{}
if params.Payload != "" {
if err = utils.UnmarshalUseNumber([]byte(params.Payload), authentic); err != nil {
return nil, "", err
}
}
err = lakalaServer.UpdateAuthentication(authentic, params.AuthType)
return
})
}
// QueryAuthentication 认证状态查询
// @Title 认证状态查询
// @Description 认证状态查询
// @Param token header string true "认证token"
// @Param payload formData string true "json数据lakala.QueryAuthentication 对象"
// @Param authType formData string true "支付类型[支付宝传:ZFBZF(其他类型不传)]"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /QueryAuthentication [post]
func (c *LaKaLaController) QueryAuthentication() {
c.callQueryAuthentication(func(params *tLakalaQueryAuthenticationParams) (retVal interface{}, errCode string, err error) {
authentic := &lakala.QueryAuthentication{}
if params.Payload != "" {
if err = utils.UnmarshalUseNumber([]byte(params.Payload), authentic); err != nil {
return nil, "", err
}
}
retVal, err = lakalaServer.QueryAuthentication(authentic, params.AuthType)
return
})
}
// AccountStatusQuery 开户状态查询
// @Title 开户状态查询
// @Description 开户状态查询
// @Param token header string true "认证token"
// @Param tradeMode formData string true "支付类型交易钱包类型[ALIPAYWECHAT]"
// @Param subMerchantId formData string true "子商户号 "
// @Param merchantNo formData string true "商户号 "
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /AccountStatusQuery [get]
func (c *LaKaLaController) AccountStatusQuery() {
c.callAccountStatusQuery(func(params *tLakalaAccountStatusQueryParams) (retVal interface{}, errCode string, err error) {
retVal, err = lakalaServer.AccountStatusQuery(params.TradeMode, params.SubMerchantId, params.MerchantNo)
return
})
}