How ebrahim-nahid/bkash-citybankpaymentgatewayimplementation works
This is an ASP.NET MVC guest-checkout application with two separate payment routes: bKash tokenized checkout and City Bank card checkout. Each route records a pending transaction, calls its provider, handles the provider return, updates status, and presents success or failure. The controllers own those actions and use a shared EF Core context; Program configures SQL Server, sessions, and MVC routing. The excerpts do not show the Razor form wiring or full provider protocol, so those links are omitted or marked unverified.
Main entry points: bKashController.cs bKash controller · CityBankController.cs City Bank controller · AppDbContext.cs EF Core context · Program.cs Application startup
Components 15
Web application
- Application startup
Bkash&CityBankPaymentGatewayImplementation/Program.cs - Home controller
Bkash&CityBankPaymentGatewayImplementation/Controllers/HomeController.cs
bKash checkout
- bKash controller
Bkash&CityBankPaymentGatewayImplementation/Controllers/bKashController.cs - bKash transaction model
Bkash&CityBankPaymentGatewayImplementation/Models/bKashTransaction.cs - bKash payment views
Bkash&CityBankPaymentGatewayImplementation/Views/bKash
City Bank checkout
- City Bank controller
Bkash&CityBankPaymentGatewayImplementation/Controllers/CityBankController.cs - City Bank transaction model
Bkash&CityBankPaymentGatewayImplementation/Models/CityBankTransaction.cs - City Bank payment views
Bkash&CityBankPaymentGatewayImplementation/Views/CityBank
Transaction persistence
- EF Core context
Bkash&CityBankPaymentGatewayImplementation/Repository/AppDbContext.cs
User interface
- Home and shared views
Bkash&CityBankPaymentGatewayImplementation/Views - Error view model
Bkash&CityBankPaymentGatewayImplementation/Models/ErrorViewModel.cs
Other components
- Guest
- bKash gateway
- City Bank gateway
- SQL Server
Connections 18
- Guest → bKash controller: starts checkout
- Guest → City Bank controller: starts checkout
- Application startup → EF Core context: registers context
Bkash&CityBankPaymentGatewayImplementation/Program.cs - Application startup → SQL Server: configures SQL Server
Bkash&CityBankPaymentGatewayImplementation/Program.cs - bKash controller → EF Core context: saves and updates
Bkash&CityBankPaymentGatewayImplementation/Controllers/bKashController.cs - bKash controller → bKash transaction model: creates records
Bkash&CityBankPaymentGatewayImplementation/Controllers/bKashController.cs - EF Core context → bKash transaction model: stores
Bkash&CityBankPaymentGatewayImplementation/Repository/AppDbContext.cs - bKash controller → bKash gateway: requests payment
Bkash&CityBankPaymentGatewayImplementation/Controllers/bKashController.cs - bKash gateway → bKash controller: returns callback
Bkash&CityBankPaymentGatewayImplementation/Controllers/bKashController.cs - bKash controller → bKash payment views: renders results
Bkash&CityBankPaymentGatewayImplementation/Controllers/bKashController.cs - City Bank controller → EF Core context: saves and updates
Bkash&CityBankPaymentGatewayImplementation/Controllers/CityBankController.cs - City Bank controller → City Bank transaction model: creates records
Bkash&CityBankPaymentGatewayImplementation/Controllers/CityBankController.cs - EF Core context → City Bank transaction model: stores
Bkash&CityBankPaymentGatewayImplementation/Repository/AppDbContext.cs - City Bank controller → City Bank gateway: creates session
Bkash&CityBankPaymentGatewayImplementation/Controllers/CityBankController.cs - City Bank gateway → City Bank controller: returns redirect
Bkash&CityBankPaymentGatewayImplementation/Controllers/CityBankController.cs - City Bank controller → City Bank payment views: renders results
Bkash&CityBankPaymentGatewayImplementation/Controllers/CityBankController.cs - Home controller → Home and shared views: renders pages
- Home controller → Error view model: creates error model
Bkash&CityBankPaymentGatewayImplementation/Controllers/HomeController.cs