BasSdk 2.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package BasSdk --version 2.0.2
                    
NuGet\Install-Package BasSdk -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BasSdk" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BasSdk" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="BasSdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BasSdk --version 2.0.2
                    
#r "nuget: BasSdk, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BasSdk@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BasSdk&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=BasSdk&version=2.0.2
                    
Install as a Cake Tool

BasSdk NuGet Package

Overview

BasMainService is a comprehensive service that provides multiple functionalities, including fetching user information, initiating transactions, checking transaction statuses, sending notifications, and simulating mobile authentication. The service also includes logging capabilities and can be initialized with necessary credentials and environment settings.

Installation

To install the package, use the following command in the NuGet Package Manager Console:

Install-Package BasSdk

Usage

Initialization

Before using the services, you need to initialize the BasMainService class with the required parameters.

BasMainService.Initialize(
    environment: LibraryConstants.ENVIRONMENT environment, 
    mid: "your_mid", 
    appId: "your_app_id", 
    clientId: "your_client_id", 
    clientSecret: "your_client_secret", 
    website: "your_website", 
    callbackUrl: "your_callback_url", 
    defaultRequestTimeOut: 60
);

Enable/Disable Logging

You can enable or disable logging information as needed.

BasMainService.EnableLoggingInformation();
BasMainService.DisableLoggingInformation();

Methods

GetUserInfoAsync

Fetches user information asynchronously.

Task<BasBaseResponse<UserInfoDataResponse>> GetUserInfoAsync(string code, int? requestTimeOut = null, Dictionary<string, string> headerExtraInfo = null)
GetUserInfoV2Async

Fetches user information asynchronously using version 2 of the API.

Task<BasBaseResponse<UserInfoDataResponse>> GetUserInfoV2Async(string code, int? requestTimeOut = null, Dictionary<string, string> headerExtraInfo = null)
InitiateTransaction

Initiates a transaction.

Task<ResponseSig<InitiateTransactionResponse>> InitiateTransactionAsync(string orderId, decimal amount, string currency, string customerId, int requestTimeout = 60, object orderDetails = null, Dictionary<string, object> extraFields = null, string callbackUrl = null)
CheckTransactionStatusAsync

Checks the status of a transaction asynchronously.

Task<ResponseSig<TrxStatusModel>> CheckTransactionStatusAsync(string orderId, int requestTimeout = 60)
SendNotificationToCustomer

Sends a notification to the customer.

Task<BasBaseResponse> SendNotificationToCustomerAsync(string templateName, string orderId, object orderParams, object firebasePayload, object extraPayload, int requestTimeout = 60)
SimulateMobileFetchAuth

Simulates a mobile fetch authentication.

Task<BasBaseResponse<FetchAuthMobileResponseModel>> SimulateMobileFetchAuthAsync(string clientId, int requestTimeout = 60)
SimulateMobilePaymentAsync

Simulates a mobile basPayment

    public async Task<BasBaseResponse<FetchAuthMobileResponseModel>> SimulateMobilePaymentAsync(MobilePaymentRequest request, int requestTimeout = 60)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributions

Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss any changes.

Contact

For support, please contact Bas Team.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.