1
This commit is contained in:
@@ -655,6 +655,26 @@ func GetCardBin(orgCode, cardNo string) (*lakala.BinInfo, error) {
|
||||
return result, err
|
||||
}
|
||||
|
||||
// SaveAuthentication 支付宝/微信认证
|
||||
func SaveAuthentication(param *lakala.AuthenticationInfo, authType string) error {
|
||||
return api.LaKaLaApi.SaveAuthentication(param, authType)
|
||||
}
|
||||
|
||||
// UpdateAuthentication 修改认证
|
||||
func UpdateAuthentication(param *lakala.UpdateAuthentication, authType string) error {
|
||||
return api.LaKaLaApi.UpdateAuthentication(param, authType)
|
||||
}
|
||||
|
||||
// QueryAuthentication 认证查询
|
||||
func QueryAuthentication(param *lakala.QueryAuthentication, authType string) (*lakala.QueryAuthenticationResp, error) {
|
||||
return api.LaKaLaApi.QueryAuthentication(param, authType)
|
||||
}
|
||||
|
||||
// AccountStatusQuery 开户状态查询
|
||||
func AccountStatusQuery(tradeMode, subMerchantId, merchantNo string) (map[string]interface{}, error) {
|
||||
return api.LaKaLaApi.AccountStatusQuery(tradeMode, subMerchantId, merchantNo)
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 订单相关
|
||||
|
||||
@@ -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 "支付类型交易钱包类型[ALIPAY,WECHAT]"
|
||||
// @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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -5140,6 +5140,43 @@ func init() {
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
// 微信支付宝认证
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:LaKaLaController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:LaKaLaController"],
|
||||
web.ControllerComments{
|
||||
Method: "SaveAuthentication",
|
||||
Router: `/SaveAuthentication`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
// 修改微信支付宝认证
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:LaKaLaController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:LaKaLaController"],
|
||||
web.ControllerComments{
|
||||
Method: "UpdateAuthentication",
|
||||
Router: `/UpdateAuthentication`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
// 认证状态查询
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:LaKaLaController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:LaKaLaController"],
|
||||
web.ControllerComments{
|
||||
Method: "QueryAuthentication",
|
||||
Router: `/QueryAuthentication`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
// 认证状态查询
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:LaKaLaController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:LaKaLaController"],
|
||||
web.ControllerComments{
|
||||
Method: "AccountStatusQuery",
|
||||
Router: `/AccountStatusQuery`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
//web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:FnController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:FnController"],
|
||||
// web.ControllerComments{
|
||||
// Method: "FnStore",
|
||||
|
||||
Reference in New Issue
Block a user