diff --git a/modules/payment/.gitattributes b/modules/payment/.gitattributes
new file mode 100644
index 0000000..c941e52
--- /dev/null
+++ b/modules/payment/.gitattributes
@@ -0,0 +1 @@
+**/wwwroot/libs/** linguist-vendored
diff --git a/modules/payment/.gitignore b/modules/payment/.gitignore
new file mode 100644
index 0000000..7127e17
--- /dev/null
+++ b/modules/payment/.gitignore
@@ -0,0 +1,259 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# Payment
+host/Payment.IdentityServer/Logs/logs.txt
+host/Payment.HttpApi.Host/Logs/logs.txt
+host/Payment.Web.Host/Logs/logs.txt
+host/Payment.Web.Unified/Logs/logs.txt
+host/Payment.Blazor.Server.Host/Logs/logs.txt
\ No newline at end of file
diff --git a/modules/payment/.prettierrc b/modules/payment/.prettierrc
new file mode 100644
index 0000000..56af76b
--- /dev/null
+++ b/modules/payment/.prettierrc
@@ -0,0 +1,5 @@
+{
+ "singleQuote": true,
+ "useTabs": false,
+ "tabWidth": 4
+}
diff --git a/modules/payment/NuGet.Config b/modules/payment/NuGet.Config
new file mode 100644
index 0000000..be8a1ec
--- /dev/null
+++ b/modules/payment/NuGet.Config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/Payment.sln b/modules/payment/Payment.sln
new file mode 100644
index 0000000..0806097
--- /dev/null
+++ b/modules/payment/Payment.sln
@@ -0,0 +1,120 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29001.49
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.Domain.Shared", "src\Payment.Domain.Shared\Payment.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.Domain", "src\Payment.Domain\Payment.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.Application.Contracts", "src\Payment.Application.Contracts\Payment.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.Application", "src\Payment.Application\Payment.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.EntityFrameworkCore", "src\Payment.EntityFrameworkCore\Payment.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.HttpApi", "src\Payment.HttpApi\Payment.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.TestBase", "test\Payment.TestBase\Payment.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.EntityFrameworkCore.Tests", "test\Payment.EntityFrameworkCore.Tests\Payment.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.Domain.Tests", "test\Payment.Domain.Tests\Payment.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.Application.Tests", "test\Payment.Application.Tests\Payment.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.Web", "src\Payment.Web\Payment.Web.csproj", "{3B7B6317-1B85-4164-8E11-75574F80AE17}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{E46CF089-D16A-4761-BE24-1B1B1D49225A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "www", "www", "{4EF8B98A-E7A3-48A6-9C1F-10DE32001213}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{5B39D229-146D-423E-9E50-91471851824E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{EFBC83DB-A546-471E-99E4-4948C3ADCAA1}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "www", "www", "{D3FD0217-A8C7-4BAF-BF77-962F1B055515}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{FC718EF0-43EB-4767-9578-95FA0B3727A5}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU
+ {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B7B6317-1B85-4164-8E11-75574F80AE17}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B7B6317-1B85-4164-8E11-75574F80AE17}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {E46CF089-D16A-4761-BE24-1B1B1D49225A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {E46CF089-D16A-4761-BE24-1B1B1D49225A}
+ {D64C1577-4929-4B60-939E-96DE1534891A} = {E46CF089-D16A-4761-BE24-1B1B1D49225A}
+ {0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {E46CF089-D16A-4761-BE24-1B1B1D49225A}
+ {4EF8B98A-E7A3-48A6-9C1F-10DE32001213} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {78040F9E-3501-4A40-82DF-00A597710F35} = {4EF8B98A-E7A3-48A6-9C1F-10DE32001213}
+ {BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {4EF8B98A-E7A3-48A6-9C1F-10DE32001213}
+ {077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {4EF8B98A-E7A3-48A6-9C1F-10DE32001213}
+ {3B7B6317-1B85-4164-8E11-75574F80AE17} = {4EF8B98A-E7A3-48A6-9C1F-10DE32001213}
+ {5B39D229-146D-423E-9E50-91471851824E} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
+ {EFBC83DB-A546-471E-99E4-4948C3ADCAA1} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ {C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {EFBC83DB-A546-471E-99E4-4948C3ADCAA1}
+ {527F645C-C1FC-406E-8479-81386C8ECF13} = {EFBC83DB-A546-471E-99E4-4948C3ADCAA1}
+ {E60895E5-79C4-447D-88B7-85CB5BA336A4} = {EFBC83DB-A546-471E-99E4-4948C3ADCAA1}
+ {D3FD0217-A8C7-4BAF-BF77-962F1B055515} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ {90CB5DC4-C040-45C7-8900-9688B26405BC} = {D3FD0217-A8C7-4BAF-BF77-962F1B055515}
+ {FC718EF0-43EB-4767-9578-95FA0B3727A5} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D}
+ EndGlobalSection
+EndGlobal
diff --git a/modules/payment/Payment.sln.DotSettings b/modules/payment/Payment.sln.DotSettings
new file mode 100644
index 0000000..cb0b2c9
--- /dev/null
+++ b/modules/payment/Payment.sln.DotSettings
@@ -0,0 +1,23 @@
+
+ True
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ Required
+ Required
+ Required
+ Required
+ False
+ True
+ False
+ False
+ True
+ False
+ False
+ SQL
+
\ No newline at end of file
diff --git a/modules/payment/common.props b/modules/payment/common.props
new file mode 100644
index 0000000..87cf88d
--- /dev/null
+++ b/modules/payment/common.props
@@ -0,0 +1,24 @@
+
+
+ latest
+ 0.1.0
+ $(NoWarn);CS1591
+ module
+
+
+
+
+
+ All
+ runtime; build; native; contentfiles; analyzers
+
+
+
+
+
+
+ $(NoWarn);0436
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/docker-compose.migrations.yml b/modules/payment/docker-compose.migrations.yml
new file mode 100644
index 0000000..e9b751f
--- /dev/null
+++ b/modules/payment/docker-compose.migrations.yml
@@ -0,0 +1,13 @@
+version: '3.4'
+
+services:
+ migrations:
+ build:
+ context: ../../
+ dockerfile: templates/service/database/Dockerfile
+ depends_on:
+ - sqlserver
+ environment:
+ - IdentityServer_DB=Payment_Identity
+ - Payment_DB=Payment_ModuleDb
+ - SA_PASSWORD=yourStrong(!)Password
diff --git a/modules/payment/docker-compose.override.yml b/modules/payment/docker-compose.override.yml
new file mode 100644
index 0000000..cea9b3a
--- /dev/null
+++ b/modules/payment/docker-compose.override.yml
@@ -0,0 +1,29 @@
+version: '3.4'
+
+services:
+ sqlserver:
+ environment:
+ - SA_PASSWORD=yourStrong(!)Password
+ - ACCEPT_EULA=Y
+ ports:
+ - "51599:1433"
+
+ identity-server:
+ environment:
+ - ASPNETCORE_URLS=http://0.0.0.0:80
+ - ConnectionStrings__Default=Server=sqlserver;Database=Payment_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false
+ - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=Payment_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false
+ ports:
+ - "51600:80"
+
+ payment:
+ environment:
+ - ASPNETCORE_URLS=http://0.0.0.0:80
+ - ConnectionStrings__Default=Server=sqlserver;Database=Payment_ModuleDb;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false
+ - ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=Payment_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false
+ - ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=Payment_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false
+ - ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=Payment_Identity;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false
+ - ConnectionStrings__SqlServerCache=Server=sqlserver;Database=Payment_Cache;Trusted_Connection=True;User=sa;Password=yourStrong(!)Password;Integrated Security=false
+ - AuthServer__Authority=http://identity-server
+ ports:
+ - "51601:80"
\ No newline at end of file
diff --git a/modules/payment/docker-compose.yml b/modules/payment/docker-compose.yml
new file mode 100644
index 0000000..cbf2052
--- /dev/null
+++ b/modules/payment/docker-compose.yml
@@ -0,0 +1,25 @@
+version: '3.4'
+
+services:
+ sqlserver:
+ image: mcr.microsoft.com/mssql/server
+ volumes:
+ - dbdata:/var/opt/mssql
+
+ identity-server:
+ build:
+ context: ../../
+ dockerfile: templates/service/host/IdentityServerHost/Dockerfile
+ depends_on:
+ - sqlserver
+
+ payment:
+ build:
+ context: ../../
+ dockerfile: templates/service/host/Payment.Host/Dockerfile
+ depends_on:
+ - sqlserver
+ - identity-server
+
+volumes:
+ dbdata:
\ No newline at end of file
diff --git a/modules/payment/global.json b/modules/payment/global.json
new file mode 100644
index 0000000..2b7d34d
--- /dev/null
+++ b/modules/payment/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "version": "6.0",
+ "rollForward": "latestFeature"
+ }
+}
diff --git a/modules/payment/src/Payment.Application.Contracts/FodyWeavers.xml b/modules/payment/src/Payment.Application.Contracts/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Application.Contracts/FodyWeavers.xsd b/modules/payment/src/Payment.Application.Contracts/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Application.Contracts/Payment.Application.Contracts.csproj b/modules/payment/src/Payment.Application.Contracts/Payment.Application.Contracts.csproj
new file mode 100644
index 0000000..432654e
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/Payment.Application.Contracts.csproj
@@ -0,0 +1,16 @@
+
+
+
+
+
+ netstandard2.0
+ Payment
+
+
+
+
+
+
+
+
+
diff --git a/modules/payment/src/Payment.Application.Contracts/PaymentApplicationContractsModule.cs b/modules/payment/src/Payment.Application.Contracts/PaymentApplicationContractsModule.cs
new file mode 100644
index 0000000..5db0482
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/PaymentApplicationContractsModule.cs
@@ -0,0 +1,16 @@
+using Volo.Abp.Application;
+using Volo.Abp.Modularity;
+using Volo.Abp.Authorization;
+
+namespace Payment
+{
+ [DependsOn(
+ typeof(PaymentDomainSharedModule),
+ typeof(AbpDddApplicationContractsModule),
+ typeof(AbpAuthorizationModule)
+ )]
+ public class PaymentApplicationContractsModule : AbpModule
+ {
+
+ }
+}
diff --git a/modules/payment/src/Payment.Application.Contracts/PaymentRemoteServiceConsts.cs b/modules/payment/src/Payment.Application.Contracts/PaymentRemoteServiceConsts.cs
new file mode 100644
index 0000000..fc99a3c
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/PaymentRemoteServiceConsts.cs
@@ -0,0 +1,7 @@
+namespace Payment
+{
+ public class PaymentRemoteServiceConsts
+ {
+ public const string RemoteServiceName = "Payment";
+ }
+}
diff --git a/modules/payment/src/Payment.Application.Contracts/Permissions/PaymentPermissionDefinitionProvider.cs b/modules/payment/src/Payment.Application.Contracts/Permissions/PaymentPermissionDefinitionProvider.cs
new file mode 100644
index 0000000..a028087
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/Permissions/PaymentPermissionDefinitionProvider.cs
@@ -0,0 +1,19 @@
+using Payment.Localization;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Localization;
+
+namespace Payment.Permissions
+{
+ public class PaymentPermissionDefinitionProvider : PermissionDefinitionProvider
+ {
+ public override void Define(IPermissionDefinitionContext context)
+ {
+ var myGroup = context.AddGroup(PaymentPermissions.GroupName, L("Permission:Payment"));
+ }
+
+ private static LocalizableString L(string name)
+ {
+ return LocalizableString.Create(name);
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Application.Contracts/Permissions/PaymentPermissions.cs b/modules/payment/src/Payment.Application.Contracts/Permissions/PaymentPermissions.cs
new file mode 100644
index 0000000..4d9f6b7
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/Permissions/PaymentPermissions.cs
@@ -0,0 +1,14 @@
+using Volo.Abp.Reflection;
+
+namespace Payment.Permissions
+{
+ public class PaymentPermissions
+ {
+ public const string GroupName = "Payment";
+
+ public static string[] GetAll()
+ {
+ return ReflectionHelper.GetPublicConstantsRecursively(typeof(PaymentPermissions));
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Application.Contracts/Samples/ISampleAppService.cs b/modules/payment/src/Payment.Application.Contracts/Samples/ISampleAppService.cs
new file mode 100644
index 0000000..7b04320
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/Samples/ISampleAppService.cs
@@ -0,0 +1,12 @@
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+
+namespace Payment.Samples
+{
+ public interface ISampleAppService : IApplicationService
+ {
+ Task GetAsync();
+
+ Task GetAuthorizedAsync();
+ }
+}
diff --git a/modules/payment/src/Payment.Application.Contracts/Samples/SampleDto.cs b/modules/payment/src/Payment.Application.Contracts/Samples/SampleDto.cs
new file mode 100644
index 0000000..d709acf
--- /dev/null
+++ b/modules/payment/src/Payment.Application.Contracts/Samples/SampleDto.cs
@@ -0,0 +1,7 @@
+namespace Payment.Samples
+{
+ public class SampleDto
+ {
+ public int Value { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Application/FodyWeavers.xml b/modules/payment/src/Payment.Application/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/src/Payment.Application/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Application/FodyWeavers.xsd b/modules/payment/src/Payment.Application/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/src/Payment.Application/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Application/Payment.Application.csproj b/modules/payment/src/Payment.Application/Payment.Application.csproj
new file mode 100644
index 0000000..dc0b6f5
--- /dev/null
+++ b/modules/payment/src/Payment.Application/Payment.Application.csproj
@@ -0,0 +1,17 @@
+
+
+
+
+
+ netstandard2.0
+ Payment
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/payment/src/Payment.Application/PaymentAppService.cs b/modules/payment/src/Payment.Application/PaymentAppService.cs
new file mode 100644
index 0000000..45ac236
--- /dev/null
+++ b/modules/payment/src/Payment.Application/PaymentAppService.cs
@@ -0,0 +1,14 @@
+using Payment.Localization;
+using Volo.Abp.Application.Services;
+
+namespace Payment
+{
+ public abstract class PaymentAppService : ApplicationService
+ {
+ protected PaymentAppService()
+ {
+ LocalizationResource = typeof(PaymentResource);
+ ObjectMapperContext = typeof(PaymentApplicationModule);
+ }
+ }
+}
diff --git a/modules/payment/src/Payment.Application/PaymentApplicationAutoMapperProfile.cs b/modules/payment/src/Payment.Application/PaymentApplicationAutoMapperProfile.cs
new file mode 100644
index 0000000..a15ddeb
--- /dev/null
+++ b/modules/payment/src/Payment.Application/PaymentApplicationAutoMapperProfile.cs
@@ -0,0 +1,14 @@
+using AutoMapper;
+
+namespace Payment
+{
+ public class PaymentApplicationAutoMapperProfile : Profile
+ {
+ public PaymentApplicationAutoMapperProfile()
+ {
+ /* You can configure your AutoMapper mapping configuration here.
+ * Alternatively, you can split your mapping configurations
+ * into multiple profile classes for a better organization. */
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Application/PaymentApplicationModule.cs b/modules/payment/src/Payment.Application/PaymentApplicationModule.cs
new file mode 100644
index 0000000..309ee80
--- /dev/null
+++ b/modules/payment/src/Payment.Application/PaymentApplicationModule.cs
@@ -0,0 +1,25 @@
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.Modularity;
+using Volo.Abp.Application;
+
+namespace Payment
+{
+ [DependsOn(
+ typeof(PaymentDomainModule),
+ typeof(PaymentApplicationContractsModule),
+ typeof(AbpDddApplicationModule),
+ typeof(AbpAutoMapperModule)
+ )]
+ public class PaymentApplicationModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAutoMapperObjectMapper();
+ Configure(options =>
+ {
+ options.AddMaps(validate: true);
+ });
+ }
+ }
+}
diff --git a/modules/payment/src/Payment.Application/Samples/SampleAppService.cs b/modules/payment/src/Payment.Application/Samples/SampleAppService.cs
new file mode 100644
index 0000000..a59a125
--- /dev/null
+++ b/modules/payment/src/Payment.Application/Samples/SampleAppService.cs
@@ -0,0 +1,29 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Authorization;
+
+namespace Payment.Samples
+{
+ public class SampleAppService : PaymentAppService, ISampleAppService
+ {
+ public Task GetAsync()
+ {
+ return Task.FromResult(
+ new SampleDto
+ {
+ Value = 42
+ }
+ );
+ }
+
+ [Authorize]
+ public Task GetAuthorizedAsync()
+ {
+ return Task.FromResult(
+ new SampleDto
+ {
+ Value = 42
+ }
+ );
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/FodyWeavers.xml b/modules/payment/src/Payment.Domain.Shared/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/FodyWeavers.xsd b/modules/payment/src/Payment.Domain.Shared/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/ar.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/ar.json
new file mode 100644
index 0000000..33f037e
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/ar.json
@@ -0,0 +1,7 @@
+{
+ "culture": "ar",
+ "texts": {
+ "MyAccount": "إدارة ملفى",
+ "SamplePageMessage": "صفحة نموذجية للوحدة النمطية Payment"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/cs.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/cs.json
new file mode 100644
index 0000000..fa44b2f
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/cs.json
@@ -0,0 +1,7 @@
+{
+ "culture": "cs",
+ "texts": {
+ "MyAccount": "Spravovat profil",
+ "SamplePageMessage": "Ukázková stránka pro modul Payment"
+ }
+}
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/de-DE.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/de-DE.json
new file mode 100644
index 0000000..cd06930
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/de-DE.json
@@ -0,0 +1,7 @@
+{
+ "culture": "de-DE",
+ "texts": {
+ "MyAccount": "Mein Konto",
+ "SamplePageMessage": "Eine Beispielseite für das Modul PaymentModul"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/en-GB.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/en-GB.json
new file mode 100644
index 0000000..1c93a89
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/en-GB.json
@@ -0,0 +1,7 @@
+{
+ "culture": "en-GB",
+ "texts": {
+ "MyAccount": "My account",
+ "SamplePageMessage": "A sample page for the Payment module"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/en.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/en.json
new file mode 100644
index 0000000..0838f51
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/en.json
@@ -0,0 +1,7 @@
+{
+ "culture": "en",
+ "texts": {
+ "MyAccount": "My account",
+ "SamplePageMessage": "A sample page for the Payment module"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/es.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/es.json
new file mode 100644
index 0000000..c126788
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/es.json
@@ -0,0 +1,7 @@
+{
+ "culture": "es",
+ "texts": {
+ "MyAccount": "Mi cuenta",
+ "SamplePageMessage": "Una página de ejemplo para el módulo Payment "
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/fi.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/fi.json
new file mode 100644
index 0000000..1a52ba1
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/fi.json
@@ -0,0 +1,7 @@
+{
+ "culture": "fi",
+ "texts": {
+ "MyAccount": "Tilini",
+ "SamplePageMessage": "Esimerkkisivu Payment-moduulille"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/fr.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/fr.json
new file mode 100644
index 0000000..3e3b5e2
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/fr.json
@@ -0,0 +1,7 @@
+{
+ "culture": "fr",
+ "texts": {
+ "MyAccount": "Mon compte",
+ "SamplePageMessage": "Exemple de page pour le module Payment"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/hi.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/hi.json
new file mode 100644
index 0000000..29d55be
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/hi.json
@@ -0,0 +1,7 @@
+{
+ "culture": "hi",
+ "texts": {
+ "MyAccount": "मेरा खाता",
+ "SamplePageMessage": "Payment मॉड्यूल के लिए एक नमूना पृष्ठ"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/hu.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/hu.json
new file mode 100644
index 0000000..768db7a
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/hu.json
@@ -0,0 +1,7 @@
+{
+ "culture": "hu",
+ "texts": {
+ "MyAccount": "A fiókom",
+ "SamplePageMessage": "Mintaoldal a Payment modulhoz"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/it.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/it.json
new file mode 100644
index 0000000..20626c6
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/it.json
@@ -0,0 +1,7 @@
+{
+ "culture": "it",
+ "texts": {
+ "MyAccount": "Il mio conto",
+ "SamplePageMessage": "Una pagina di esempio per il modulo Payment"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/nl.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/nl.json
new file mode 100644
index 0000000..14526f1
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/nl.json
@@ -0,0 +1,7 @@
+{
+ "culture": "nl",
+ "texts": {
+ "MyAccount": "Mijn rekening",
+ "SamplePageMessage": "Een voorbeeldpagina voor de Payment module"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/pl-PL.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/pl-PL.json
new file mode 100644
index 0000000..3ea7b19
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/pl-PL.json
@@ -0,0 +1,6 @@
+{
+ "culture": "pl-PL",
+ "texts": {
+
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/pt-BR.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/pt-BR.json
new file mode 100644
index 0000000..6d746df
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/pt-BR.json
@@ -0,0 +1,6 @@
+{
+ "culture": "pt-BR",
+ "texts": {
+
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/ro-RO.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/ro-RO.json
new file mode 100644
index 0000000..6891d68
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/ro-RO.json
@@ -0,0 +1,7 @@
+{
+ "culture": "ro-RO",
+ "texts": {
+ "MyAccount": "Contul meu",
+ "SamplePageMessage": "Un exemplu de pagină pentru modululul Payment"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/sk.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/sk.json
new file mode 100644
index 0000000..161a16a
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/sk.json
@@ -0,0 +1,6 @@
+{
+ "culture": "sk",
+ "texts": {
+ "SamplePageMessage": "Ukážka stránky pre modul Payment"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/sl.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/sl.json
new file mode 100644
index 0000000..229c449
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/sl.json
@@ -0,0 +1,6 @@
+{
+ "culture": "sl",
+ "texts": {
+ "MyAccount": "Moj račun"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/tr.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/tr.json
new file mode 100644
index 0000000..821d36b
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/tr.json
@@ -0,0 +1,7 @@
+{
+ "culture": "tr",
+ "texts": {
+ "MyAccount": "Hesabım",
+ "SamplePageMessage": "Payment modulünden örnek bir sayfa"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/vi.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/vi.json
new file mode 100644
index 0000000..d8eb5f3
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/vi.json
@@ -0,0 +1,6 @@
+{
+ "culture": "vi",
+ "texts": {
+
+ }
+}
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/zh-Hans.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/zh-Hans.json
new file mode 100644
index 0000000..83bf721
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/zh-Hans.json
@@ -0,0 +1,7 @@
+{
+ "culture": "zh-Hans",
+ "texts": {
+ "MyAccount": "我的账户",
+ "SamplePageMessage": "Payment模块的示例页面"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/Payment/zh-Hant.json b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/zh-Hant.json
new file mode 100644
index 0000000..699d31e
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/Payment/zh-Hant.json
@@ -0,0 +1,6 @@
+{
+ "culture": "zh-Hant",
+ "texts": {
+ "MyAccount": "我的賬戶"
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain.Shared/Localization/PaymentResource.cs b/modules/payment/src/Payment.Domain.Shared/Localization/PaymentResource.cs
new file mode 100644
index 0000000..2409063
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Localization/PaymentResource.cs
@@ -0,0 +1,10 @@
+using Volo.Abp.Localization;
+
+namespace Payment.Localization
+{
+ [LocalizationResourceName("Payment")]
+ public class PaymentResource
+ {
+
+ }
+}
diff --git a/modules/payment/src/Payment.Domain.Shared/Payment.Domain.Shared.csproj b/modules/payment/src/Payment.Domain.Shared/Payment.Domain.Shared.csproj
new file mode 100644
index 0000000..72dbe45
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/Payment.Domain.Shared.csproj
@@ -0,0 +1,24 @@
+
+
+
+
+
+ netstandard2.0
+ Payment
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/payment/src/Payment.Domain.Shared/PaymentDomainSharedModule.cs b/modules/payment/src/Payment.Domain.Shared/PaymentDomainSharedModule.cs
new file mode 100644
index 0000000..36e5b8d
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/PaymentDomainSharedModule.cs
@@ -0,0 +1,37 @@
+using Volo.Abp.Modularity;
+using Volo.Abp.Localization;
+using Payment.Localization;
+using Volo.Abp.Localization.ExceptionHandling;
+using Volo.Abp.Validation;
+using Volo.Abp.Validation.Localization;
+using Volo.Abp.VirtualFileSystem;
+
+namespace Payment
+{
+ [DependsOn(
+ typeof(AbpValidationModule)
+ )]
+ public class PaymentDomainSharedModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
+
+ Configure(options =>
+ {
+ options.Resources
+ .Add("en")
+ .AddBaseTypes(typeof(AbpValidationResource))
+ .AddVirtualJson("/Localization/Payment");
+ });
+
+ Configure(options =>
+ {
+ options.MapCodeNamespace("Payment", typeof(PaymentResource));
+ });
+ }
+ }
+}
diff --git a/modules/payment/src/Payment.Domain.Shared/PaymentErrorCodes.cs b/modules/payment/src/Payment.Domain.Shared/PaymentErrorCodes.cs
new file mode 100644
index 0000000..24dff63
--- /dev/null
+++ b/modules/payment/src/Payment.Domain.Shared/PaymentErrorCodes.cs
@@ -0,0 +1,7 @@
+namespace Payment
+{
+ public static class PaymentErrorCodes
+ {
+ //Add your business exception error codes here...
+ }
+}
diff --git a/modules/payment/src/Payment.Domain/FodyWeavers.xml b/modules/payment/src/Payment.Domain/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/src/Payment.Domain/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain/FodyWeavers.xsd b/modules/payment/src/Payment.Domain/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/src/Payment.Domain/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain/Payment.Domain.csproj b/modules/payment/src/Payment.Domain/Payment.Domain.csproj
new file mode 100644
index 0000000..80f4d14
--- /dev/null
+++ b/modules/payment/src/Payment.Domain/Payment.Domain.csproj
@@ -0,0 +1,15 @@
+
+
+
+
+
+ netstandard2.0
+ Payment
+
+
+
+
+
+
+
+
diff --git a/modules/payment/src/Payment.Domain/PaymentDbProperties.cs b/modules/payment/src/Payment.Domain/PaymentDbProperties.cs
new file mode 100644
index 0000000..258bc24
--- /dev/null
+++ b/modules/payment/src/Payment.Domain/PaymentDbProperties.cs
@@ -0,0 +1,11 @@
+namespace Payment
+{
+ public static class PaymentDbProperties
+ {
+ public static string DbTablePrefix { get; set; } = "Payment";
+
+ public static string DbSchema { get; set; } = null;
+
+ public const string ConnectionStringName = "Payment";
+ }
+}
diff --git a/modules/payment/src/Payment.Domain/PaymentDomainModule.cs b/modules/payment/src/Payment.Domain/PaymentDomainModule.cs
new file mode 100644
index 0000000..b5a2a41
--- /dev/null
+++ b/modules/payment/src/Payment.Domain/PaymentDomainModule.cs
@@ -0,0 +1,14 @@
+using Volo.Abp.Domain;
+using Volo.Abp.Modularity;
+
+namespace Payment
+{
+ [DependsOn(
+ typeof(AbpDddDomainModule),
+ typeof(PaymentDomainSharedModule)
+ )]
+ public class PaymentDomainModule : AbpModule
+ {
+
+ }
+}
diff --git a/modules/payment/src/Payment.Domain/Settings/PaymentSettingDefinitionProvider.cs b/modules/payment/src/Payment.Domain/Settings/PaymentSettingDefinitionProvider.cs
new file mode 100644
index 0000000..de483ad
--- /dev/null
+++ b/modules/payment/src/Payment.Domain/Settings/PaymentSettingDefinitionProvider.cs
@@ -0,0 +1,14 @@
+using Volo.Abp.Settings;
+
+namespace Payment.Settings
+{
+ public class PaymentSettingDefinitionProvider : SettingDefinitionProvider
+ {
+ public override void Define(ISettingDefinitionContext context)
+ {
+ /* Define module settings here.
+ * Use names from PaymentSettings class.
+ */
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Domain/Settings/PaymentSettings.cs b/modules/payment/src/Payment.Domain/Settings/PaymentSettings.cs
new file mode 100644
index 0000000..51b216b
--- /dev/null
+++ b/modules/payment/src/Payment.Domain/Settings/PaymentSettings.cs
@@ -0,0 +1,11 @@
+namespace Payment.Settings
+{
+ public static class PaymentSettings
+ {
+ public const string GroupName = "Payment";
+
+ /* Add constants for setting names. Example:
+ * public const string MySettingName = GroupName + ".MySettingName";
+ */
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/IPaymentDbContext.cs b/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/IPaymentDbContext.cs
new file mode 100644
index 0000000..3259838
--- /dev/null
+++ b/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/IPaymentDbContext.cs
@@ -0,0 +1,13 @@
+using Volo.Abp.Data;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace Payment.EntityFrameworkCore
+{
+ [ConnectionStringName(PaymentDbProperties.ConnectionStringName)]
+ public interface IPaymentDbContext : IEfCoreDbContext
+ {
+ /* Add DbSet for each Aggregate Root here. Example:
+ * DbSet Questions { get; }
+ */
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentDbContext.cs b/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentDbContext.cs
new file mode 100644
index 0000000..aa87890
--- /dev/null
+++ b/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentDbContext.cs
@@ -0,0 +1,27 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.Data;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace Payment.EntityFrameworkCore
+{
+ [ConnectionStringName(PaymentDbProperties.ConnectionStringName)]
+ public class PaymentDbContext : AbpDbContext, IPaymentDbContext
+ {
+ /* Add DbSet for each Aggregate Root here. Example:
+ * public DbSet Questions { get; set; }
+ */
+
+ public PaymentDbContext(DbContextOptions options)
+ : base(options)
+ {
+
+ }
+
+ protected override void OnModelCreating(ModelBuilder builder)
+ {
+ base.OnModelCreating(builder);
+
+ builder.ConfigurePayment();
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentDbContextModelCreatingExtensions.cs b/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentDbContextModelCreatingExtensions.cs
new file mode 100644
index 0000000..18c6740
--- /dev/null
+++ b/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentDbContextModelCreatingExtensions.cs
@@ -0,0 +1,34 @@
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp;
+
+namespace Payment.EntityFrameworkCore
+{
+ public static class PaymentDbContextModelCreatingExtensions
+ {
+ public static void ConfigurePayment(
+ this ModelBuilder builder)
+ {
+ Check.NotNull(builder, nameof(builder));
+
+ /* Configure all entities here. Example:
+
+ builder.Entity(b =>
+ {
+ //Configure table & schema name
+ b.ToTable(PaymentDbProperties.DbTablePrefix + "Questions", PaymentDbProperties.DbSchema);
+
+ b.ConfigureByConvention();
+
+ //Properties
+ b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength);
+
+ //Relations
+ b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId);
+
+ //Indexes
+ b.HasIndex(q => q.CreationTime);
+ });
+ */
+ }
+ }
+}
diff --git a/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentEntityFrameworkCoreModule.cs b/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentEntityFrameworkCoreModule.cs
new file mode 100644
index 0000000..5925cf4
--- /dev/null
+++ b/modules/payment/src/Payment.EntityFrameworkCore/EntityFrameworkCore/PaymentEntityFrameworkCoreModule.cs
@@ -0,0 +1,23 @@
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.Modularity;
+
+namespace Payment.EntityFrameworkCore
+{
+ [DependsOn(
+ typeof(PaymentDomainModule),
+ typeof(AbpEntityFrameworkCoreModule)
+ )]
+ public class PaymentEntityFrameworkCoreModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAbpDbContext(options =>
+ {
+ /* Add custom repositories here. Example:
+ * options.AddRepository();
+ */
+ });
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.EntityFrameworkCore/FodyWeavers.xml b/modules/payment/src/Payment.EntityFrameworkCore/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/src/Payment.EntityFrameworkCore/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.EntityFrameworkCore/FodyWeavers.xsd b/modules/payment/src/Payment.EntityFrameworkCore/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/src/Payment.EntityFrameworkCore/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.EntityFrameworkCore/Payment.EntityFrameworkCore.csproj b/modules/payment/src/Payment.EntityFrameworkCore/Payment.EntityFrameworkCore.csproj
new file mode 100644
index 0000000..4f69f04
--- /dev/null
+++ b/modules/payment/src/Payment.EntityFrameworkCore/Payment.EntityFrameworkCore.csproj
@@ -0,0 +1,15 @@
+
+
+
+
+
+ net6.0
+ Payment
+
+
+
+
+
+
+
+
diff --git a/modules/payment/src/Payment.HttpApi/FodyWeavers.xml b/modules/payment/src/Payment.HttpApi/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/src/Payment.HttpApi/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.HttpApi/FodyWeavers.xsd b/modules/payment/src/Payment.HttpApi/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/src/Payment.HttpApi/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.HttpApi/Payment.HttpApi.csproj b/modules/payment/src/Payment.HttpApi/Payment.HttpApi.csproj
new file mode 100644
index 0000000..4ff0f8e
--- /dev/null
+++ b/modules/payment/src/Payment.HttpApi/Payment.HttpApi.csproj
@@ -0,0 +1,15 @@
+
+
+
+
+
+ net6.0
+ Payment
+
+
+
+
+
+
+
+
diff --git a/modules/payment/src/Payment.HttpApi/PaymentController.cs b/modules/payment/src/Payment.HttpApi/PaymentController.cs
new file mode 100644
index 0000000..000a3f9
--- /dev/null
+++ b/modules/payment/src/Payment.HttpApi/PaymentController.cs
@@ -0,0 +1,13 @@
+using Payment.Localization;
+using Volo.Abp.AspNetCore.Mvc;
+
+namespace Payment
+{
+ public abstract class PaymentController : AbpControllerBase
+ {
+ protected PaymentController()
+ {
+ LocalizationResource = typeof(PaymentResource);
+ }
+ }
+}
diff --git a/modules/payment/src/Payment.HttpApi/PaymentHttpApiModule.cs b/modules/payment/src/Payment.HttpApi/PaymentHttpApiModule.cs
new file mode 100644
index 0000000..10b41af
--- /dev/null
+++ b/modules/payment/src/Payment.HttpApi/PaymentHttpApiModule.cs
@@ -0,0 +1,33 @@
+using Localization.Resources.AbpUi;
+using Payment.Localization;
+using Volo.Abp.AspNetCore.Mvc;
+using Volo.Abp.Localization;
+using Volo.Abp.Modularity;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace Payment
+{
+ [DependsOn(
+ typeof(PaymentApplicationContractsModule),
+ typeof(AbpAspNetCoreMvcModule))]
+ public class PaymentHttpApiModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ PreConfigure(mvcBuilder =>
+ {
+ mvcBuilder.AddApplicationPartIfNotExists(typeof(PaymentHttpApiModule).Assembly);
+ });
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.Resources
+ .Get()
+ .AddBaseTypes(typeof(AbpUiResource));
+ });
+ }
+ }
+}
diff --git a/modules/payment/src/Payment.HttpApi/Samples/SampleController.cs b/modules/payment/src/Payment.HttpApi/Samples/SampleController.cs
new file mode 100644
index 0000000..4bf9f61
--- /dev/null
+++ b/modules/payment/src/Payment.HttpApi/Samples/SampleController.cs
@@ -0,0 +1,34 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp;
+
+namespace Payment.Samples
+{
+ [Area("Payment")]
+ [RemoteService(Name = PaymentRemoteServiceConsts.RemoteServiceName)]
+ [Route("api/Payment/sample")]
+ public class SampleController : PaymentController, ISampleAppService
+ {
+ private readonly ISampleAppService _sampleAppService;
+
+ public SampleController(ISampleAppService sampleAppService)
+ {
+ _sampleAppService = sampleAppService;
+ }
+
+ [HttpGet]
+ public async Task GetAsync()
+ {
+ return await _sampleAppService.GetAsync();
+ }
+
+ [HttpGet]
+ [Route("authorized")]
+ [Authorize]
+ public async Task GetAuthorizedAsync()
+ {
+ return await _sampleAppService.GetAsync();
+ }
+ }
+}
diff --git a/modules/payment/src/Payment.Web/FodyWeavers.xml b/modules/payment/src/Payment.Web/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/src/Payment.Web/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/FodyWeavers.xsd b/modules/payment/src/Payment.Web/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/src/Payment.Web/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/Menus/PaymentMenuContributor.cs b/modules/payment/src/Payment.Web/Menus/PaymentMenuContributor.cs
new file mode 100644
index 0000000..095aa5c
--- /dev/null
+++ b/modules/payment/src/Payment.Web/Menus/PaymentMenuContributor.cs
@@ -0,0 +1,24 @@
+using System.Threading.Tasks;
+using Volo.Abp.UI.Navigation;
+
+namespace Payment.Web.Menus
+{
+ public class PaymentMenuContributor : IMenuContributor
+ {
+ public async Task ConfigureMenuAsync(MenuConfigurationContext context)
+ {
+ if (context.Menu.Name == StandardMenus.Main)
+ {
+ await ConfigureMainMenuAsync(context);
+ }
+ }
+
+ private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
+ {
+ //Add main menu items.
+ context.Menu.AddItem(new ApplicationMenuItem(PaymentMenus.Prefix, displayName: "Payment", "~/Payment", icon: "fa fa-globe"));
+
+ return Task.CompletedTask;
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/Menus/PaymentMenus.cs b/modules/payment/src/Payment.Web/Menus/PaymentMenus.cs
new file mode 100644
index 0000000..577d6cc
--- /dev/null
+++ b/modules/payment/src/Payment.Web/Menus/PaymentMenus.cs
@@ -0,0 +1,11 @@
+namespace Payment.Web.Menus
+{
+ public class PaymentMenus
+ {
+ public const string Prefix = "Payment";
+
+ //Add your menu items here...
+ //public const string Home = Prefix + ".MyNewMenuItem";
+
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/Pages/Payment/Index.cshtml b/modules/payment/src/Payment.Web/Pages/Payment/Index.cshtml
new file mode 100644
index 0000000..80d5365
--- /dev/null
+++ b/modules/payment/src/Payment.Web/Pages/Payment/Index.cshtml
@@ -0,0 +1,17 @@
+@page
+@using Microsoft.Extensions.Localization
+@using Payment.Localization
+@using Payment.Web.Pages.Payment
+@model Payment.Web.Pages.Payment.IndexModel
+@inject IStringLocalizer L
+
+@section scripts {
+
+
+
+}
+
+@{
+}
+Payment
+@L["SamplePageMessage"]
diff --git a/modules/payment/src/Payment.Web/Pages/Payment/Index.cshtml.cs b/modules/payment/src/Payment.Web/Pages/Payment/Index.cshtml.cs
new file mode 100644
index 0000000..d57c76c
--- /dev/null
+++ b/modules/payment/src/Payment.Web/Pages/Payment/Index.cshtml.cs
@@ -0,0 +1,9 @@
+namespace Payment.Web.Pages.Payment
+{
+ public class IndexModel : PaymentPageModel
+ {
+ public void OnGet()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/Pages/PaymentPageModel.cs b/modules/payment/src/Payment.Web/Pages/PaymentPageModel.cs
new file mode 100644
index 0000000..ae1f6c7
--- /dev/null
+++ b/modules/payment/src/Payment.Web/Pages/PaymentPageModel.cs
@@ -0,0 +1,16 @@
+using Payment.Localization;
+using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
+
+namespace Payment.Web.Pages
+{
+ /* Inherit your PageModel classes from this class.
+ */
+ public abstract class PaymentPageModel : AbpPageModel
+ {
+ protected PaymentPageModel()
+ {
+ LocalizationResourceType = typeof(PaymentResource);
+ ObjectMapperContext = typeof(PaymentWebModule);
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/Pages/_ViewImports.cshtml b/modules/payment/src/Payment.Web/Pages/_ViewImports.cshtml
new file mode 100644
index 0000000..c1da1f5
--- /dev/null
+++ b/modules/payment/src/Payment.Web/Pages/_ViewImports.cshtml
@@ -0,0 +1,4 @@
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
+@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
+@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
+@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/Payment.Web.csproj b/modules/payment/src/Payment.Web/Payment.Web.csproj
new file mode 100644
index 0000000..8989689
--- /dev/null
+++ b/modules/payment/src/Payment.Web/Payment.Web.csproj
@@ -0,0 +1,40 @@
+
+
+
+
+
+ net6.0
+ $(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
+ true
+ Library
+ Payment.Web
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/payment/src/Payment.Web/PaymentWebAutoMapperProfile.cs b/modules/payment/src/Payment.Web/PaymentWebAutoMapperProfile.cs
new file mode 100644
index 0000000..364e293
--- /dev/null
+++ b/modules/payment/src/Payment.Web/PaymentWebAutoMapperProfile.cs
@@ -0,0 +1,14 @@
+using AutoMapper;
+
+namespace Payment.Web
+{
+ public class PaymentWebAutoMapperProfile : Profile
+ {
+ public PaymentWebAutoMapperProfile()
+ {
+ /* You can configure your AutoMapper mapping configuration here.
+ * Alternatively, you can split your mapping configurations
+ * into multiple profile classes for a better organization. */
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/PaymentWebModule.cs b/modules/payment/src/Payment.Web/PaymentWebModule.cs
new file mode 100644
index 0000000..15497f8
--- /dev/null
+++ b/modules/payment/src/Payment.Web/PaymentWebModule.cs
@@ -0,0 +1,59 @@
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.Extensions.DependencyInjection;
+using Payment.Localization;
+using Payment.Web.Menus;
+using Volo.Abp.AspNetCore.Mvc.Localization;
+using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.Modularity;
+using Volo.Abp.UI.Navigation;
+using Volo.Abp.VirtualFileSystem;
+using Payment.Permissions;
+
+namespace Payment.Web
+{
+ [DependsOn(
+ typeof(PaymentApplicationContractsModule),
+ typeof(AbpAspNetCoreMvcUiThemeSharedModule),
+ typeof(AbpAutoMapperModule)
+ )]
+ public class PaymentWebModule : AbpModule
+ {
+ public override void PreConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.PreConfigure(options =>
+ {
+ options.AddAssemblyResource(typeof(PaymentResource), typeof(PaymentWebModule).Assembly);
+ });
+
+ PreConfigure(mvcBuilder =>
+ {
+ mvcBuilder.AddApplicationPartIfNotExists(typeof(PaymentWebModule).Assembly);
+ });
+ }
+
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.MenuContributors.Add(new PaymentMenuContributor());
+ });
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ });
+
+ context.Services.AddAutoMapperObjectMapper();
+ Configure(options =>
+ {
+ options.AddMaps(validate: true);
+ });
+
+ Configure(options =>
+ {
+ //Configure authorization.
+ });
+ }
+ }
+}
diff --git a/modules/payment/src/Payment.Web/Properties/launchSettings.json b/modules/payment/src/Payment.Web/Properties/launchSettings.json
new file mode 100644
index 0000000..a8c7564
--- /dev/null
+++ b/modules/payment/src/Payment.Web/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:64779/",
+ "sslPort": 44326
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Payment.Web": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "https://localhost:5001;http://localhost:5000"
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/src/Payment.Web/wwwroot/client-proxies/Payment-proxy.js b/modules/payment/src/Payment.Web/wwwroot/client-proxies/Payment-proxy.js
new file mode 100644
index 0000000..bd8b2ec
--- /dev/null
+++ b/modules/payment/src/Payment.Web/wwwroot/client-proxies/Payment-proxy.js
@@ -0,0 +1,32 @@
+/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */
+
+
+// module payment
+
+(function(){
+
+ // controller payment.samples.sample
+
+ (function(){
+
+ abp.utils.createNamespace(window, 'payment.samples.sample');
+
+ payment.samples.sample.get = function(ajaxParams) {
+ return abp.ajax($.extend(true, {
+ url: abp.appPath + 'api/Payment/sample',
+ type: 'GET'
+ }, ajaxParams));
+ };
+
+ payment.samples.sample.getAuthorized = function(ajaxParams) {
+ return abp.ajax($.extend(true, {
+ url: abp.appPath + 'api/Payment/sample/authorized',
+ type: 'GET'
+ }, ajaxParams));
+ };
+
+ })();
+
+})();
+
+
diff --git a/modules/payment/test/Payment.Application.Tests/FodyWeavers.xml b/modules/payment/test/Payment.Application.Tests/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/test/Payment.Application.Tests/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/test/Payment.Application.Tests/FodyWeavers.xsd b/modules/payment/test/Payment.Application.Tests/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/test/Payment.Application.Tests/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/test/Payment.Application.Tests/Payment.Application.Tests.csproj b/modules/payment/test/Payment.Application.Tests/Payment.Application.Tests.csproj
new file mode 100644
index 0000000..255e668
--- /dev/null
+++ b/modules/payment/test/Payment.Application.Tests/Payment.Application.Tests.csproj
@@ -0,0 +1,16 @@
+
+
+
+
+
+ net6.0
+ Payment
+
+
+
+
+
+
+
+
+
diff --git a/modules/payment/test/Payment.Application.Tests/PaymentApplicationTestBase.cs b/modules/payment/test/Payment.Application.Tests/PaymentApplicationTestBase.cs
new file mode 100644
index 0000000..27205bf
--- /dev/null
+++ b/modules/payment/test/Payment.Application.Tests/PaymentApplicationTestBase.cs
@@ -0,0 +1,10 @@
+namespace Payment
+{
+ /* Inherit from this class for your application layer tests.
+ * See SampleAppService_Tests for example.
+ */
+ public abstract class PaymentApplicationTestBase : PaymentTestBase
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/test/Payment.Application.Tests/PaymentApplicationTestModule.cs b/modules/payment/test/Payment.Application.Tests/PaymentApplicationTestModule.cs
new file mode 100644
index 0000000..a9dc888
--- /dev/null
+++ b/modules/payment/test/Payment.Application.Tests/PaymentApplicationTestModule.cs
@@ -0,0 +1,13 @@
+using Volo.Abp.Modularity;
+
+namespace Payment
+{
+ [DependsOn(
+ typeof(PaymentApplicationModule),
+ typeof(PaymentDomainTestModule)
+ )]
+ public class PaymentApplicationTestModule : AbpModule
+ {
+
+ }
+}
diff --git a/modules/payment/test/Payment.Application.Tests/Samples/SampleAppService_Tests.cs b/modules/payment/test/Payment.Application.Tests/Samples/SampleAppService_Tests.cs
new file mode 100644
index 0000000..a989392
--- /dev/null
+++ b/modules/payment/test/Payment.Application.Tests/Samples/SampleAppService_Tests.cs
@@ -0,0 +1,30 @@
+using System.Threading.Tasks;
+using Shouldly;
+using Xunit;
+
+namespace Payment.Samples
+{
+ public class SampleAppService_Tests : PaymentApplicationTestBase
+ {
+ private readonly ISampleAppService _sampleAppService;
+
+ public SampleAppService_Tests()
+ {
+ _sampleAppService = GetRequiredService();
+ }
+
+ [Fact]
+ public async Task GetAsync()
+ {
+ var result = await _sampleAppService.GetAsync();
+ result.Value.ShouldBe(42);
+ }
+
+ [Fact]
+ public async Task GetAuthorizedAsync()
+ {
+ var result = await _sampleAppService.GetAuthorizedAsync();
+ result.Value.ShouldBe(42);
+ }
+ }
+}
diff --git a/modules/payment/test/Payment.Domain.Tests/FodyWeavers.xml b/modules/payment/test/Payment.Domain.Tests/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/test/Payment.Domain.Tests/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/test/Payment.Domain.Tests/FodyWeavers.xsd b/modules/payment/test/Payment.Domain.Tests/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/test/Payment.Domain.Tests/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/test/Payment.Domain.Tests/Payment.Domain.Tests.csproj b/modules/payment/test/Payment.Domain.Tests/Payment.Domain.Tests.csproj
new file mode 100644
index 0000000..2265273
--- /dev/null
+++ b/modules/payment/test/Payment.Domain.Tests/Payment.Domain.Tests.csproj
@@ -0,0 +1,15 @@
+
+
+
+
+
+ net6.0
+ Payment
+
+
+
+
+
+
+
+
diff --git a/modules/payment/test/Payment.Domain.Tests/PaymentDomainTestBase.cs b/modules/payment/test/Payment.Domain.Tests/PaymentDomainTestBase.cs
new file mode 100644
index 0000000..f5ff537
--- /dev/null
+++ b/modules/payment/test/Payment.Domain.Tests/PaymentDomainTestBase.cs
@@ -0,0 +1,10 @@
+namespace Payment
+{
+ /* Inherit from this class for your domain layer tests.
+ * See SampleManager_Tests for example.
+ */
+ public abstract class PaymentDomainTestBase : PaymentTestBase
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/test/Payment.Domain.Tests/PaymentDomainTestModule.cs b/modules/payment/test/Payment.Domain.Tests/PaymentDomainTestModule.cs
new file mode 100644
index 0000000..e6809a8
--- /dev/null
+++ b/modules/payment/test/Payment.Domain.Tests/PaymentDomainTestModule.cs
@@ -0,0 +1,17 @@
+using Payment.EntityFrameworkCore;
+using Volo.Abp.Modularity;
+
+namespace Payment
+{
+ /* Domain tests are configured to use the EF Core provider.
+ * You can switch to MongoDB, however your domain tests should be
+ * database independent anyway.
+ */
+ [DependsOn(
+ typeof(PaymentEntityFrameworkCoreTestModule)
+ )]
+ public class PaymentDomainTestModule : AbpModule
+ {
+
+ }
+}
diff --git a/modules/payment/test/Payment.Domain.Tests/Samples/SampleManager_Tests.cs b/modules/payment/test/Payment.Domain.Tests/Samples/SampleManager_Tests.cs
new file mode 100644
index 0000000..476c936
--- /dev/null
+++ b/modules/payment/test/Payment.Domain.Tests/Samples/SampleManager_Tests.cs
@@ -0,0 +1,21 @@
+using System.Threading.Tasks;
+using Xunit;
+
+namespace Payment.Samples
+{
+ public class SampleManager_Tests : PaymentDomainTestBase
+ {
+ //private readonly SampleManager _sampleManager;
+
+ public SampleManager_Tests()
+ {
+ //_sampleManager = GetRequiredService();
+ }
+
+ [Fact]
+ public async Task Method1Async()
+ {
+
+ }
+ }
+}
diff --git a/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/PaymentEntityFrameworkCoreTestBase.cs b/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/PaymentEntityFrameworkCoreTestBase.cs
new file mode 100644
index 0000000..51ccf90
--- /dev/null
+++ b/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/PaymentEntityFrameworkCoreTestBase.cs
@@ -0,0 +1,10 @@
+namespace Payment.EntityFrameworkCore
+{
+ /* This class can be used as a base class for EF Core integration tests,
+ * while SampleRepository_Tests uses a different approach.
+ */
+ public abstract class PaymentEntityFrameworkCoreTestBase : PaymentTestBase
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/PaymentEntityFrameworkCoreTestModule.cs b/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/PaymentEntityFrameworkCoreTestModule.cs
new file mode 100644
index 0000000..a8aa254
--- /dev/null
+++ b/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/PaymentEntityFrameworkCoreTestModule.cs
@@ -0,0 +1,43 @@
+using Microsoft.Data.Sqlite;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore.Sqlite;
+using Volo.Abp.Modularity;
+
+namespace Payment.EntityFrameworkCore
+{
+ [DependsOn(
+ typeof(PaymentTestBaseModule),
+ typeof(PaymentEntityFrameworkCoreModule),
+ typeof(AbpEntityFrameworkCoreSqliteModule)
+ )]
+ public class PaymentEntityFrameworkCoreTestModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ var sqliteConnection = CreateDatabaseAndGetConnection();
+
+ Configure(options =>
+ {
+ options.Configure(abpDbContextConfigurationContext =>
+ {
+ abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection);
+ });
+ });
+ }
+
+ private static SqliteConnection CreateDatabaseAndGetConnection()
+ {
+ var connection = new SqliteConnection("Data Source=:memory:");
+ connection.Open();
+
+ new PaymentDbContext(
+ new DbContextOptionsBuilder().UseSqlite(connection).Options
+ ).GetService().CreateTables();
+
+ return connection;
+ }
+ }
+}
diff --git a/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs b/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs
new file mode 100644
index 0000000..5dcd5b2
--- /dev/null
+++ b/modules/payment/test/Payment.EntityFrameworkCore.Tests/EntityFrameworkCore/Samples/SampleRepository_Tests.cs
@@ -0,0 +1,12 @@
+using Payment.Samples;
+
+namespace Payment.EntityFrameworkCore.Samples
+{
+ public class SampleRepository_Tests : SampleRepository_Tests
+ {
+ /* Don't write custom repository tests here, instead write to
+ * the base class.
+ * One exception can be some specific tests related to EF core.
+ */
+ }
+}
diff --git a/modules/payment/test/Payment.EntityFrameworkCore.Tests/FodyWeavers.xml b/modules/payment/test/Payment.EntityFrameworkCore.Tests/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/test/Payment.EntityFrameworkCore.Tests/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/test/Payment.EntityFrameworkCore.Tests/FodyWeavers.xsd b/modules/payment/test/Payment.EntityFrameworkCore.Tests/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/test/Payment.EntityFrameworkCore.Tests/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/test/Payment.EntityFrameworkCore.Tests/Payment.EntityFrameworkCore.Tests.csproj b/modules/payment/test/Payment.EntityFrameworkCore.Tests/Payment.EntityFrameworkCore.Tests.csproj
new file mode 100644
index 0000000..b6a1feb
--- /dev/null
+++ b/modules/payment/test/Payment.EntityFrameworkCore.Tests/Payment.EntityFrameworkCore.Tests.csproj
@@ -0,0 +1,18 @@
+
+
+
+
+
+ net6.0
+ Payment
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/payment/test/Payment.TestBase/FodyWeavers.xml b/modules/payment/test/Payment.TestBase/FodyWeavers.xml
new file mode 100644
index 0000000..1715698
--- /dev/null
+++ b/modules/payment/test/Payment.TestBase/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/modules/payment/test/Payment.TestBase/FodyWeavers.xsd b/modules/payment/test/Payment.TestBase/FodyWeavers.xsd
new file mode 100644
index 0000000..ffa6fc4
--- /dev/null
+++ b/modules/payment/test/Payment.TestBase/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/payment/test/Payment.TestBase/Payment.TestBase.csproj b/modules/payment/test/Payment.TestBase/Payment.TestBase.csproj
new file mode 100644
index 0000000..4d3acbb
--- /dev/null
+++ b/modules/payment/test/Payment.TestBase/Payment.TestBase.csproj
@@ -0,0 +1,23 @@
+
+
+
+
+
+ net6.0
+ Payment
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/payment/test/Payment.TestBase/PaymentDataSeedContributor.cs b/modules/payment/test/Payment.TestBase/PaymentDataSeedContributor.cs
new file mode 100644
index 0000000..0671855
--- /dev/null
+++ b/modules/payment/test/Payment.TestBase/PaymentDataSeedContributor.cs
@@ -0,0 +1,33 @@
+using System.Threading.Tasks;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Guids;
+using Volo.Abp.MultiTenancy;
+
+namespace Payment
+{
+ public class PaymentDataSeedContributor : IDataSeedContributor, ITransientDependency
+ {
+ private readonly IGuidGenerator _guidGenerator;
+ private readonly ICurrentTenant _currentTenant;
+
+ public PaymentDataSeedContributor(
+ IGuidGenerator guidGenerator, ICurrentTenant currentTenant)
+ {
+ _guidGenerator = guidGenerator;
+ _currentTenant = currentTenant;
+ }
+
+ public Task SeedAsync(DataSeedContext context)
+ {
+ /* Instead of returning the Task.CompletedTask, you can insert your test data
+ * at this point!
+ */
+
+ using (_currentTenant.Change(context?.TenantId))
+ {
+ return Task.CompletedTask;
+ }
+ }
+ }
+}
diff --git a/modules/payment/test/Payment.TestBase/PaymentTestBase.cs b/modules/payment/test/Payment.TestBase/PaymentTestBase.cs
new file mode 100644
index 0000000..5b3dfed
--- /dev/null
+++ b/modules/payment/test/Payment.TestBase/PaymentTestBase.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp;
+using Volo.Abp.Modularity;
+using Volo.Abp.Uow;
+using Volo.Abp.Testing;
+
+namespace Payment
+{
+ /* All test classes are derived from this class, directly or indirectly. */
+ public abstract class PaymentTestBase : AbpIntegratedTest
+ where TStartupModule : IAbpModule
+ {
+ protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
+ {
+ options.UseAutofac();
+ }
+
+ protected virtual Task WithUnitOfWorkAsync(Func func)
+ {
+ return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
+ }
+
+ protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func action)
+ {
+ using (var scope = ServiceProvider.CreateScope())
+ {
+ var uowManager = scope.ServiceProvider.GetRequiredService();
+
+ using (var uow = uowManager.Begin(options))
+ {
+ await action();
+
+ await uow.CompleteAsync();
+ }
+ }
+ }
+
+ protected virtual Task WithUnitOfWorkAsync(Func> func)
+ {
+ return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
+ }
+
+ protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func> func)
+ {
+ using (var scope = ServiceProvider.CreateScope())
+ {
+ var uowManager = scope.ServiceProvider.GetRequiredService();
+
+ using (var uow = uowManager.Begin(options))
+ {
+ var result = await func();
+ await uow.CompleteAsync();
+ return result;
+ }
+ }
+ }
+ }
+}
diff --git a/modules/payment/test/Payment.TestBase/PaymentTestBaseModule.cs b/modules/payment/test/Payment.TestBase/PaymentTestBaseModule.cs
new file mode 100644
index 0000000..a993406
--- /dev/null
+++ b/modules/payment/test/Payment.TestBase/PaymentTestBaseModule.cs
@@ -0,0 +1,42 @@
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp;
+using Volo.Abp.Authorization;
+using Volo.Abp.Autofac;
+using Volo.Abp.Data;
+using Volo.Abp.Modularity;
+using Volo.Abp.Threading;
+
+namespace Payment
+{
+ [DependsOn(
+ typeof(AbpAutofacModule),
+ typeof(AbpTestBaseModule),
+ typeof(AbpAuthorizationModule),
+ typeof(PaymentDomainModule)
+ )]
+ public class PaymentTestBaseModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAlwaysAllowAuthorization();
+ }
+
+ public override void OnApplicationInitialization(ApplicationInitializationContext context)
+ {
+ SeedTestData(context);
+ }
+
+ private static void SeedTestData(ApplicationInitializationContext context)
+ {
+ AsyncHelper.RunSync(async () =>
+ {
+ using (var scope = context.ServiceProvider.CreateScope())
+ {
+ await scope.ServiceProvider
+ .GetRequiredService()
+ .SeedAsync();
+ }
+ });
+ }
+ }
+}
diff --git a/modules/payment/test/Payment.TestBase/Samples/SampleRepository_Tests.cs b/modules/payment/test/Payment.TestBase/Samples/SampleRepository_Tests.cs
new file mode 100644
index 0000000..ef62f66
--- /dev/null
+++ b/modules/payment/test/Payment.TestBase/Samples/SampleRepository_Tests.cs
@@ -0,0 +1,27 @@
+using System.Threading.Tasks;
+using Volo.Abp.Modularity;
+using Xunit;
+
+namespace Payment.Samples
+{
+ /* Write your custom repository tests like that, in this project, as abstract classes.
+ * Then inherit these abstract classes from EF Core & MongoDB test projects.
+ * In this way, both database providers are tests with the same set tests.
+ */
+ public abstract class SampleRepository_Tests : PaymentTestBase
+ where TStartupModule : IAbpModule
+ {
+ //private readonly ISampleRepository _sampleRepository;
+
+ protected SampleRepository_Tests()
+ {
+ //_sampleRepository = GetRequiredService();
+ }
+
+ [Fact]
+ public async Task Method1Async()
+ {
+
+ }
+ }
+}
diff --git a/modules/payment/test/Payment.TestBase/Security/FakeCurrentPrincipalAccessor.cs b/modules/payment/test/Payment.TestBase/Security/FakeCurrentPrincipalAccessor.cs
new file mode 100644
index 0000000..c312464
--- /dev/null
+++ b/modules/payment/test/Payment.TestBase/Security/FakeCurrentPrincipalAccessor.cs
@@ -0,0 +1,43 @@
+using System.Collections.Generic;
+using System.Security.Claims;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Security.Claims;
+
+namespace Payment.Security
+{
+ [Dependency(ReplaceServices = true)]
+ public class FakeCurrentPrincipalAccessor : ThreadCurrentPrincipalAccessor
+ {
+ protected override ClaimsPrincipal GetClaimsPrincipal()
+ {
+ return GetPrincipal();
+ }
+
+ private ClaimsPrincipal _principal;
+
+ private ClaimsPrincipal GetPrincipal()
+ {
+ if (_principal == null)
+ {
+ lock (this)
+ {
+ if (_principal == null)
+ {
+ _principal = new ClaimsPrincipal(
+ new ClaimsIdentity(
+ new List
+ {
+ new Claim(AbpClaimTypes.UserId,"2e701e62-0953-4dd3-910b-dc6cc93ccb0d"),
+ new Claim(AbpClaimTypes.UserName,"admin"),
+ new Claim(AbpClaimTypes.Email,"admin@abp.io")
+ }
+ )
+ );
+ }
+ }
+ }
+
+ return _principal;
+ }
+ }
+}