Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
EShop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
EShop
Commits
3a2b53c3
Commit
3a2b53c3
authored
Apr 17, 2020
by
gdlcf88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Completed entities design
parent
bf640e6b
Changes
102
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
102 changed files
with
2455 additions
and
5 deletions
+2455
-5
BasketItem.cs
...rc/EasyAbp.EShop.Baskets.Domain/BasketItems/BasketItem.cs
+19
-0
OrderStatus.cs
.../EasyAbp.EShop.Orders.Domain.Shared/Orders/OrderStatus.cs
+13
-0
EShopOrdersDomainModule.cs
...rc/EasyAbp.EShop.Orders.Domain/EShopOrdersDomainModule.cs
+4
-2
EasyAbp.EShop.Orders.Domain.csproj
...bp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
+1
-0
Order.cs
...op.Orders/src/EasyAbp.EShop.Orders.Domain/Orders/Order.cs
+41
-0
OrderLine.cs
...rders/src/EasyAbp.EShop.Orders.Domain/Orders/OrderLine.cs
+32
-0
.gitattributes
modules/EasyAbp.EShop.Payment.WeChatPay/.gitattributes
+1
-0
.gitignore
modules/EasyAbp.EShop.Payment.WeChatPay/.gitignore
+258
-0
EasyAbp.EShop.Payment.WeChatPay.sln
...hop.Payment.WeChatPay/EasyAbp.EShop.Payment.WeChatPay.sln
+167
-0
EasyAbp.EShop.Payment.WeChatPay.sln.DotSettings
...WeChatPay/EasyAbp.EShop.Payment.WeChatPay.sln.DotSettings
+23
-0
common.props
modules/EasyAbp.EShop.Payment.WeChatPay/common.props
+12
-0
docker-compose.migrations.yml
...Abp.EShop.Payment.WeChatPay/docker-compose.migrations.yml
+13
-0
docker-compose.override.yml
...syAbp.EShop.Payment.WeChatPay/docker-compose.override.yml
+29
-0
docker-compose.yml
modules/EasyAbp.EShop.Payment.WeChatPay/docker-compose.yml
+25
-0
WeChatPayPermissionDefinitionProvider.cs
...ts/Authorization/WeChatPayPermissionDefinitionProvider.cs
+19
-0
WeChatPayPermissions.cs
...plication.Contracts/Authorization/WeChatPayPermissions.cs
+14
-0
EShopPaymentWeChatPayApplicationContractsModule.cs
...tracts/EShopPaymentWeChatPayApplicationContractsModule.cs
+23
-0
EasyAbp.EShop.Payment.WeChatPay.Application.Contracts.csproj
...yAbp.EShop.Payment.WeChatPay.Application.Contracts.csproj
+16
-0
EShopPaymentWeChatPayApplicationModule.cs
...Pay.Application/EShopPaymentWeChatPayApplicationModule.cs
+25
-0
EasyAbp.EShop.Payment.WeChatPay.Application.csproj
...cation/EasyAbp.EShop.Payment.WeChatPay.Application.csproj
+17
-0
WeChatPayAppService.cs
...Shop.Payment.WeChatPay.Application/WeChatPayAppService.cs
+14
-0
WeChatPayApplicationAutoMapperProfile.cs
...tPay.Application/WeChatPayApplicationAutoMapperProfile.cs
+14
-0
EShopPaymentWeChatPayDomainSharedModule.cs
....Domain.Shared/EShopPaymentWeChatPayDomainSharedModule.cs
+37
-0
EasyAbp.EShop.Payment.WeChatPay.Domain.Shared.csproj
...ared/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared.csproj
+19
-0
cs.json
...nt.WeChatPay.Domain.Shared/Localization/WeChatPay/cs.json
+6
-0
en.json
...nt.WeChatPay.Domain.Shared/Localization/WeChatPay/en.json
+6
-0
pl.json
...nt.WeChatPay.Domain.Shared/Localization/WeChatPay/pl.json
+6
-0
pt-BR.json
...WeChatPay.Domain.Shared/Localization/WeChatPay/pt-BR.json
+6
-0
sl.json
...nt.WeChatPay.Domain.Shared/Localization/WeChatPay/sl.json
+6
-0
tr.json
...nt.WeChatPay.Domain.Shared/Localization/WeChatPay/tr.json
+6
-0
vi.json
...nt.WeChatPay.Domain.Shared/Localization/WeChatPay/vi.json
+6
-0
zh-Hans.json
...ChatPay.Domain.Shared/Localization/WeChatPay/zh-Hans.json
+6
-0
zh-Hant.json
...ChatPay.Domain.Shared/Localization/WeChatPay/zh-Hant.json
+6
-0
WeChatPayResource.cs
...WeChatPay.Domain.Shared/Localization/WeChatPayResource.cs
+10
-0
WeChatPayErrorCodes.cs
...op.Payment.WeChatPay.Domain.Shared/WeChatPayErrorCodes.cs
+7
-0
EShopPaymentWeChatPayDomainModule.cs
...ent.WeChatPay.Domain/EShopPaymentWeChatPayDomainModule.cs
+12
-0
EasyAbp.EShop.Payment.WeChatPay.Domain.csproj
...tPay.Domain/EasyAbp.EShop.Payment.WeChatPay.Domain.csproj
+16
-0
WeChatPaySettingDefinitionProvider.cs
...Pay.Domain/Settings/WeChatPaySettingDefinitionProvider.cs
+14
-0
WeChatPaySettings.cs
...op.Payment.WeChatPay.Domain/Settings/WeChatPaySettings.cs
+11
-0
WeChatPayDbProperties.cs
...p.EShop.Payment.WeChatPay.Domain/WeChatPayDbProperties.cs
+11
-0
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.csproj
...asyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.csproj
+15
-0
EShopPaymentWeChatPayEntityFrameworkCoreModule.cs
...orkCore/EShopPaymentWeChatPayEntityFrameworkCoreModule.cs
+23
-0
IWeChatPayDbContext.cs
...yFrameworkCore/EntityFrameworkCore/IWeChatPayDbContext.cs
+13
-0
WeChatPayDbContext.cs
...tyFrameworkCore/EntityFrameworkCore/WeChatPayDbContext.cs
+27
-0
WeChatPayDbContextModelCreatingExtensions.cs
...rameworkCore/WeChatPayDbContextModelCreatingExtensions.cs
+43
-0
WeChatPayModelBuilderConfigurationOptions.cs
...rameworkCore/WeChatPayModelBuilderConfigurationOptions.cs
+18
-0
EShopPaymentWeChatPayHttpApiClientModule.cs
...ttpApi.Client/EShopPaymentWeChatPayHttpApiClientModule.cs
+22
-0
EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.csproj
...ent/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.csproj
+15
-0
EShopPaymentWeChatPayHttpApiModule.cs
...t.WeChatPay.HttpApi/EShopPaymentWeChatPayHttpApiModule.cs
+33
-0
EasyAbp.EShop.Payment.WeChatPay.HttpApi.csproj
...ay.HttpApi/EasyAbp.EShop.Payment.WeChatPay.HttpApi.csproj
+15
-0
WeChatPayController.cs
...bp.EShop.Payment.WeChatPay.HttpApi/WeChatPayController.cs
+13
-0
EasyAbp.EShop.Payment.WeChatPay.MongoDB.csproj
...ay.MongoDB/EasyAbp.EShop.Payment.WeChatPay.MongoDB.csproj
+15
-0
EShopPaymentWeChatPayMongoDbModule.cs
...Pay.MongoDB/MongoDB/EShopPaymentWeChatPayMongoDbModule.cs
+23
-0
IWeChatPayMongoDbContext.cs
...ent.WeChatPay.MongoDB/MongoDB/IWeChatPayMongoDbContext.cs
+13
-0
WeChatPayMongoDbContext.cs
...ment.WeChatPay.MongoDB/MongoDB/WeChatPayMongoDbContext.cs
+20
-0
WeChatPayMongoDbContextExtensions.cs
...tPay.MongoDB/MongoDB/WeChatPayMongoDbContextExtensions.cs
+22
-0
WeChatPayMongoModelBuilderConfigurationOptions.cs
...MongoDB/WeChatPayMongoModelBuilderConfigurationOptions.cs
+14
-0
EShopPaymentWeChatPayWebModule.cs
...p.Payment.WeChatPay.Web/EShopPaymentWeChatPayWebModule.cs
+57
-0
EasyAbp.EShop.Payment.WeChatPay.Web.csproj
....WeChatPay.Web/EasyAbp.EShop.Payment.WeChatPay.Web.csproj
+42
-0
Index.cshtml
....EShop.Payment.WeChatPay.Web/Pages/WeChatPay/Index.cshtml
+7
-0
Index.cshtml.cs
...hop.Payment.WeChatPay.Web/Pages/WeChatPay/Index.cshtml.cs
+9
-0
_ViewImports.cshtml
...Payment.WeChatPay.Web/Pages/WeChatPay/_ViewImports.cshtml
+4
-0
WeChatPayPage.cs
...asyAbp.EShop.Payment.WeChatPay.Web/Pages/WeChatPayPage.cs
+16
-0
WeChatPayPageModel.cs
...p.EShop.Payment.WeChatPay.Web/Pages/WeChatPayPageModel.cs
+16
-0
launchSettings.json
...Shop.Payment.WeChatPay.Web/Properties/launchSettings.json
+27
-0
WeChatPayMenuContributor.cs
...p.EShop.Payment.WeChatPay.Web/WeChatPayMenuContributor.cs
+23
-0
WeChatPayWebAutoMapperProfile.cs
...op.Payment.WeChatPay.Web/WeChatPayWebAutoMapperProfile.cs
+14
-0
EShopPaymentWeChatPayApplicationTestModule.cs
...ation.Tests/EShopPaymentWeChatPayApplicationTestModule.cs
+13
-0
EasyAbp.EShop.Payment.WeChatPay.Application.Tests.csproj
.../EasyAbp.EShop.Payment.WeChatPay.Application.Tests.csproj
+16
-0
WeChatPayApplicationTestBase.cs
...ChatPay.Application.Tests/WeChatPayApplicationTestBase.cs
+10
-0
EShopPaymentWeChatPayDomainTestModule.cs
...Pay.Domain.Tests/EShopPaymentWeChatPayDomainTestModule.cs
+17
-0
EasyAbp.EShop.Payment.WeChatPay.Domain.Tests.csproj
...Tests/EasyAbp.EShop.Payment.WeChatPay.Domain.Tests.csproj
+15
-0
WeChatPayDomainTestBase.cs
...Payment.WeChatPay.Domain.Tests/WeChatPayDomainTestBase.cs
+10
-0
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.Tests.csproj
....EShop.Payment.WeChatPay.EntityFrameworkCore.Tests.csproj
+19
-0
EShopPaymentWeChatPayEntityFrameworkCoreTestModule.cs
...ore/EShopPaymentWeChatPayEntityFrameworkCoreTestModule.cs
+41
-0
WeChatPayEntityFrameworkCoreTestBase.cs
...tityFrameworkCore/WeChatPayEntityFrameworkCoreTestBase.cs
+10
-0
ClientDemoService.cs
...hatPay.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs
+146
-0
ConsoleTestAppHostedService.cs
...pApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs
+26
-0
EShopPaymentWeChatPayConsoleApiClientModule.cs
...oleTestApp/EShopPaymentWeChatPayConsoleApiClientModule.cs
+14
-0
EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp.csproj
...op.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp.csproj
+26
-0
Program.cs
...ayment.WeChatPay.HttpApi.Client.ConsoleTestApp/Program.cs
+21
-0
appsettings.json
....WeChatPay.HttpApi.Client.ConsoleTestApp/appsettings.json
+21
-0
EasyAbp.EShop.Payment.WeChatPay.MongoDB.Tests.csproj
...ests/EasyAbp.EShop.Payment.WeChatPay.MongoDB.Tests.csproj
+17
-0
EShopPaymentWeChatPayMongoDbTestModule.cs
...B.Tests/MongoDB/EShopPaymentWeChatPayMongoDbTestModule.cs
+29
-0
WeChatPayMongoDbTestBase.cs
...ChatPay.MongoDB.Tests/MongoDB/WeChatPayMongoDbTestBase.cs
+10
-0
EShopPaymentWeChatPayTestBaseModule.cs
...WeChatPay.TestBase/EShopPaymentWeChatPayTestBaseModule.cs
+42
-0
EasyAbp.EShop.Payment.WeChatPay.TestBase.csproj
....TestBase/EasyAbp.EShop.Payment.WeChatPay.TestBase.csproj
+23
-0
FakeCurrentPrincipalAccessor.cs
...ChatPay.TestBase/Security/FakeCurrentPrincipalAccessor.cs
+39
-0
WeChatPayDataSeedContributor.cs
...ayment.WeChatPay.TestBase/WeChatPayDataSeedContributor.cs
+27
-0
WeChatPayTestBase.cs
...Abp.EShop.Payment.WeChatPay.TestBase/WeChatPayTestBase.cs
+60
-0
EasyAbp.EShop.Payment.Abstractions.csproj
...nt.Abstractions/EasyAbp.EShop.Payment.Abstractions.csproj
+10
-0
IPaymentServiceProvider.cs
...ractions/EasyAbp/EShop/Payment/IPaymentServiceProvider.cs
+7
-0
FodyWeavers.xml
...nt/src/EasyAbp.EShop.Payment.Abstractions/FodyWeavers.xml
+3
-0
FodyWeavers.xsd
...nt/src/EasyAbp.EShop.Payment.Abstractions/FodyWeavers.xsd
+30
-0
EShopPaymentDomainModule.cs
.../EasyAbp.EShop.Payment.Domain/EShopPaymentDomainModule.cs
+4
-2
EasyAbp.EShop.Payment.Domain.csproj
....EShop.Payment.Domain/EasyAbp.EShop.Payment.Domain.csproj
+2
-0
FreePaymentServiceProvider.cs
...asyAbp.EShop.Payment.Domain/FreePaymentServiceProvider.cs
+7
-0
PaymentRecordOrder.cs
....Payment.Domain/PaymentRecordOrders/PaymentRecordOrder.cs
+24
-0
PaymentRecord.cs
...yAbp.EShop.Payment.Domain/PaymentRecords/PaymentRecord.cs
+27
-0
RefundRecord.cs
...asyAbp.EShop.Payment.Domain/RefundRecords/RefundRecord.cs
+31
-0
InventoryStrategy.cs
...Shop.Products.Domain.Shared/Products/InventoryStrategy.cs
+4
-1
EasyMall.sln
samples/EasyMall/aspnet-core/EasyMall.sln
+124
-0
No files found.
modules/EasyAbp.EShop.Baskets/src/EasyAbp.EShop.Baskets.Domain/BasketItems/BasketItem.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
Volo.Abp.Domain.Entities.Auditing
;
using
Volo.Abp.MultiTenancy
;
namespace
EasyAbp.EShop.Baskets.BasketItems
{
public
class
BasketItem
:
CreationAuditedAggregateRoot
<
Guid
>,
IMultiTenant
{
public
virtual
Guid
?
TenantId
{
get
;
protected
set
;
}
public
virtual
Guid
UserId
{
get
;
protected
set
;
}
public
virtual
Guid
ProductId
{
get
;
protected
set
;
}
public
virtual
Guid
ProductSkuId
{
get
;
protected
set
;
}
public
virtual
int
Quantity
{
get
;
protected
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/Orders/OrderStatus.cs
0 → 100644
View file @
3a2b53c3
using
System
;
namespace
EasyAbp.EShop.Orders.Orders
{
[
Flags
]
public
enum
OrderStatus
{
Pending
=
1
,
Processing
=
2
,
Completed
=
4
,
Cancelled
=
8
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EShopOrdersDomainModule.cs
View file @
3a2b53c3
using
Volo.Abp.Modularity
;
using
EasyAbp.EShop.Stores
;
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Orders
namespace
EasyAbp.EShop.Orders
{
{
[
DependsOn
(
[
DependsOn
(
typeof
(
EShopOrdersDomainSharedModule
)
typeof
(
EShopOrdersDomainSharedModule
),
typeof
(
EShopStoresDomainSharedModule
)
)]
)]
public
class
EShopOrdersDomainModule
:
AbpModule
public
class
EShopOrdersDomainModule
:
AbpModule
{
{
...
...
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp.EShop.Orders.Domain.csproj
View file @
3a2b53c3
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="2.5.0" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="2.5.0" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Domain.Shared\EasyAbp.EShop.Orders.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Orders.Domain.Shared\EasyAbp.EShop.Orders.Domain.Shared.csproj" />
</ItemGroup>
</ItemGroup>
...
...
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/Orders/Order.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
EasyAbp.EShop.Stores.Stores
;
using
JetBrains.Annotations
;
using
Volo.Abp.Domain.Entities.Auditing
;
using
Volo.Abp.MultiTenancy
;
namespace
EasyAbp.EShop.Orders.Orders
{
public
class
Order
:
FullAuditedAggregateRoot
<
Guid
>,
IMultiTenant
,
IMultiStore
{
public
virtual
Guid
?
TenantId
{
get
;
protected
set
;
}
public
virtual
Guid
?
StoreId
{
get
;
protected
set
;
}
public
virtual
Guid
CustomerUserId
{
get
;
protected
set
;
}
public
virtual
OrderStatus
OrderStatus
{
get
;
protected
set
;
}
public
virtual
bool
NeedShipping
{
get
;
protected
set
;
}
public
virtual
Guid
?
ShippingAddressId
{
get
;
protected
set
;
}
public
virtual
Guid
?
ShippingMethodId
{
get
;
protected
set
;
}
public
virtual
decimal
Freight
{
get
;
protected
set
;
}
public
virtual
decimal
ProductTotalPrice
{
get
;
protected
set
;
}
public
virtual
decimal
TotalDiscount
{
get
;
protected
set
;
}
public
virtual
decimal
TotalPrice
{
get
;
protected
set
;
}
public
virtual
decimal
RefundedAmount
{
get
;
protected
set
;
}
[
CanBeNull
]
public
virtual
string
CustomerRemark
{
get
;
protected
set
;
}
[
CanBeNull
]
public
virtual
string
StaffRemark
{
get
;
protected
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/Orders/OrderLine.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
JetBrains.Annotations
;
using
Volo.Abp.Domain.Entities.Auditing
;
namespace
EasyAbp.EShop.Orders.Orders
{
public
class
OrderLine
:
FullAuditedEntity
<
Guid
>
{
public
virtual
Guid
OrderId
{
get
;
protected
set
;
}
public
virtual
Guid
ProductId
{
get
;
protected
set
;
}
public
virtual
Guid
ProductSkuId
{
get
;
protected
set
;
}
[
NotNull
]
public
virtual
string
ProductName
{
get
;
protected
set
;
}
[
CanBeNull
]
public
virtual
string
SkuDescription
{
get
;
protected
set
;
}
[
CanBeNull
]
public
virtual
string
MediaResources
{
get
;
protected
set
;
}
public
virtual
decimal
UnitPrice
{
get
;
protected
set
;
}
public
virtual
decimal
TotalPrice
{
get
;
protected
set
;
}
public
virtual
decimal
TotalDiscount
{
get
;
protected
set
;
}
public
virtual
int
Quantity
{
get
;
protected
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/.gitattributes
0 → 100644
View file @
3a2b53c3
**/wwwroot/libs/** linguist-vendored
modules/EasyAbp.EShop.Payment.WeChatPay/.gitignore
0 → 100644
View file @
3a2b53c3
## 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
# WeChatPay
host/EasyAbp.EShop.Payment.WeChatPay.IdentityServer/Logs/logs.txt
host/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Host/Logs/logs.txt
host/EasyAbp.EShop.Payment.WeChatPay.Web.Host/Logs/logs.txt
host/EasyAbp.EShop.Payment.WeChatPay.Web.Unified/Logs/logs.txt
modules/EasyAbp.EShop.Payment.WeChatPay/EasyAbp.EShop.Payment.WeChatPay.sln
0 → 100644
View file @
3a2b53c3
This diff is collapsed.
Click to expand it.
modules/EasyAbp.EShop.Payment.WeChatPay/EasyAbp.EShop.Payment.WeChatPay.sln.DotSettings
0 → 100644
View file @
3a2b53c3
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceDoWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceFixedStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceIfStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceLockStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceUsingStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_REDUNDANT/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Overrides/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
</wpf:ResourceDictionary>
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/common.props
0 → 100644
View file @
3a2b53c3
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" PrivateAssets="All" />
</ItemGroup>
</Project>
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/docker-compose.migrations.yml
0 → 100644
View file @
3a2b53c3
version
:
'
3.4'
services
:
migrations
:
build
:
context
:
../../
dockerfile
:
templates/service/database/Dockerfile
depends_on
:
-
sqlserver
environment
:
-
IdentityServer_DB=WeChatPay_Identity
-
WeChatPay_DB=WeChatPay_ModuleDb
-
SA_PASSWORD=yourStrong(!)Password
modules/EasyAbp.EShop.Payment.WeChatPay/docker-compose.override.yml
0 → 100644
View file @
3a2b53c3
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=WeChatPay_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false
-
ConnectionStrings__SqlServerCache=Server=sqlserver;Database=WeChatPay_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false
ports
:
-
"
51600:80"
we-chat-pay
:
environment
:
-
ASPNETCORE_URLS=http://0.0.0.0:80
-
ConnectionStrings__Default=Server=sqlserver;Database=WeChatPay_ModuleDb;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false
-
ConnectionStrings__AbpSettingManagement=Server=sqlserver;Database=WeChatPay_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false
-
ConnectionStrings__AbpPermissionManagement=Server=sqlserver;Database=WeChatPay_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false
-
ConnectionStrings__AbpAuditLogging=Server=sqlserver;Database=WeChatPay_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false
-
ConnectionStrings__SqlServerCache=Server=sqlserver;Database=WeChatPay_Cache;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated Security=false
-
AuthServer__Authority=http://identity-server
ports
:
-
"
51601:80"
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/docker-compose.yml
0 → 100644
View file @
3a2b53c3
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
we-chat-pay
:
build
:
context
:
../../
dockerfile
:
templates/service/host/EasyAbp.EShop.Payment.WeChatPay.Host/Dockerfile
depends_on
:
-
sqlserver
-
identity-server
volumes
:
dbdata
:
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Application.Contracts/Authorization/WeChatPayPermissionDefinitionProvider.cs
0 → 100644
View file @
3a2b53c3
using
EasyAbp.EShop.Payment.WeChatPay.Localization
;
using
Volo.Abp.Authorization.Permissions
;
using
Volo.Abp.Localization
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Authorization
{
public
class
WeChatPayPermissionDefinitionProvider
:
PermissionDefinitionProvider
{
public
override
void
Define
(
IPermissionDefinitionContext
context
)
{
//var moduleGroup = context.AddGroup(WeChatPayPermissions.GroupName, L("Permission:WeChatPay"));
}
private
static
LocalizableString
L
(
string
name
)
{
return
LocalizableString
.
Create
<
WeChatPayResource
>(
name
);
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Application.Contracts/Authorization/WeChatPayPermissions.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Reflection
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Authorization
{
public
class
WeChatPayPermissions
{
public
const
string
GroupName
=
"WeChatPay"
;
public
static
string
[]
GetAll
()
{
return
ReflectionHelper
.
GetPublicConstantsRecursively
(
typeof
(
WeChatPayPermissions
));
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Application.Contracts/EShopPaymentWeChatPayApplicationContractsModule.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Application
;
using
Volo.Abp.Modularity
;
using
Volo.Abp.VirtualFileSystem
;
using
Volo.Abp.Authorization
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayDomainSharedModule
),
typeof
(
AbpDddApplicationContractsModule
),
typeof
(
AbpAuthorizationModule
)
)]
public
class
EShopPaymentWeChatPayApplicationContractsModule
:
AbpModule
{
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
Configure
<
AbpVirtualFileSystemOptions
>(
options
=>
{
options
.
FileSets
.
AddEmbedded
<
EShopPaymentWeChatPayApplicationContractsModule
>(
"EasyAbp.EShop.Payment.WeChatPay"
);
});
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Application.Contracts/EasyAbp.EShop.Payment.WeChatPay.Application.Contracts.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="2.5.0" />
<PackageReference Include="Volo.Abp.Authorization" Version="2.5.0" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Domain.Shared\EasyAbp.EShop.Payment.WeChatPay.Domain.Shared.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Application/EShopPaymentWeChatPayApplicationModule.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.Extensions.DependencyInjection
;
using
Volo.Abp.AutoMapper
;
using
Volo.Abp.Modularity
;
using
Volo.Abp.Application
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayDomainModule
),
typeof
(
EShopPaymentWeChatPayApplicationContractsModule
),
typeof
(
AbpDddApplicationModule
),
typeof
(
AbpAutoMapperModule
)
)]
public
class
EShopPaymentWeChatPayApplicationModule
:
AbpModule
{
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
context
.
Services
.
AddAutoMapperObjectMapper
<
EShopPaymentWeChatPayApplicationModule
>();
Configure
<
AbpAutoMapperOptions
>(
options
=>
{
options
.
AddMaps
<
EShopPaymentWeChatPayApplicationModule
>(
validate
:
true
);
});
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Application/EasyAbp.EShop.Payment.WeChatPay.Application.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.5.0" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="2.5.0" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Application.Contracts\EasyAbp.EShop.Payment.WeChatPay.Application.Contracts.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Domain\EasyAbp.EShop.Payment.WeChatPay.Domain.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Application/WeChatPayAppService.cs
0 → 100644
View file @
3a2b53c3
using
EasyAbp.EShop.Payment.WeChatPay.Localization
;
using
Volo.Abp.Application.Services
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
public
abstract
class
WeChatPayAppService
:
ApplicationService
{
protected
WeChatPayAppService
()
{
LocalizationResource
=
typeof
(
WeChatPayResource
);
ObjectMapperContext
=
typeof
(
EShopPaymentWeChatPayApplicationModule
);
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Application/WeChatPayApplicationAutoMapperProfile.cs
0 → 100644
View file @
3a2b53c3
using
AutoMapper
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
public
class
WeChatPayApplicationAutoMapperProfile
:
Profile
{
public
WeChatPayApplicationAutoMapperProfile
()
{
/* 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
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/EShopPaymentWeChatPayDomainSharedModule.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Modularity
;
using
Volo.Abp.Localization
;
using
EasyAbp.EShop.Payment.WeChatPay.Localization
;
using
Volo.Abp.Localization.ExceptionHandling
;
using
Volo.Abp.Validation
;
using
Volo.Abp.Validation.Localization
;
using
Volo.Abp.VirtualFileSystem
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
AbpValidationModule
)
)]
public
class
EShopPaymentWeChatPayDomainSharedModule
:
AbpModule
{
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
Configure
<
AbpVirtualFileSystemOptions
>(
options
=>
{
options
.
FileSets
.
AddEmbedded
<
EShopPaymentWeChatPayDomainSharedModule
>(
"EasyAbp.EShop.Payment.WeChatPay"
);
});
Configure
<
AbpLocalizationOptions
>(
options
=>
{
options
.
Resources
.
Add
<
WeChatPayResource
>(
"en"
)
.
AddBaseTypes
(
typeof
(
AbpValidationResource
))
.
AddVirtualJson
(
"/Localization/WeChatPay"
);
});
Configure
<
AbpExceptionLocalizationOptions
>(
options
=>
{
options
.
MapCodeNamespace
(
"WeChatPay"
,
typeof
(
WeChatPayResource
));
});
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Validation" Version="2.5.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\WeChatPay\*.json" />
<Content Remove="Localization\WeChatPay\*.json" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/cs.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"cs"
,
"texts"
:
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/en.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"en"
,
"texts"
:
{
"ManageYourProfile"
:
"Manage your profile"
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/pl.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"pl"
,
"texts"
:
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/pt-BR.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"pt-BR"
,
"texts"
:
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/sl.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"sl"
,
"texts"
:
{
"ManageYourProfile"
:
"Upravljajte svojim profilom"
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/tr.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"tr"
,
"texts"
:
{
"ManageYourProfile"
:
"Profil ynetimi"
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/vi.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"vi"
,
"texts"
:
{
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/zh-Hans.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"zh-Hans"
,
"texts"
:
{
"ManageYourProfile"
:
"管理个人资料"
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPay/zh-Hant.json
0 → 100644
View file @
3a2b53c3
{
"culture"
:
"zh-Hant"
,
"texts"
:
{
"ManageYourProfile"
:
"管理個人資料"
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/Localization/WeChatPayResource.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Localization
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Localization
{
[
LocalizationResourceName
(
"WeChatPay"
)]
public
class
WeChatPayResource
{
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain.Shared/WeChatPayErrorCodes.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment.WeChatPay
{
public
static
class
WeChatPayErrorCodes
{
//Add your business exception error codes here...
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain/EShopPaymentWeChatPayDomainModule.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayDomainSharedModule
)
)]
public
class
EShopPaymentWeChatPayDomainModule
:
AbpModule
{
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain/EasyAbp.EShop.Payment.WeChatPay.Domain.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="2.5.0" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payment\src\EasyAbp.EShop.Payment.Abstractions\EasyAbp.EShop.Payment.Abstractions.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Domain.Shared\EasyAbp.EShop.Payment.WeChatPay.Domain.Shared.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain/Settings/WeChatPaySettingDefinitionProvider.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Settings
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Settings
{
public
class
WeChatPaySettingDefinitionProvider
:
SettingDefinitionProvider
{
public
override
void
Define
(
ISettingDefinitionContext
context
)
{
/* Define module settings here.
* Use names from WeChatPaySettings class.
*/
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain/Settings/WeChatPaySettings.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment.WeChatPay.Settings
{
public
static
class
WeChatPaySettings
{
public
const
string
GroupName
=
"WeChatPay"
;
/* Add constants for setting names. Example:
* public const string MySettingName = GroupName + ".MySettingName";
*/
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Domain/WeChatPayDbProperties.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment.WeChatPay
{
public
static
class
WeChatPayDbProperties
{
public
static
string
DbTablePrefix
{
get
;
set
;
}
=
"WeChatPay"
;
public
static
string
DbSchema
{
get
;
set
;
}
=
null
;
public
const
string
ConnectionStringName
=
"WeChatPay"
;
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="2.5.0" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Domain\EasyAbp.EShop.Payment.WeChatPay.Domain.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore/EntityFrameworkCore/EShopPaymentWeChatPayEntityFrameworkCoreModule.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.Extensions.DependencyInjection
;
using
Volo.Abp.EntityFrameworkCore
;
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayDomainModule
),
typeof
(
AbpEntityFrameworkCoreModule
)
)]
public
class
EShopPaymentWeChatPayEntityFrameworkCoreModule
:
AbpModule
{
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
context
.
Services
.
AddAbpDbContext
<
WeChatPayDbContext
>(
options
=>
{
/* Add custom repositories here. Example:
* options.AddRepository<Question, EfCoreQuestionRepository>();
*/
});
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore/EntityFrameworkCore/IWeChatPayDbContext.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Data
;
using
Volo.Abp.EntityFrameworkCore
;
namespace
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore
{
[
ConnectionStringName
(
WeChatPayDbProperties
.
ConnectionStringName
)]
public
interface
IWeChatPayDbContext
:
IEfCoreDbContext
{
/* Add DbSet for each Aggregate Root here. Example:
* DbSet<Question> Questions { get; }
*/
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore/EntityFrameworkCore/WeChatPayDbContext.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.EntityFrameworkCore
;
using
Volo.Abp.Data
;
using
Volo.Abp.EntityFrameworkCore
;
namespace
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore
{
[
ConnectionStringName
(
WeChatPayDbProperties
.
ConnectionStringName
)]
public
class
WeChatPayDbContext
:
AbpDbContext
<
WeChatPayDbContext
>,
IWeChatPayDbContext
{
/* Add DbSet for each Aggregate Root here. Example:
* public DbSet<Question> Questions { get; set; }
*/
public
WeChatPayDbContext
(
DbContextOptions
<
WeChatPayDbContext
>
options
)
:
base
(
options
)
{
}
protected
override
void
OnModelCreating
(
ModelBuilder
builder
)
{
base
.
OnModelCreating
(
builder
);
builder
.
ConfigureWeChatPay
();
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore/EntityFrameworkCore/WeChatPayDbContextModelCreatingExtensions.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
Microsoft.EntityFrameworkCore
;
using
Volo.Abp
;
namespace
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore
{
public
static
class
WeChatPayDbContextModelCreatingExtensions
{
public
static
void
ConfigureWeChatPay
(
this
ModelBuilder
builder
,
Action
<
WeChatPayModelBuilderConfigurationOptions
>
optionsAction
=
null
)
{
Check
.
NotNull
(
builder
,
nameof
(
builder
));
var
options
=
new
WeChatPayModelBuilderConfigurationOptions
(
WeChatPayDbProperties
.
DbTablePrefix
,
WeChatPayDbProperties
.
DbSchema
);
optionsAction
?.
Invoke
(
options
);
/* Configure all entities here. Example:
builder.Entity<Question>(b =>
{
//Configure table & schema name
b.ToTable(options.TablePrefix + "Questions", options.Schema);
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);
});
*/
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore/EntityFrameworkCore/WeChatPayModelBuilderConfigurationOptions.cs
0 → 100644
View file @
3a2b53c3
using
JetBrains.Annotations
;
using
Volo.Abp.EntityFrameworkCore.Modeling
;
namespace
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore
{
public
class
WeChatPayModelBuilderConfigurationOptions
:
AbpModelBuilderConfigurationOptions
{
public
WeChatPayModelBuilderConfigurationOptions
(
[
NotNull
]
string
tablePrefix
=
""
,
[
CanBeNull
]
string
schema
=
null
)
:
base
(
tablePrefix
,
schema
)
{
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client/EShopPaymentWeChatPayHttpApiClientModule.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.Extensions.DependencyInjection
;
using
Volo.Abp.Http.Client
;
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayApplicationContractsModule
),
typeof
(
AbpHttpClientModule
))]
public
class
EShopPaymentWeChatPayHttpApiClientModule
:
AbpModule
{
public
const
string
RemoteServiceName
=
"WeChatPay"
;
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
context
.
Services
.
AddHttpClientProxies
(
typeof
(
EShopPaymentWeChatPayApplicationContractsModule
).
Assembly
,
RemoteServiceName
);
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" Version="2.5.0" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Application.Contracts\EasyAbp.EShop.Payment.WeChatPay.Application.Contracts.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.HttpApi/EShopPaymentWeChatPayHttpApiModule.cs
0 → 100644
View file @
3a2b53c3
using
Localization.Resources.AbpUi
;
using
EasyAbp.EShop.Payment.WeChatPay.Localization
;
using
Volo.Abp.AspNetCore.Mvc
;
using
Volo.Abp.Localization
;
using
Volo.Abp.Modularity
;
using
Microsoft.Extensions.DependencyInjection
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayApplicationContractsModule
),
typeof
(
AbpAspNetCoreMvcModule
))]
public
class
EShopPaymentWeChatPayHttpApiModule
:
AbpModule
{
public
override
void
PreConfigureServices
(
ServiceConfigurationContext
context
)
{
PreConfigure
<
IMvcBuilder
>(
mvcBuilder
=>
{
mvcBuilder
.
AddApplicationPartIfNotExists
(
typeof
(
EShopPaymentWeChatPayHttpApiModule
).
Assembly
);
});
}
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
Configure
<
AbpLocalizationOptions
>(
options
=>
{
options
.
Resources
.
Get
<
WeChatPayResource
>()
.
AddBaseTypes
(
typeof
(
AbpUiResource
));
});
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.HttpApi/EasyAbp.EShop.Payment.WeChatPay.HttpApi.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="2.5.0" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Application.Contracts\EasyAbp.EShop.Payment.WeChatPay.Application.Contracts.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.HttpApi/WeChatPayController.cs
0 → 100644
View file @
3a2b53c3
using
EasyAbp.EShop.Payment.WeChatPay.Localization
;
using
Volo.Abp.AspNetCore.Mvc
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
public
abstract
class
WeChatPayController
:
AbpController
{
protected
WeChatPayController
()
{
LocalizationResource
=
typeof
(
WeChatPayResource
);
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.MongoDB/EasyAbp.EShop.Payment.WeChatPay.MongoDB.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.MongoDB" Version="2.5.0" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Domain\EasyAbp.EShop.Payment.WeChatPay.Domain.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.MongoDB/MongoDB/EShopPaymentWeChatPayMongoDbModule.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.Extensions.DependencyInjection
;
using
Volo.Abp.Modularity
;
using
Volo.Abp.MongoDB
;
namespace
EasyAbp.EShop.Payment.WeChatPay.MongoDB
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayDomainModule
),
typeof
(
AbpMongoDbModule
)
)]
public
class
EShopPaymentWeChatPayMongoDbModule
:
AbpModule
{
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
context
.
Services
.
AddMongoDbContext
<
WeChatPayMongoDbContext
>(
options
=>
{
/* Add custom repositories here. Example:
* options.AddRepository<Question, MongoQuestionRepository>();
*/
});
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.MongoDB/MongoDB/IWeChatPayMongoDbContext.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Data
;
using
Volo.Abp.MongoDB
;
namespace
EasyAbp.EShop.Payment.WeChatPay.MongoDB
{
[
ConnectionStringName
(
WeChatPayDbProperties
.
ConnectionStringName
)]
public
interface
IWeChatPayMongoDbContext
:
IAbpMongoDbContext
{
/* Define mongo collections here. Example:
* IMongoCollection<Question> Questions { get; }
*/
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.MongoDB/MongoDB/WeChatPayMongoDbContext.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Data
;
using
Volo.Abp.MongoDB
;
namespace
EasyAbp.EShop.Payment.WeChatPay.MongoDB
{
[
ConnectionStringName
(
WeChatPayDbProperties
.
ConnectionStringName
)]
public
class
WeChatPayMongoDbContext
:
AbpMongoDbContext
,
IWeChatPayMongoDbContext
{
/* Add mongo collections here. Example:
* public IMongoCollection<Question> Questions => Collection<Question>();
*/
protected
override
void
CreateModel
(
IMongoModelBuilder
modelBuilder
)
{
base
.
CreateModel
(
modelBuilder
);
modelBuilder
.
ConfigureWeChatPay
();
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.MongoDB/MongoDB/WeChatPayMongoDbContextExtensions.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
Volo.Abp
;
using
Volo.Abp.MongoDB
;
namespace
EasyAbp.EShop.Payment.WeChatPay.MongoDB
{
public
static
class
WeChatPayMongoDbContextExtensions
{
public
static
void
ConfigureWeChatPay
(
this
IMongoModelBuilder
builder
,
Action
<
AbpMongoModelBuilderConfigurationOptions
>
optionsAction
=
null
)
{
Check
.
NotNull
(
builder
,
nameof
(
builder
));
var
options
=
new
WeChatPayMongoModelBuilderConfigurationOptions
(
WeChatPayDbProperties
.
DbTablePrefix
);
optionsAction
?.
Invoke
(
options
);
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.MongoDB/MongoDB/WeChatPayMongoModelBuilderConfigurationOptions.cs
0 → 100644
View file @
3a2b53c3
using
JetBrains.Annotations
;
using
Volo.Abp.MongoDB
;
namespace
EasyAbp.EShop.Payment.WeChatPay.MongoDB
{
public
class
WeChatPayMongoModelBuilderConfigurationOptions
:
AbpMongoModelBuilderConfigurationOptions
{
public
WeChatPayMongoModelBuilderConfigurationOptions
(
[
NotNull
]
string
collectionPrefix
=
""
)
:
base
(
collectionPrefix
)
{
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/EShopPaymentWeChatPayWebModule.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.AspNetCore.Mvc.RazorPages
;
using
Microsoft.Extensions.DependencyInjection
;
using
EasyAbp.EShop.Payment.WeChatPay.Localization
;
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
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Web
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayHttpApiModule
),
typeof
(
AbpAspNetCoreMvcUiThemeSharedModule
),
typeof
(
AbpAutoMapperModule
)
)]
public
class
EShopPaymentWeChatPayWebModule
:
AbpModule
{
public
override
void
PreConfigureServices
(
ServiceConfigurationContext
context
)
{
context
.
Services
.
PreConfigure
<
AbpMvcDataAnnotationsLocalizationOptions
>(
options
=>
{
options
.
AddAssemblyResource
(
typeof
(
WeChatPayResource
),
typeof
(
EShopPaymentWeChatPayWebModule
).
Assembly
);
});
PreConfigure
<
IMvcBuilder
>(
mvcBuilder
=>
{
mvcBuilder
.
AddApplicationPartIfNotExists
(
typeof
(
EShopPaymentWeChatPayWebModule
).
Assembly
);
});
}
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
Configure
<
AbpNavigationOptions
>(
options
=>
{
options
.
MenuContributors
.
Add
(
new
WeChatPayMenuContributor
());
});
Configure
<
AbpVirtualFileSystemOptions
>(
options
=>
{
options
.
FileSets
.
AddEmbedded
<
EShopPaymentWeChatPayWebModule
>(
"EasyAbp.EShop.Payment.WeChatPay.Web"
);
});
context
.
Services
.
AddAutoMapperObjectMapper
<
EShopPaymentWeChatPayWebModule
>();
Configure
<
AbpAutoMapperOptions
>(
options
=>
{
options
.
AddMaps
<
EShopPaymentWeChatPayWebModule
>(
validate
:
true
);
});
Configure
<
RazorPagesOptions
>(
options
=>
{
//Configure authorization.
});
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/EasyAbp.EShop.Payment.WeChatPay.Web.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<IsPackable>true</IsPackable>
<OutputType>Library</OutputType>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay.Web</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="2.5.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="2.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.HttpApi\EasyAbp.EShop.Payment.WeChatPay.HttpApi.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\**\*.cshtml" />
<EmbeddedResource Include="Pages\**\*.css" />
<EmbeddedResource Include="Pages\**\*.js" />
<EmbeddedResource Include="wwwroot\**\*.*" />
<Content Remove="Pages\**\*.cshtml" />
<Content Remove="Pages\**\*.css" />
<Content Remove="Pages\**\*.js" />
<Content Remove="wwwroot\**\*.*" />
</ItemGroup>
<ItemGroup>
<Content Remove="Properties\launchSettings.json" />
<None Include="Properties\launchSettings.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/Pages/WeChatPay/Index.cshtml
0 → 100644
View file @
3a2b53c3
@page
@inherits EasyAbp.EShop.Payment.WeChatPay.Web.Pages.WeChatPayPage
@model EasyAbp.EShop.Payment.WeChatPay.Web.Pages.WeChatPay.IndexModel
@{
}
<h1>WeChatPay</h1>
<p>A sample page for the WeChatPay module.</p>
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/Pages/WeChatPay/Index.cshtml.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment.WeChatPay.Web.Pages.WeChatPay
{
public
class
IndexModel
:
WeChatPayPageModel
{
public
void
OnGet
()
{
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/Pages/WeChatPay/_ViewImports.cshtml
0 → 100644
View file @
3a2b53c3
@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
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/Pages/WeChatPayPage.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.AspNetCore.Mvc.Localization
;
using
Microsoft.AspNetCore.Mvc.Razor.Internal
;
using
EasyAbp.EShop.Payment.WeChatPay.Localization
;
using
Volo.Abp.AspNetCore.Mvc.UI.RazorPages
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Web.Pages
{
/* Inherit your UI Pages from this class. To do that, add this line to your Pages (.cshtml files under the Page folder):
* @inherits EasyAbp.EShop.Payment.WeChatPay.Web.Pages.WeChatPayPage
*/
public
abstract
class
WeChatPayPage
:
AbpPage
{
[
RazorInject
]
public
IHtmlLocalizer
<
WeChatPayResource
>
L
{
get
;
set
;
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/Pages/WeChatPayPageModel.cs
0 → 100644
View file @
3a2b53c3
using
EasyAbp.EShop.Payment.WeChatPay.Localization
;
using
Volo.Abp.AspNetCore.Mvc.UI.RazorPages
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Web.Pages
{
/* Inherit your PageModel classes from this class.
*/
public
abstract
class
WeChatPayPageModel
:
AbpPageModel
{
protected
WeChatPayPageModel
()
{
LocalizationResourceType
=
typeof
(
WeChatPayResource
);
ObjectMapperContext
=
typeof
(
EShopPaymentWeChatPayWebModule
);
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/Properties/launchSettings.json
0 → 100644
View file @
3a2b53c3
{
"iisSettings"
:
{
"windowsAuthentication"
:
false
,
"anonymousAuthentication"
:
true
,
"iisExpress"
:
{
"applicationUrl"
:
"http://localhost:56993/"
,
"sslPort"
:
0
}
},
"profiles"
:
{
"IIS Express"
:
{
"commandName"
:
"IISExpress"
,
"launchBrowser"
:
true
,
"environmentVariables"
:
{
"ASPNETCORE_ENVIRONMENT"
:
"Development"
}
},
"EasyAbp.EShop.Payment.WeChatPay.Web"
:
{
"commandName"
:
"Project"
,
"launchBrowser"
:
true
,
"environmentVariables"
:
{
"ASPNETCORE_ENVIRONMENT"
:
"Development"
},
"applicationUrl"
:
"http://localhost:56994/"
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/WeChatPayMenuContributor.cs
0 → 100644
View file @
3a2b53c3
using
System.Threading.Tasks
;
using
Volo.Abp.UI.Navigation
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Web
{
public
class
WeChatPayMenuContributor
:
IMenuContributor
{
public
async
Task
ConfigureMenuAsync
(
MenuConfigurationContext
context
)
{
if
(
context
.
Menu
.
Name
==
StandardMenus
.
Main
)
{
await
ConfigureMainMenu
(
context
);
}
}
private
Task
ConfigureMainMenu
(
MenuConfigurationContext
context
)
{
//Add main menu items.
return
Task
.
CompletedTask
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/src/EasyAbp.EShop.Payment.WeChatPay.Web/WeChatPayWebAutoMapperProfile.cs
0 → 100644
View file @
3a2b53c3
using
AutoMapper
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Web
{
public
class
WeChatPayWebAutoMapperProfile
:
Profile
{
public
WeChatPayWebAutoMapperProfile
()
{
/* 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
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.Application.Tests/EShopPaymentWeChatPayApplicationTestModule.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayApplicationModule
),
typeof
(
EShopPaymentWeChatPayDomainTestModule
)
)]
public
class
EShopPaymentWeChatPayApplicationTestModule
:
AbpModule
{
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.Application.Tests/EasyAbp.EShop.Payment.WeChatPay.Application.Tests.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\EasyAbp.EShop.Payment.WeChatPay.Application\EasyAbp.EShop.Payment.WeChatPay.Application.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.Domain.Tests\EasyAbp.EShop.Payment.WeChatPay.Domain.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.Application.Tests/WeChatPayApplicationTestBase.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment.WeChatPay
{
/* Inherit from this class for your application layer tests.
* See SampleAppService_Tests for example.
*/
public
abstract
class
WeChatPayApplicationTestBase
:
WeChatPayTestBase
<
EShopPaymentWeChatPayApplicationTestModule
>
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.Domain.Tests/EShopPaymentWeChatPayDomainTestModule.cs
0 → 100644
View file @
3a2b53c3
using
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore
;
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
/* 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
(
EShopPaymentWeChatPayEntityFrameworkCoreTestModule
)
)]
public
class
EShopPaymentWeChatPayDomainTestModule
:
AbpModule
{
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.Domain.Tests/EasyAbp.EShop.Payment.WeChatPay.Domain.Tests.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.Tests\EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.Tests.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.Domain.Tests/WeChatPayDomainTestBase.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment.WeChatPay
{
/* Inherit from this class for your domain layer tests.
* See SampleManager_Tests for example.
*/
public
abstract
class
WeChatPayDomainTestBase
:
WeChatPayTestBase
<
EShopPaymentWeChatPayDomainTestModule
>
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.Tests/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.Tests.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="3.1.0" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore\EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.TestBase\EasyAbp.EShop.Payment.WeChatPay.TestBase.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.Tests/EntityFrameworkCore/EShopPaymentWeChatPayEntityFrameworkCoreTestModule.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.Data.Sqlite
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Infrastructure
;
using
Microsoft.EntityFrameworkCore.Storage
;
using
Volo.Abp.EntityFrameworkCore
;
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayTestBaseModule
),
typeof
(
EShopPaymentWeChatPayEntityFrameworkCoreModule
)
)]
public
class
EShopPaymentWeChatPayEntityFrameworkCoreTestModule
:
AbpModule
{
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
var
sqliteConnection
=
CreateDatabaseAndGetConnection
();
Configure
<
AbpDbContextOptions
>(
options
=>
{
options
.
Configure
(
abpDbContextConfigurationContext
=>
{
abpDbContextConfigurationContext
.
DbContextOptions
.
UseSqlite
(
sqliteConnection
);
});
});
}
private
static
SqliteConnection
CreateDatabaseAndGetConnection
()
{
var
connection
=
new
SqliteConnection
(
"Data Source=:memory:"
);
connection
.
Open
();
new
WeChatPayDbContext
(
new
DbContextOptionsBuilder
<
WeChatPayDbContext
>().
UseSqlite
(
connection
).
Options
).
GetService
<
IRelationalDatabaseCreator
>().
CreateTables
();
return
connection
;
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.EntityFrameworkCore.Tests/EntityFrameworkCore/WeChatPayEntityFrameworkCoreTestBase.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment.WeChatPay.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
WeChatPayEntityFrameworkCoreTestBase
:
WeChatPayTestBase
<
EShopPaymentWeChatPayEntityFrameworkCoreTestModule
>
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
System.Net.Http
;
using
System.Threading.Tasks
;
using
IdentityModel.Client
;
using
Microsoft.Extensions.Configuration
;
using
Volo.Abp.DependencyInjection
;
using
Volo.Abp.IdentityModel
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
public
class
ClientDemoService
:
ITransientDependency
{
private
readonly
IIdentityModelAuthenticationService
_authenticationService
;
private
readonly
IConfiguration
_configuration
;
public
ClientDemoService
(
IIdentityModelAuthenticationService
authenticationService
,
IConfiguration
configuration
)
{
_authenticationService
=
authenticationService
;
_configuration
=
configuration
;
}
public
async
Task
RunAsync
()
{
await
TestWithDynamicProxiesAsync
();
await
TestWithHttpClientAndIdentityModelAuthenticationServiceAsync
();
await
TestAllManuallyAsync
();
}
/* Shows how to perform an HTTP request to the API using ABP's dynamic c# proxy
* feature. It is just simple as calling a local service method.
* Authorization and HTTP request details are handled by the ABP framework.
*/
private
async
Task
TestWithDynamicProxiesAsync
()
{
Console
.
WriteLine
();
Console
.
WriteLine
(
$"*****
{
nameof
(
TestWithDynamicProxiesAsync
)}
*****"
);
}
/* Shows how to use HttpClient to perform a request to the HTTP API.
* It uses ABP's IIdentityModelAuthenticationService to simplify obtaining access tokens.
*/
private
async
Task
TestWithHttpClientAndIdentityModelAuthenticationServiceAsync
()
{
Console
.
WriteLine
();
Console
.
WriteLine
(
$"*****
{
nameof
(
TestWithHttpClientAndIdentityModelAuthenticationServiceAsync
)}
*****"
);
//Get access token using ABP's IIdentityModelAuthenticationService
var
accessToken
=
await
_authenticationService
.
GetAccessTokenAsync
(
new
IdentityClientConfiguration
(
_configuration
[
"IdentityClients:Default:Authority"
],
_configuration
[
"IdentityClients:Default:Scope"
],
_configuration
[
"IdentityClients:Default:ClientId"
],
_configuration
[
"IdentityClients:Default:ClientSecret"
],
_configuration
[
"IdentityClients:Default:GrantType"
],
_configuration
[
"IdentityClients:Default:UserName"
],
_configuration
[
"IdentityClients:Default:UserPassword"
]
)
);
//Perform the actual HTTP request
using
(
var
httpClient
=
new
HttpClient
())
{
httpClient
.
SetBearerToken
(
accessToken
);
var
url
=
_configuration
[
"RemoteServices:WeChatPay:BaseUrl"
]
+
"api/WeChatPay/sample/authorized"
;
var
responseMessage
=
await
httpClient
.
GetAsync
(
url
);
if
(
responseMessage
.
IsSuccessStatusCode
)
{
var
responseString
=
await
responseMessage
.
Content
.
ReadAsStringAsync
();
Console
.
WriteLine
(
"Result: "
+
responseString
);
}
else
{
throw
new
Exception
(
"Remote server returns error code: "
+
responseMessage
.
StatusCode
);
}
}
}
/* Shows how to use HttpClient to perform a request to the HTTP API.
* It obtains access token using IdentityServer's API. See its documentation:
* https://identityserver4.readthedocs.io/en/latest/quickstarts/2_resource_owner_passwords.html
*/
private
async
Task
TestAllManuallyAsync
()
{
Console
.
WriteLine
();
Console
.
WriteLine
(
$"*****
{
nameof
(
TestAllManuallyAsync
)}
*****"
);
//Obtain access token from the IDS4 server
// discover endpoints from metadata
var
client
=
new
HttpClient
();
var
disco
=
await
client
.
GetDiscoveryDocumentAsync
(
_configuration
[
"IdentityClients:Default:Authority"
]);
if
(
disco
.
IsError
)
{
Console
.
WriteLine
(
disco
.
Error
);
return
;
}
// request token
var
tokenResponse
=
await
client
.
RequestPasswordTokenAsync
(
new
PasswordTokenRequest
{
Address
=
disco
.
TokenEndpoint
,
ClientId
=
_configuration
[
"IdentityClients:Default:ClientId"
],
ClientSecret
=
_configuration
[
"IdentityClients:Default:ClientSecret"
],
UserName
=
_configuration
[
"IdentityClients:Default:UserName"
],
Password
=
_configuration
[
"IdentityClients:Default:UserPassword"
],
Scope
=
_configuration
[
"IdentityClients:Default:Scope"
]
});
if
(
tokenResponse
.
IsError
)
{
Console
.
WriteLine
(
tokenResponse
.
Error
);
return
;
}
Console
.
WriteLine
(
tokenResponse
.
Json
);
//Perform the actual HTTP request
using
(
var
httpClient
=
new
HttpClient
())
{
httpClient
.
SetBearerToken
(
tokenResponse
.
AccessToken
);
var
url
=
_configuration
[
"RemoteServices:WeChatPay:BaseUrl"
]
+
"api/WeChatPay/sample/authorized"
;
var
responseMessage
=
await
httpClient
.
GetAsync
(
url
);
if
(
responseMessage
.
IsSuccessStatusCode
)
{
var
responseString
=
await
responseMessage
.
Content
.
ReadAsStringAsync
();
Console
.
WriteLine
(
"Result: "
+
responseString
);
}
else
{
throw
new
Exception
(
"Remote server returns error code: "
+
responseMessage
.
StatusCode
);
}
}
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs
0 → 100644
View file @
3a2b53c3
using
Microsoft.Extensions.Hosting
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.Extensions.DependencyInjection
;
using
Volo.Abp
;
namespace
EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp
{
public
class
ConsoleTestAppHostedService
:
IHostedService
{
public
async
Task
StartAsync
(
CancellationToken
cancellationToken
)
{
using
(
var
application
=
AbpApplicationFactory
.
Create
<
EShopPaymentWeChatPayConsoleApiClientModule
>())
{
application
.
Initialize
();
var
demo
=
application
.
ServiceProvider
.
GetRequiredService
<
ClientDemoService
>();
await
demo
.
RunAsync
();
application
.
Shutdown
();
}
}
public
Task
StopAsync
(
CancellationToken
cancellationToken
)
=>
Task
.
CompletedTask
;
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp/EShopPaymentWeChatPayConsoleApiClientModule.cs
0 → 100644
View file @
3a2b53c3
using
Volo.Abp.Http.Client.IdentityModel
;
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayHttpApiClientModule
),
typeof
(
AbpHttpClientIdentityModelModule
)
)]
public
class
EShopPaymentWeChatPayConsoleApiClientModule
:
AbpModule
{
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="2.5.0" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client\EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.csproj" />
</ItemGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.2" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp/Program.cs
0 → 100644
View file @
3a2b53c3
using
System.Threading.Tasks
;
using
Microsoft.Extensions.DependencyInjection
;
using
Microsoft.Extensions.Hosting
;
namespace
EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp
{
class
Program
{
static
async
Task
Main
(
string
[]
args
)
{
await
CreateHostBuilder
(
args
).
RunConsoleAsync
();
}
public
static
IHostBuilder
CreateHostBuilder
(
string
[]
args
)
=>
Host
.
CreateDefaultBuilder
(
args
)
.
ConfigureServices
((
hostContext
,
services
)
=>
{
services
.
AddHostedService
<
ConsoleTestAppHostedService
>();
});
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.HttpApi.Client.ConsoleTestApp/appsettings.json
0 → 100644
View file @
3a2b53c3
{
"RemoteServices"
:
{
"Default"
:
{
"BaseUrl"
:
"https://localhost:44343/"
},
"WeChatPay"
:
{
"BaseUrl"
:
"https://localhost:44399/"
}
},
"IdentityClients"
:
{
"Default"
:
{
"GrantType"
:
"password"
,
"ClientId"
:
"WeChatPay_ConsoleTestApp"
,
"ClientSecret"
:
"1q2w3e*"
,
"UserName"
:
"admin"
,
"UserPassword"
:
"1q2w3E*"
,
"Authority"
:
"https://localhost:44343/"
,
"Scope"
:
"WeChatPay"
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.MongoDB.Tests/EasyAbp.EShop.Payment.WeChatPay.MongoDB.Tests.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Payment.WeChatPay.MongoDB\EasyAbp.EShop.Payment.WeChatPay.MongoDB.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.WeChatPay.TestBase\EasyAbp.EShop.Payment.WeChatPay.TestBase.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.MongoDB.Tests/MongoDB/EShopPaymentWeChatPayMongoDbTestModule.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
Mongo2Go
;
using
Volo.Abp
;
using
Volo.Abp.Data
;
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment.WeChatPay.MongoDB
{
[
DependsOn
(
typeof
(
EShopPaymentWeChatPayTestBaseModule
),
typeof
(
EShopPaymentWeChatPayMongoDbModule
)
)]
public
class
EShopPaymentWeChatPayMongoDbTestModule
:
AbpModule
{
private
static
readonly
MongoDbRunner
MongoDbRunner
=
MongoDbRunner
.
Start
();
public
override
void
ConfigureServices
(
ServiceConfigurationContext
context
)
{
var
connectionString
=
MongoDbRunner
.
ConnectionString
.
EnsureEndsWith
(
'/'
)
+
"Db_"
+
Guid
.
NewGuid
().
ToString
(
"N"
);
Configure
<
AbpDbConnectionOptions
>(
options
=>
{
options
.
ConnectionStrings
.
Default
=
connectionString
;
});
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.MongoDB.Tests/MongoDB/WeChatPayMongoDbTestBase.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment.WeChatPay.MongoDB
{
/* This class can be used as a base class for MongoDB integration tests,
* while SampleRepository_Tests uses a different approach.
*/
public
abstract
class
WeChatPayMongoDbTestBase
:
WeChatPayTestBase
<
EShopPaymentWeChatPayMongoDbTestModule
>
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.TestBase/EShopPaymentWeChatPayTestBaseModule.cs
0 → 100644
View file @
3a2b53c3
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
EasyAbp.EShop.Payment.WeChatPay
{
[
DependsOn
(
typeof
(
AbpAutofacModule
),
typeof
(
AbpTestBaseModule
),
typeof
(
AbpAuthorizationModule
),
typeof
(
EShopPaymentWeChatPayDomainModule
)
)]
public
class
EShopPaymentWeChatPayTestBaseModule
:
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
<
IDataSeeder
>()
.
SeedAsync
();
}
});
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.TestBase/EasyAbp.EShop.Payment.WeChatPay.TestBase.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>EasyAbp.EShop.Payment.WeChatPay</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="2.5.0" />
<PackageReference Include="Volo.Abp.Authorization" Version="2.5.0" />
<PackageReference Include="Volo.Abp.TestBase" Version="2.5.0" />
<ProjectReference Include="..\..\src\EasyAbp.EShop.Payment.WeChatPay.Domain\EasyAbp.EShop.Payment.WeChatPay.Domain.csproj" />
</ItemGroup>
</Project>
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.TestBase/Security/FakeCurrentPrincipalAccessor.cs
0 → 100644
View file @
3a2b53c3
using
System.Collections.Generic
;
using
System.Security.Claims
;
using
Volo.Abp.DependencyInjection
;
using
Volo.Abp.Security.Claims
;
namespace
EasyAbp.EShop.Payment.WeChatPay.Security
{
[
Dependency
(
ReplaceServices
=
true
)]
public
class
FakeCurrentPrincipalAccessor
:
ICurrentPrincipalAccessor
,
ISingletonDependency
{
public
ClaimsPrincipal
Principal
=>
GetPrincipal
();
private
ClaimsPrincipal
_principal
;
private
ClaimsPrincipal
GetPrincipal
()
{
if
(
_principal
==
null
)
{
lock
(
this
)
{
if
(
_principal
==
null
)
{
_principal
=
new
ClaimsPrincipal
(
new
ClaimsIdentity
(
new
List
<
Claim
>
{
new
Claim
(
AbpClaimTypes
.
UserId
,
"2e701e62-0953-4dd3-910b-dc6cc93ccb0d"
),
new
Claim
(
AbpClaimTypes
.
UserName
,
"admin"
),
new
Claim
(
AbpClaimTypes
.
Email
,
"admin@abp.io"
)
}
)
);
}
}
}
return
_principal
;
}
}
}
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.TestBase/WeChatPayDataSeedContributor.cs
0 → 100644
View file @
3a2b53c3
using
System.Threading.Tasks
;
using
Volo.Abp.Data
;
using
Volo.Abp.DependencyInjection
;
using
Volo.Abp.Guids
;
namespace
EasyAbp.EShop.Payment.WeChatPay
{
public
class
WeChatPayDataSeedContributor
:
IDataSeedContributor
,
ITransientDependency
{
private
readonly
IGuidGenerator
_guidGenerator
;
public
WeChatPayDataSeedContributor
(
IGuidGenerator
guidGenerator
)
{
_guidGenerator
=
guidGenerator
;
}
public
Task
SeedAsync
(
DataSeedContext
context
)
{
/* Instead of returning the Task.CompletedTask, you can insert your test data
* at this point!
*/
return
Task
.
CompletedTask
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment.WeChatPay/test/EasyAbp.EShop.Payment.WeChatPay.TestBase/WeChatPayTestBase.cs
0 → 100644
View file @
3a2b53c3
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
EasyAbp.EShop.Payment.WeChatPay
{
/* All test classes are derived from this class, directly or indirectly. */
public
abstract
class
WeChatPayTestBase
<
TStartupModule
>
:
AbpIntegratedTest
<
TStartupModule
>
where
TStartupModule
:
IAbpModule
{
protected
override
void
SetAbpApplicationCreationOptions
(
AbpApplicationCreationOptions
options
)
{
options
.
UseAutofac
();
}
protected
virtual
Task
WithUnitOfWorkAsync
(
Func
<
Task
>
func
)
{
return
WithUnitOfWorkAsync
(
new
AbpUnitOfWorkOptions
(),
func
);
}
protected
virtual
async
Task
WithUnitOfWorkAsync
(
AbpUnitOfWorkOptions
options
,
Func
<
Task
>
action
)
{
using
(
var
scope
=
ServiceProvider
.
CreateScope
())
{
var
uowManager
=
scope
.
ServiceProvider
.
GetRequiredService
<
IUnitOfWorkManager
>();
using
(
var
uow
=
uowManager
.
Begin
(
options
))
{
await
action
();
await
uow
.
CompleteAsync
();
}
}
}
protected
virtual
Task
<
TResult
>
WithUnitOfWorkAsync
<
TResult
>(
Func
<
Task
<
TResult
>>
func
)
{
return
WithUnitOfWorkAsync
(
new
AbpUnitOfWorkOptions
(),
func
);
}
protected
virtual
async
Task
<
TResult
>
WithUnitOfWorkAsync
<
TResult
>(
AbpUnitOfWorkOptions
options
,
Func
<
Task
<
TResult
>>
func
)
{
using
(
var
scope
=
ServiceProvider
.
CreateScope
())
{
var
uowManager
=
scope
.
ServiceProvider
.
GetRequiredService
<
IUnitOfWorkManager
>();
using
(
var
uow
=
uowManager
.
Begin
(
options
))
{
var
result
=
await
func
();
await
uow
.
CompleteAsync
();
return
result
;
}
}
}
}
}
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Abstractions/EasyAbp.EShop.Payment.Abstractions.csproj
0 → 100644
View file @
3a2b53c3
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
</Project>
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Abstractions/EasyAbp/EShop/Payment/IPaymentServiceProvider.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment
{
public
interface
IPaymentServiceProvider
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Abstractions/FodyWeavers.xml
0 → 100644
View file @
3a2b53c3
<Weavers
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"FodyWeavers.xsd"
>
<ConfigureAwait
ContinueOnCapturedContext=
"false"
/>
</Weavers>
\ No newline at end of file
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Abstractions/FodyWeavers.xsd
0 → 100644
View file @
3a2b53c3
<?xml version="1.0" encoding="utf-8"?>
<xs:schema
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
>
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element
name=
"Weavers"
>
<xs:complexType>
<xs:all>
<xs:element
name=
"ConfigureAwait"
minOccurs=
"0"
maxOccurs=
"1"
>
<xs:complexType>
<xs:attribute
name=
"ContinueOnCapturedContext"
type=
"xs:boolean"
/>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute
name=
"VerifyAssembly"
type=
"xs:boolean"
>
<xs:annotation>
<xs:documentation>
'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute
name=
"VerifyIgnoreCodes"
type=
"xs:string"
>
<xs:annotation>
<xs:documentation>
A comma-separated list of error codes that can be safely ignored in assembly verification.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute
name=
"GenerateXsd"
type=
"xs:boolean"
>
<xs:annotation>
<xs:documentation>
'false' to turn off automatic generation of the XML Schema file.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Domain/EShopPaymentDomainModule.cs
View file @
3a2b53c3
using
Volo.Abp.Modularity
;
using
EasyAbp.EShop.Stores
;
using
Volo.Abp.Modularity
;
namespace
EasyAbp.EShop.Payment
namespace
EasyAbp.EShop.Payment
{
{
[
DependsOn
(
[
DependsOn
(
typeof
(
EShopPaymentDomainSharedModule
)
typeof
(
EShopPaymentDomainSharedModule
),
typeof
(
EShopStoresDomainSharedModule
)
)]
)]
public
class
EShopPaymentDomainModule
:
AbpModule
public
class
EShopPaymentDomainModule
:
AbpModule
{
{
...
...
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Domain/EasyAbp.EShop.Payment.Domain.csproj
View file @
3a2b53c3
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
<ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="2.5.0" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="2.5.0" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.Abstractions\EasyAbp.EShop.Payment.Abstractions.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.Domain.Shared\EasyAbp.EShop.Payment.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payment.Domain.Shared\EasyAbp.EShop.Payment.Domain.Shared.csproj" />
</ItemGroup>
</ItemGroup>
...
...
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Domain/FreePaymentServiceProvider.cs
0 → 100644
View file @
3a2b53c3
namespace
EasyAbp.EShop.Payment
{
public
class
FreePaymentServiceProvider
:
IPaymentServiceProvider
{
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Domain/PaymentRecordOrders/PaymentRecordOrder.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
EasyAbp.EShop.Stores.Stores
;
using
Volo.Abp.Domain.Entities.Auditing
;
using
Volo.Abp.MultiTenancy
;
namespace
EasyAbp.EShop.Payment.PaymentRecordOrders
{
public
class
PaymentRecordOrder
:
FullAuditedEntity
<
Guid
>,
IMultiTenant
,
IMultiStore
{
public
virtual
Guid
?
TenantId
{
get
;
protected
set
;
}
public
virtual
Guid
?
StoreId
{
get
;
protected
set
;
}
public
virtual
Guid
OrderId
{
get
;
protected
set
;
}
public
virtual
decimal
OriginalPaymentAmount
{
get
;
protected
set
;
}
public
virtual
decimal
PaymentDiscount
{
get
;
protected
set
;
}
public
virtual
decimal
ActualPaymentAmount
{
get
;
protected
set
;
}
public
virtual
decimal
RefundAmount
{
get
;
protected
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Domain/PaymentRecords/PaymentRecord.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
EasyAbp.EShop.Stores.Stores
;
using
JetBrains.Annotations
;
using
Volo.Abp.Domain.Entities.Auditing
;
using
Volo.Abp.MultiTenancy
;
namespace
EasyAbp.EShop.Payment.PaymentRecords
{
public
class
PaymentRecord
:
FullAuditedAggregateRoot
<
Guid
>,
IMultiTenant
{
public
virtual
Guid
?
TenantId
{
get
;
protected
set
;
}
[
NotNull
]
public
virtual
string
PaymentMethod
{
get
;
protected
set
;
}
[
NotNull
]
public
virtual
string
ExternalTradingCode
{
get
;
protected
set
;
}
public
virtual
decimal
OriginalPaymentAmount
{
get
;
protected
set
;
}
public
virtual
decimal
PaymentDiscount
{
get
;
protected
set
;
}
public
virtual
decimal
ActualPaymentAmount
{
get
;
protected
set
;
}
public
virtual
decimal
RefundAmount
{
get
;
protected
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Payment/src/EasyAbp.EShop.Payment.Domain/RefundRecords/RefundRecord.cs
0 → 100644
View file @
3a2b53c3
using
System
;
using
EasyAbp.EShop.Stores.Stores
;
using
JetBrains.Annotations
;
using
Volo.Abp.Domain.Entities.Auditing
;
using
Volo.Abp.MultiTenancy
;
namespace
EasyAbp.EShop.Payment.RefundRecords
{
public
class
RefundRecord
:
FullAuditedAggregateRoot
<
Guid
>,
IMultiTenant
,
IMultiStore
{
public
virtual
Guid
?
TenantId
{
get
;
protected
set
;
}
public
virtual
Guid
?
StoreId
{
get
;
protected
set
;
}
public
virtual
Guid
OrderId
{
get
;
protected
set
;
}
[
NotNull
]
public
virtual
string
RefundMethod
{
get
;
protected
set
;
}
[
NotNull
]
public
virtual
string
ExternalTradingCode
{
get
;
protected
set
;
}
public
virtual
decimal
RefundAmount
{
get
;
protected
set
;
}
[
CanBeNull
]
public
virtual
string
CustomerRemark
{
get
;
protected
set
;
}
[
CanBeNull
]
public
virtual
string
StaffRemark
{
get
;
protected
set
;
}
}
}
\ No newline at end of file
modules/EasyAbp.EShop.Products/src/EasyAbp.EShop.Products.Domain.Shared/Products/InventoryStrategy.cs
View file @
3a2b53c3
This diff is collapsed.
Click to expand it.
samples/EasyMall/aspnet-core/EasyMall.sln
View file @
3a2b53c3
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment