All URIs are relative to https://openapi.alipay.com
Method | HTTP request | Description |
---|---|---|
Bind | POST /v3/alipay/open/mini/qrcode/bind | 关联普通二维码 |
Query | GET /v3/alipay/open/mini/qrcode/query | 查询普通二维码 |
Unbind | POST /v3/alipay/open/mini/qrcode/unbind | 删除已关联普通二维码 |
AlipayOpenMiniQrcodeBindResponseModel Bind (AlipayOpenMiniQrcodeBindModel alipayOpenMiniQrcodeBindModel = null)
关联普通二维码
商户可不需更换线下二维码,通过该接口完成配置后,用户用支付宝扫描普通二维码时打开小程序并跳转到指定页面,普通二维码关联小程序最多可设置20条规则。
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 BindExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://openapi.alipay.com";
var apiInstance = new AlipayOpenMiniQrcodeApi(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 alipayOpenMiniQrcodeBindModel = new AlipayOpenMiniQrcodeBindModel(); // AlipayOpenMiniQrcodeBindModel | (optional)
try
{
// 关联普通二维码
AlipayOpenMiniQrcodeBindResponseModel result = apiInstance.Bind(alipayOpenMiniQrcodeBindModel);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AlipayOpenMiniQrcodeApi.Bind: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
alipayOpenMiniQrcodeBindModel | AlipayOpenMiniQrcodeBindModel | [optional] |
AlipayOpenMiniQrcodeBindResponseModel
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]
AlipayOpenMiniQrcodeQueryResponseModel Query (int? pageNo = null, int? pageSize = null)
查询普通二维码
通过appId查询商户关联的普通二维码路由信息
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 AlipayOpenMiniQrcodeApi(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 pageNo = 1; // int? | 页码 (optional)
var pageSize = 10; // int? | 每页条数,最大为10 (optional)
try
{
// 查询普通二维码
AlipayOpenMiniQrcodeQueryResponseModel result = apiInstance.Query(pageNo, pageSize);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AlipayOpenMiniQrcodeApi.Query: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
pageNo | int? | 页码 | [optional] |
pageSize | int? | 每页条数,最大为10 | [optional] |
AlipayOpenMiniQrcodeQueryResponseModel
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |
[Back to top] [Back to API list] [Back to README]
Object Unbind (AlipayOpenMiniQrcodeUnbindModel alipayOpenMiniQrcodeUnbindModel = 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 UnbindExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://openapi.alipay.com";
var apiInstance = new AlipayOpenMiniQrcodeApi(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 alipayOpenMiniQrcodeUnbindModel = new AlipayOpenMiniQrcodeUnbindModel(); // AlipayOpenMiniQrcodeUnbindModel | (optional)
try
{
// 删除已关联普通二维码
Object result = apiInstance.Unbind(alipayOpenMiniQrcodeUnbindModel);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AlipayOpenMiniQrcodeApi.Unbind: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
alipayOpenMiniQrcodeUnbindModel | AlipayOpenMiniQrcodeUnbindModel | [optional] |
Object
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | common response | - |
0 | 请求失败 | - |