OnePageCheckoutPackage 1.1.1

dotnet add package OnePageCheckoutPackage --version 1.1.1
                    
NuGet\Install-Package OnePageCheckoutPackage -Version 1.1.1
                    
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="OnePageCheckoutPackage" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OnePageCheckoutPackage" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="OnePageCheckoutPackage" />
                    
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 OnePageCheckoutPackage --version 1.1.1
                    
#r "nuget: OnePageCheckoutPackage, 1.1.1"
                    
#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 OnePageCheckoutPackage@1.1.1
                    
#: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=OnePageCheckoutPackage&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=OnePageCheckoutPackage&version=1.1.1
                    
Install as a Cake Tool

OnePageCheckout Package

Overview

OnePageCheckoutPackage - NuGet Package Introduction OnePageCheckoutPackage is a library designed to streamline the checkout process for .NET-based applications, particularly Razor Pages projects. The package includes integrated support for database connections, SMTP settings for email notifications, paypal payment integration and Telegram bot integration to send alerts regarding the checkout process.

Demo

https://github.com/BS1805/OnePageCheckoutPackage/blob/main/Screenshot%202025-05-06%20210514.png https://github.com/BS1805/OnePageCheckoutPackage/blob/main/Screenshot%202025-05-06%20210603.png https://github.com/BS1805/OnePageCheckoutPackage/blob/main/Screenshot%202025-05-06%20210635.png https://github.com/BS1805/OnePageCheckoutPackage/blob/main/Screenshot%202025-05-06%20210658.png https://github.com/BS1805/OnePageCheckoutPackage/blob/main/Screenshot%202025-05-06%20210733.png https://github.com/BS1805/OnePageCheckoutPackage/blob/main/Screenshot%202025-05-06%20210810.png https://github.com/BS1805/OnePageCheckoutPackage

Features

  1. Easy integration into Razor Pages projects
  2. Supports SQL Server and other databases for checkout data storage
  3. Configurable SMTP settings for email notifications
  4. Telegram bot integration for sending checkout alerts

Installation

To install the OnePageCheckoutPackage NuGet package, follow these steps:

  1. Open your project in Visual Studio.

  2. Navigate to the 'Tools' menu and select 'NuGet Package Manager'.

  3. Select 'Manage NuGet Packages for Solution'.

  4. Search for 'OnePageCheckoutPackage' and click 'Install'. Alternatively, you can use the .NET CLI: dotnet add package OnePageCheckoutPackage Configuration Once the package is installed, you will need to configure it in your project. Below are the steps to configure it:

  5. Open your Program.cs file.

  6. Add the following code to configure the package with database and SMTP settings:

    builder.Services.AddOnePageCheckout(
        builder.Configuration,
        options => options.UseSqlServer(
            builder.Configuration.GetConnectionString("DefaultConnection"),
            b => b.MigrationsAssembly("client_for_package")
        )
    );
    builder.Services.Configure<CheckoutConfig>(builder.Configuration.GetSection("OnePageCheckout"));
    builder.Services.AddSingleton(sp => sp.GetRequiredService<IOptions<CheckoutConfig>>().Value);
    builder.Services.AddSession();
    

appsettings.json Configuration Make sure that your appsettings.json contains the necessary connection strings and configurations:

"ConnectionStrings": {
    "DefaultConnection": "Data Source=server name;Initial Catalog=OnePageDB;Integrated Security=True;Pooling=False;Encrypt=True;Trust Server Certificate=True"
},
"OnePageCheckout": {
    "SmtpSettings": {
        "SmtpServer": "smtp.gmail.com",
        "SmtpPort": 587,
        "SmtpUsername": "your-email@gmail.com",
        "SmtpPassword": "your-email-password"
    },
    "Telegram": {
        "BotToken": "your-bot-token",
        "ChatId": "your-chat-id"
    }
}

Running Migrations

To apply database migrations, use the following .NET CLI commands:

 dotnet ef migrations add InitialCreate
 dotnet ef database update

Testing

After setting up the configurations and running migrations, run the application. Navigate to the '/checkout' URL and test the checkout process. Make sure the email notifications and Telegram alerts are functioning as expected.

Conclusion

The OnePageCheckoutPackage is now integrated into your Razor Pages project and ready for use. If you encounter any issues, please refer to the documentation or contact the package maintainer.

Contact

hasibhasan305@gmail.com

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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.

Version Downloads Last Updated
1.1.1 217 5/16/2025
1.1.0 320 5/7/2025
1.0.21 505 5/4/2025
1.0.17 155 5/4/2025
1.0.16 109 5/4/2025
1.0.15 110 5/4/2025
1.0.14 107 5/4/2025
1.0.13 108 5/4/2025
1.0.12 77 5/3/2025
1.0.11 75 5/3/2025
1.0.10 77 5/3/2025
1.0.9 79 5/3/2025
1.0.8 75 5/3/2025
1.0.7 74 5/3/2025
1.0.6 76 5/3/2025
1.0.5 71 5/3/2025
1.0.4 74 5/3/2025
1.0.3 71 5/3/2025