All URIs are relative to https://openapi.alipay.com
Method | HTTP request | Description |
---|---|---|
Apply | POST /v3/alipay/user/agreement/userverify/apply | 协议用户一致性验证 |
Query | GET /v3/alipay/user/agreement/userverify/query | 用户协议鉴权查询结果 |
AlipayUserAgreementUserverifyApplyResponseModel Apply (AlipayUserAgreementUserverifyApplyModel alipayUserAgreementUserverifyApplyModel = null)
协议用户一致性验证
验证协议对应的用户信息
using System.Collections.Generic;
using System.Diagnostics;
using AlipaySDKNet.OpenAPI.Api;
using AlipaySDKNet.OpenAPI.Client;
using AlipaySDKNet.OpenAPI.Model;
using AlipaySDKNet.OpenAPI.Util;
using AlipaySDKNet.OpenAPI.Util.Model;
namespace Example
{
public class ApplyExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://openapi.alipay.com";
var apiInstance = new AlipayUserAgreementUserverifyApi(config);
// 设置alipayConfig参数
AlipayConfig alipayConfig = new AlipayConfig();
alipayConfig.AppId = "app_id";
alipayConfig.PrivateKey = "private_key";
// 密钥模式
alipayConfig.AlipayPublicKey = "alipay_public_key";
// 证书模式
// alipayConfig.AppCertPath = "../appCertPublicKey.crt";
// alipayConfig.AlipayPublicCertPath = "../alipayCertPublicKey_RSA2.crt";
// alipayConfig.RootCertPath = "../alipayRootCert.crt";
alipayConfig.EncryptKey = "encrypt_key";
AlipayConfigUtil alipayConfigUtil = new AlipayConfigUtil(alipayConfig);
apiInstance.Client.SetAlipayConfigUtil(alipayConfigUtil);
var alipayUserAgreementUserverifyApplyModel = new AlipayUserAgreementUserverifyApplyModel(); // AlipayUserAgreementUserverifyApplyModel | (optional)
try
{
// 协议用户一致性验证
AlipayUserAgreementUserverifyApplyResponseModel result = apiInstance.Apply(alipayUserAgreementUserverifyApplyModel);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AlipayUserAgreementUserverifyApi.Apply: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
alipayUserAgreementUserverifyApplyModel | AlipayUserAgreementUserverifyApplyModel | [optional] |
AlipayUserAgreementUserverifyApplyResponseModel
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |
[Back to top] [Back to API list] [Back to README]
AlipayUserAgreementUserverifyQueryResponseModel Query (string agreementNo = null, string applyToken = null)
用户协议鉴权查询结果
商户使用用户验证申请接口时,获取token,然后通过次接口回去验证状态
using System.Collections.Generic;
using System.Diagnostics;
using AlipaySDKNet.OpenAPI.Api;
using AlipaySDKNet.OpenAPI.Client;
using AlipaySDKNet.OpenAPI.Model;
using AlipaySDKNet.OpenAPI.Util;
using AlipaySDKNet.OpenAPI.Util.Model;
namespace Example
{
public class QueryExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://openapi.alipay.com";
var apiInstance = new AlipayUserAgreementUserverifyApi(config);
// 设置alipayConfig参数
AlipayConfig alipayConfig = new AlipayConfig();
alipayConfig.AppId = "app_id";
alipayConfig.PrivateKey = "private_key";
// 密钥模式
alipayConfig.AlipayPublicKey = "alipay_public_key";
// 证书模式
// alipayConfig.AppCertPath = "../appCertPublicKey.crt";
// alipayConfig.AlipayPublicCertPath = "../alipayCertPublicKey_RSA2.crt";
// alipayConfig.RootCertPath = "../alipayRootCert.crt";
alipayConfig.EncryptKey = "encrypt_key";
AlipayConfigUtil alipayConfigUtil = new AlipayConfigUtil(alipayConfig);
apiInstance.Client.SetAlipayConfigUtil(alipayConfigUtil);
var agreementNo = 20170502000610755993; // string | 协议号 (optional)
var applyToken = MDEDUCT0068292ca377d1d44b65fa24ec9cd89132f; // string | 申请时获取的token (optional)
try
{
// 用户协议鉴权查询结果
AlipayUserAgreementUserverifyQueryResponseModel result = apiInstance.Query(agreementNo, applyToken);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AlipayUserAgreementUserverifyApi.Query: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
agreementNo | string | 协议号 | [optional] |
applyToken | string | 申请时获取的token | [optional] |
AlipayUserAgreementUserverifyQueryResponseModel
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |