新增支付方式获取
This commit is contained in:
@@ -95,4 +95,7 @@ abstract class Api {
|
||||
|
||||
/// 解绑用户设备
|
||||
static const String kr_unbindUserDevice = "/v1/public/user/unbind_device";
|
||||
|
||||
/// 获取可用支付方式(公开接口)
|
||||
static const String kr_getPublicPaymentMethods = "/v1/public/payment/methods";
|
||||
}
|
||||
|
||||
@@ -271,4 +271,23 @@ class KRSubscribeApi {
|
||||
|
||||
return right(baseResponse.model.kr_bl);
|
||||
}
|
||||
|
||||
/// 获取公开的支付方式列表
|
||||
Future<Either<HttpError, dynamic>> kr_getPublicPaymentMethods() async {
|
||||
final Map<String, dynamic> data = <String, dynamic>{};
|
||||
|
||||
BaseResponse<dynamic> baseResponse =
|
||||
await HttpUtil.getInstance().request<dynamic>(
|
||||
Api.kr_getPublicPaymentMethods,
|
||||
data,
|
||||
method: HttpMethod.GET,
|
||||
isShowLoading: false,
|
||||
);
|
||||
if (!baseResponse.isSuccess) {
|
||||
return left(
|
||||
HttpError(msg: baseResponse.retMsg, code: baseResponse.retCode));
|
||||
}
|
||||
|
||||
return right(baseResponse.model);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user