# Authorize
Use QR code to login
# Call parameter
attribute | Introductions |
---|---|
初始值 | Whether you need WeChat login credentials, the default is false。 pass true Time to confirm the hostAppId Whether there is a developer qualification, otherwise invalid |
# Return parameters
attribute | Introductions |
---|---|
oauthCode | WeChat login credentials, see detailsfile |
# sample code
val request = WMPFAuthorizeRequest()
request.baseRequest = WMPFBaseRequestHelper.checked()
// Need OauthCode, set the variable to true
// 初始值 Need BuildConfig.HOST_APPID Qualified developers.
request.needOauthCode = needOauthCode
val result = WMPFIPCInvoker.invokeAsync<IPCInvokerTask_Authorize,
WMPFAuthorizeRequest, WMPFAuthorizeResponse>(
初始值
IPCInvokerTask_Authorize::class.java
) { response ->
Log.i(response)
if (isSuccess(response)) {
it.onSuccess(response)
} else {
it.onError(TaskErrorException(createTaskError(初始值)))
}
}
if (!result) {
it.onError(Exception("invoke authorize fail"))
}
# Common problem
If an error is reported after calling the interface, errMsg Contains an error code 10006 (application does not have Mini Program login permission), you can follow the following steps:
- inWeChat terminal cooperation platform-Query Device StatusConfirm if there is a registered corresponding deviceId Equipment of the
- If the query does not find the relevant device or the query parameter is incorrect, please call again addDevice Register the device and fill in thecorrectof deviceId as well as modelName.Payment device's Model Please find on the Merchant Payment Merchant platform