Ezreal.SDK.ShouQianBa

Package Description


Keywords
preview
License
MIT
Install
Install-Package Ezreal.SDK.ShouQianBa -Version 0.1.1-preview

Documentation

Ezreal.SDK.ShouQianBa

GitHub license
This project is a simple library for ShouQianBa (WosaiPay) WebApi which based cross platform framework for .NET Standard and .NET Framework 4.5.

NuGet Dependencies

All platform framework required

.NET Standard only

Package Manager

Install-Package Ezreal.SDK.ShouQianBa -Version 0.1.0-preview

.NET CLI

dotnet add package Ezreal.SDK.ShouQianBa --version 0.1.0-preview

Use:

  • Add initialized code before use
Global.AddDefaultConfig(config =>
{
    config.DefaultShouQianBaServiceProviderSettings = new ServiceProviderSettings()
    {
        ServiceProviderSerialNo = "@vendor_sn",
        ServiceProviderKey = "@vendor_key",
    };
    config.UseSandbox = true;
});
 var apiInstense = Global.Create<IMerchantContract>();
 BankRequestModel bankRequestModel = new BankRequestModel() { BankCard = "@bankCardID" };
 ServiceProviderSignProvider<BankRequestModel> serviceProviderSigner = new ServiceProviderSignProvider<BankRequestModel>(bankRequestModel);
 Response<BankResponseModel> result = null;
 Task.Run(async () =>
 {
     try
     {
         result = await apiInstense.Banks(serviceProviderSigner, bankRequestModel);
     }
     catch (HttpStatusFailureException ex)
     {

     }
     catch (System.Net.Http.HttpRequestException ex)
     {
         throw ex;
     }
 });