BasSdk 2.0.2
See the version list below for details.
dotnet add package BasSdk --version 2.0.2
NuGet\Install-Package BasSdk -Version 2.0.2
<PackageReference Include="BasSdk" Version="2.0.2" />
<PackageVersion Include="BasSdk" Version="2.0.2" />
<PackageReference Include="BasSdk" />
paket add BasSdk --version 2.0.2
#r "nuget: BasSdk, 2.0.2"
#:package BasSdk@2.0.2
#addin nuget:?package=BasSdk&version=2.0.2
#tool nuget:?package=BasSdk&version=2.0.2
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 | Versions 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. |
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.