Skip to content

Latest commit

 

History

History
194 lines (152 loc) · 6.34 KB

AlipayEbppBillApi.md

File metadata and controls

194 lines (152 loc) · 6.34 KB

AlipaySDKNet.OpenAPI.Api.AlipayEbppBillApi

All URIs are relative to https://openapi.alipay.com

Method HTTP request Description
Add POST /v3/alipay/ebpp/bill/add 创建账单
Get GET /v3/alipay/ebpp/bill/get 查询账单

Add

AlipayEbppBillAddResponseModel Add (string authToken = null, AlipayEbppBillAddModel alipayEbppBillAddModel = null)

创建账单

创建账单

Example

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 AddExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://openapi.alipay.com";
            var apiInstance = new AlipayEbppBillApi(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 authToken = "authToken_example";  // string | 用户授权令牌 (optional) 
            var alipayEbppBillAddModel = new AlipayEbppBillAddModel(); // AlipayEbppBillAddModel |  (optional) 

            try
            {
                // 创建账单
                AlipayEbppBillAddResponseModel result = apiInstance.Add(authToken, alipayEbppBillAddModel);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AlipayEbppBillApi.Add: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authToken string 用户授权令牌 [optional]
alipayEbppBillAddModel AlipayEbppBillAddModel [optional]

Return type

AlipayEbppBillAddResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -

[Back to top] [Back to API list] [Back to README]

Get

AlipayEbppBillGetResponseModel Get (string authToken = null, string orderType = null, string merchantOrderNo = null)

查询账单

查询账单

Example

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 GetExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://openapi.alipay.com";
            var apiInstance = new AlipayEbppBillApi(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 authToken = "authToken_example";  // string | 用户授权令牌 (optional) 
            var orderType = JF;  // string | 支付宝订单类型。公共事业缴纳JF,信用卡还款HK (optional) 
            var merchantOrderNo = 201203031234567;  // string | 输出机构的业务流水号,需要保证唯一性。 (optional) 

            try
            {
                // 查询账单
                AlipayEbppBillGetResponseModel result = apiInstance.Get(authToken, orderType, merchantOrderNo);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AlipayEbppBillApi.Get: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
authToken string 用户授权令牌 [optional]
orderType string 支付宝订单类型。公共事业缴纳JF,信用卡还款HK [optional]
merchantOrderNo string 输出机构的业务流水号,需要保证唯一性。 [optional]

Return type

AlipayEbppBillGetResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -

[Back to top] [Back to API list] [Back to README]