Roc 8 سال پیش
کامیت
b1fddd75a7
100فایلهای تغییر یافته به همراه6364 افزوده شده و 0 حذف شده
  1. 63 0
      .gitattributes
  2. 261 0
      .gitignore
  3. 67 0
      Payment.sln
  4. 16 0
      README.MD
  5. 170 0
      samples/WebApplicationSample/Controllers/AlipayController.cs
  6. 19 0
      samples/WebApplicationSample/Controllers/HomeController.cs
  7. 80 0
      samples/WebApplicationSample/Controllers/JdPayController.cs
  8. 198 0
      samples/WebApplicationSample/Controllers/NotifyController.cs
  9. 87 0
      samples/WebApplicationSample/Controllers/QPayController.cs
  10. 164 0
      samples/WebApplicationSample/Controllers/WeChatPayController.cs
  11. 9 0
      samples/WebApplicationSample/Models/ErrorViewModel.cs
  12. 18 0
      samples/WebApplicationSample/Program.cs
  13. 20 0
      samples/WebApplicationSample/Properties/PublishProfiles/FolderProfile.pubxml
  14. 27 0
      samples/WebApplicationSample/Properties/launchSettings.json
  15. 95 0
      samples/WebApplicationSample/Startup.cs
  16. 898 0
      samples/WebApplicationSample/Views/Home/Index.cshtml
  17. 22 0
      samples/WebApplicationSample/Views/Shared/Error.cshtml
  18. 16 0
      samples/WebApplicationSample/Views/Shared/_Layout.cshtml
  19. 3 0
      samples/WebApplicationSample/Views/_ViewImports.cshtml
  20. 3 0
      samples/WebApplicationSample/Views/_ViewStart.cshtml
  21. 25 0
      samples/WebApplicationSample/WebApplicationSample.csproj
  22. 10 0
      samples/WebApplicationSample/appsettings.Development.json
  23. 15 0
      samples/WebApplicationSample/appsettings.json
  24. 142 0
      samples/WebApplicationSample/wwwroot/demo.css
  25. 21 0
      samples/WebApplicationSample/wwwroot/demo.js
  26. BIN
      samples/WebApplicationSample/wwwroot/favicon.ico
  27. 6 0
      samples/WebApplicationSample/wwwroot/jquery-ui.min.css
  28. 5 0
      samples/WebApplicationSample/wwwroot/jquery-ui.min.js
  29. 1 0
      samples/WebApplicationSample/wwwroot/jquery.min.js
  30. 456 0
      src/Essensoft.AspNetCore.Alipay/AlipayClient.cs
  31. 11 0
      src/Essensoft.AspNetCore.Alipay/AlipayConstants.cs
  32. 73 0
      src/Essensoft.AspNetCore.Alipay/AlipayDictionary.cs
  33. 45 0
      src/Essensoft.AspNetCore.Alipay/AlipayException.cs
  34. 174 0
      src/Essensoft.AspNetCore.Alipay/AlipayMobilePublicMultiMediaClient.cs
  35. 120 0
      src/Essensoft.AspNetCore.Alipay/AlipayMobilePublicMultiMediaDownloadRequest.cs
  36. 9 0
      src/Essensoft.AspNetCore.Alipay/AlipayMobilePublicMultiMediaDownloadResponse.cs
  37. 86 0
      src/Essensoft.AspNetCore.Alipay/AlipayNotifyClient.cs
  38. 9 0
      src/Essensoft.AspNetCore.Alipay/AlipayObject.cs
  39. 55 0
      src/Essensoft.AspNetCore.Alipay/AlipayOptions.cs
  40. 89 0
      src/Essensoft.AspNetCore.Alipay/AlipayResponse.cs
  41. 46 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessOrdersFeedBack.cs
  42. 46 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessOrdersFeedBackResult.cs
  43. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessParams.cs
  44. 64 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessProduceOrder.cs
  45. 34 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessProduceQrcode.cs
  46. 124 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessPurchaseOrder.cs
  47. 70 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessPurchaseOrderSend.cs
  48. 52 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessPurchaseOrderSendResult.cs
  49. 34 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessReturnQrcode.cs
  50. 52 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccessReturnQrcodeResult.cs
  51. 28 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccountFreeze.cs
  52. 76 0
      src/Essensoft.AspNetCore.Alipay/Domain/AccountRecord.cs
  53. 46 0
      src/Essensoft.AspNetCore.Alipay/Domain/ActivityAuditDTO.cs
  54. 41 0
      src/Essensoft.AspNetCore.Alipay/Domain/ActivityOrderDTO.cs
  55. 83 0
      src/Essensoft.AspNetCore.Alipay/Domain/ActivityPlanInfo.cs
  56. 52 0
      src/Essensoft.AspNetCore.Alipay/Domain/AddressInfo.cs
  57. 208 0
      src/Essensoft.AspNetCore.Alipay/Domain/AdviceVO.cs
  58. 28 0
      src/Essensoft.AspNetCore.Alipay/Domain/AgreementParams.cs
  59. 64 0
      src/Essensoft.AspNetCore.Alipay/Domain/AgreementSignParams.cs
  60. 46 0
      src/Essensoft.AspNetCore.Alipay/Domain/AliTrustAlipayCert.cs
  61. 40 0
      src/Essensoft.AspNetCore.Alipay/Domain/AliTrustCert.cs
  62. 29 0
      src/Essensoft.AspNetCore.Alipay/Domain/AliTrustRiskIdentify.cs
  63. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AliTrustScore.cs
  64. 34 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccount.cs
  65. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateAdviceAcceptModel.cs
  66. 22 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateAllclientrateQueryModel.cs
  67. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateCollectcoreDataSendModel.cs
  68. 41 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExratePricingNotifyModel.cs
  69. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateRatequeryModel.cs
  70. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateTraderequestCreateModel.cs
  71. 59 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAssetPointAccountlogQueryModel.cs
  72. 46 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAssetPointOrderCreateModel.cs
  73. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayAssetPointOrderQueryModel.cs
  74. 28 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossBaseProcessInstanceCancelModel.cs
  75. 77 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossBaseProcessInstanceCreateModel.cs
  76. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossBaseProcessInstanceQueryModel.cs
  77. 65 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossBaseProcessTaskProcessModel.cs
  78. 82 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossCsChannelQueryModel.cs
  79. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossCsDatacollectSendModel.cs
  80. 112 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossProdSubmerchantCreateModel.cs
  81. 82 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossProdSubmerchantModifyModel.cs
  82. 22 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossProdSubmerchantQueryModel.cs
  83. 34 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayChinareModelResult.cs
  84. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCodeRecoResult.cs
  85. 59 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceBusinessorderQueryModel.cs
  86. 46 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorDepositCancelModel.cs
  87. 52 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorDepositConfirmModel.cs
  88. 28 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorDepositQueryModel.cs
  89. 22 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorFunctionQueryModel.cs
  90. 22 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorScriptQueryModel.cs
  91. 16 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorStationQueryModel.cs
  92. 23 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherBatchqueryModel.cs
  93. 40 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherCancelModel.cs
  94. 100 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherConfirmModel.cs
  95. 58 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherGenerateModel.cs
  96. 28 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherQueryModel.cs
  97. 22 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherRefundModel.cs
  98. 46 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherUploadModel.cs
  99. 29 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceDataMonitordataSyncModel.cs
  100. 58 0
      src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceDataResultSendModel.cs

+ 63 - 0
.gitattributes

@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs     diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following 
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln       merge=binary
+#*.csproj    merge=binary
+#*.vbproj    merge=binary
+#*.vcxproj   merge=binary
+#*.vcproj    merge=binary
+#*.dbproj    merge=binary
+#*.fsproj    merge=binary
+#*.lsproj    merge=binary
+#*.wixproj   merge=binary
+#*.modelproj merge=binary
+#*.sqlproj   merge=binary
+#*.wwaproj   merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg   binary
+#*.png   binary
+#*.gif   binary
+
+###############################################################################
+# diff behavior for common document formats
+# 
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the 
+# entries below.
+###############################################################################
+#*.doc   diff=astextplain
+#*.DOC   diff=astextplain
+#*.docx  diff=astextplain
+#*.DOCX  diff=astextplain
+#*.dot   diff=astextplain
+#*.DOT   diff=astextplain
+#*.pdf   diff=astextplain
+#*.PDF   diff=astextplain
+#*.rtf   diff=astextplain
+#*.RTF   diff=astextplain

+ 261 - 0
.gitignore

@@ -0,0 +1,261 @@
+## 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
+project.fragment.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
+*.jfm
+*.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
+
+# CodeRush
+.cr/
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc

+ 67 - 0
Payment.sln

@@ -0,0 +1,67 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.16
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essensoft.AspNetCore.Alipay", "src\Essensoft.AspNetCore.Alipay\Essensoft.AspNetCore.Alipay.csproj", "{1F5C8A10-52FE-4318-AEAD-3CA66F8ECC3D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C9564537-1390-47F8-AEA4-6E76F3C57E4B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5F161C26-3AAC-446B-813E-95D46A621DCB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApplicationSample", "samples\WebApplicationSample\WebApplicationSample.csproj", "{4E02282B-63B1-4AE9-8A41-28B5346B54A1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essensoft.AspNetCore.WeChatPay", "src\Essensoft.AspNetCore.WeChatPay\Essensoft.AspNetCore.WeChatPay.csproj", "{41C12EA5-3A04-489B-9DB7-5D450980B6A6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essensoft.AspNetCore.QPay", "src\Essensoft.AspNetCore.QPay\Essensoft.AspNetCore.QPay.csproj", "{F05F8977-42D0-435B-85CB-D1CCE5A95DD9}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essensoft.AspNetCore.Security", "src\Essensoft.AspNetCore.Security\Essensoft.AspNetCore.Security.csproj", "{714A694B-A469-4F2D-9518-5CE7F9593401}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essensoft.AspNetCore.JdPay", "src\Essensoft.AspNetCore.JdPay\Essensoft.AspNetCore.JdPay.csproj", "{8F9568B7-329F-423A-ADBD-B153AF2B8E1B}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{1F5C8A10-52FE-4318-AEAD-3CA66F8ECC3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1F5C8A10-52FE-4318-AEAD-3CA66F8ECC3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1F5C8A10-52FE-4318-AEAD-3CA66F8ECC3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1F5C8A10-52FE-4318-AEAD-3CA66F8ECC3D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4E02282B-63B1-4AE9-8A41-28B5346B54A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4E02282B-63B1-4AE9-8A41-28B5346B54A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4E02282B-63B1-4AE9-8A41-28B5346B54A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4E02282B-63B1-4AE9-8A41-28B5346B54A1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{41C12EA5-3A04-489B-9DB7-5D450980B6A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{41C12EA5-3A04-489B-9DB7-5D450980B6A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{41C12EA5-3A04-489B-9DB7-5D450980B6A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{41C12EA5-3A04-489B-9DB7-5D450980B6A6}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F05F8977-42D0-435B-85CB-D1CCE5A95DD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F05F8977-42D0-435B-85CB-D1CCE5A95DD9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F05F8977-42D0-435B-85CB-D1CCE5A95DD9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F05F8977-42D0-435B-85CB-D1CCE5A95DD9}.Release|Any CPU.Build.0 = Release|Any CPU
+		{714A694B-A469-4F2D-9518-5CE7F9593401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{714A694B-A469-4F2D-9518-5CE7F9593401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{714A694B-A469-4F2D-9518-5CE7F9593401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{714A694B-A469-4F2D-9518-5CE7F9593401}.Release|Any CPU.Build.0 = Release|Any CPU
+		{8F9568B7-329F-423A-ADBD-B153AF2B8E1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{8F9568B7-329F-423A-ADBD-B153AF2B8E1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{8F9568B7-329F-423A-ADBD-B153AF2B8E1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{8F9568B7-329F-423A-ADBD-B153AF2B8E1B}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(NestedProjects) = preSolution
+		{1F5C8A10-52FE-4318-AEAD-3CA66F8ECC3D} = {C9564537-1390-47F8-AEA4-6E76F3C57E4B}
+		{4E02282B-63B1-4AE9-8A41-28B5346B54A1} = {5F161C26-3AAC-446B-813E-95D46A621DCB}
+		{41C12EA5-3A04-489B-9DB7-5D450980B6A6} = {C9564537-1390-47F8-AEA4-6E76F3C57E4B}
+		{F05F8977-42D0-435B-85CB-D1CCE5A95DD9} = {C9564537-1390-47F8-AEA4-6E76F3C57E4B}
+		{714A694B-A469-4F2D-9518-5CE7F9593401} = {C9564537-1390-47F8-AEA4-6E76F3C57E4B}
+		{8F9568B7-329F-423A-ADBD-B153AF2B8E1B} = {C9564537-1390-47F8-AEA4-6E76F3C57E4B}
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {793B69BC-D173-4B88-9DAD-72861AD84858}
+	EndGlobalSection
+EndGlobal

+ 16 - 0
README.MD

@@ -0,0 +1,16 @@
+<h3>官方文档/帮助:</h3>
+<p>支付宝:<a href="https://openhome.alipay.com/developmentDocument.htm" target="_blank">文档中心</a>、<a href="https://open.alipay.com/support/supportCenter.htm" target="_blank">技术支持中心</a>、<a href="https://openclub.alipay.com/index.php" target="_blank">开发者社区</a></p>
+<p>微信支付:<a href="https://pay.weixin.qq.com/wiki/doc/api/index.html" target="_blank">开发文档</a>、<a href="http://wxpay.wxutil.com/qa/index.php" target="_blank">问答中心</a>、<a href="http://kf.qq.com/product/wechatpaymentmerchant.html" target="_blank">帮助中心</a></p>
+<p>QQ钱包:<a href="https://qpay.qq.com/qpaywiki.shtml" target="_blank">开发文档</a>、<a href="http://kf.qq.com/product/qq_enterprise.html" target="_blank">帮助中心</a></p>
+<p>京东支付:<a href="http://payapi.jd.com/" target="_blank">开发文档</a></p>
+<h3>*参数配置(3选1,推荐使用3):</h3>
+<p>1.使用代码配置如:services.AddAlipay(Options => { Options.AppId = ""; });</p>
+<p>2.使用<a href="https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/configuration?tabs=basicconfiguration" target="_blank">"配置文件"</a>的方式,可在appsetting.json、appsettings.Development.json设置参数</p>
+<p>3.使用<a href="https://docs.microsoft.com/zh-cn/aspnet/core/security/app-secrets?tabs=visual-studio" target="_blank">"用户机密"</a>的方式,可在VS中右键项目->管理用户机密,再设置参数(与2相似)。</p>
+<p>*参数详情可见Startup.cs文件的ConfigureServices方法下的注释代码"配置参数"。</p>
+<h3>*注意:</h3>
+<p>1.示例开发环境:Windows10、VS2017 15.4.4、.Net Core 2.0.3</p>
+<p>2.支持渠道:支付宝、微信支付、QQ钱包、京东支付(仅扫码支付)。</p>
+<p>3.示例使用了依赖注入与用户机密(见Startup.cs文件的ConfigureServices方法),需要自行配置(可以参考上方"参数配置")。当然你不使用依赖注入方式,自己new AlipayClient(...,...)/new WeChatPayClient(...,...)再调用也可以。</p>
+<p>4.部分API未做示例,可根据现有示例与官网API参数文档自行调用(除京东支付外其他支付的API基本齐全了)。</p>
+<p>5.接收支付渠道通知(NotifyController.cs文件)需要公网环境运行(另外记得修改notify_url参数)。</p>

+ 170 - 0
samples/WebApplicationSample/Controllers/AlipayController.cs

@@ -0,0 +1,170 @@
+using Essensoft.AspNetCore.Alipay;
+using Essensoft.AspNetCore.Alipay.Domain;
+using Essensoft.AspNetCore.Alipay.Request;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+
+namespace WebApplicationSample.Controllers
+{
+    public class AlipayController : Controller
+    {
+        public readonly AlipayClient _client = null;
+        public AlipayController(AlipayClient client)
+        {
+            _client = client;
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> PagePay(string out_trade_no, string subject, string total_amount, string body, string product_code, string notify_url)
+        {
+            var model = new AlipayTradePagePayModel()
+            {
+                Body = body,
+                Subject = subject,
+                TotalAmount = total_amount,
+                OutTradeNo = out_trade_no,
+                ProductCode = product_code,
+            };
+            var req = new AlipayTradePagePayRequest();
+            req.SetBizModel(model);
+            req.SetNotifyUrl(notify_url);
+
+            var response = await _client.PageExecuteAsync(req, null, "GET");
+            return Redirect(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> PreCreate(string out_trade_no, string subject, string total_amount, string body, string notify_url)
+        {
+            var builder = new AlipayTradePrecreateModel()
+            {
+                Body = body,
+                Subject = subject,
+                TotalAmount = total_amount,
+                OutTradeNo = out_trade_no,
+            };
+            var req = new AlipayTradePrecreateRequest();
+            req.SetBizModel(builder);
+            req.SetNotifyUrl(notify_url);
+
+            var response = await _client.ExecuteAsync(req);
+            return Ok(response.Body);
+        }
+
+
+        [HttpPost]
+        public async Task<IActionResult> Query(string out_trade_no, string trade_no)
+        {
+            var builder = new AlipayTradeQueryModel()
+            {
+                OutTradeNo = out_trade_no,
+                TradeNo = trade_no
+            };
+
+            var req = new AlipayTradeQueryRequest();
+            req.SetBizModel(builder);
+
+            var response = await _client.ExecuteAsync(req);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> Refund(string out_trade_no, string trade_no, string refund_amount, string refund_reason, string out_request_no)
+        {
+            var builder = new AlipayTradeRefundModel()
+            {
+                OutTradeNo = out_trade_no,
+                TradeNo = trade_no,
+                RefundAmount = refund_amount,
+                OutRequestNo = out_request_no,
+                RefundReason = refund_reason
+            };
+
+            var req = new AlipayTradeRefundRequest();
+            req.SetBizModel(builder);
+
+            var response = await _client.ExecuteAsync(req);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> RefundQuery(string out_trade_no, string trade_no, string out_request_no)
+        {
+            var builder = new AlipayTradeFastpayRefundQueryModel()
+            {
+                OutTradeNo = out_trade_no,
+                TradeNo = trade_no,
+                OutRequestNo = out_request_no
+            };
+
+            var req = new AlipayTradeFastpayRefundQueryRequest();
+            req.SetBizModel(builder);
+
+            var response = await _client.ExecuteAsync(req);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> Close(string out_trade_no, string trade_no)
+        {
+            var builder = new AlipayTradeCloseModel()
+            {
+                OutTradeNo = out_trade_no,
+                TradeNo = trade_no,
+            };
+
+            var req = new AlipayTradeCloseRequest();
+            req.SetBizModel(builder);
+
+            var response = await _client.ExecuteAsync(req);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> Trans(string out_biz_no, string payee_account, string payee_type, string amount, string remark)
+        {
+            var builder = new AlipayFundTransToaccountTransferModel()
+            {
+                OutBizNo = out_biz_no,
+                PayeeType = payee_type,
+                PayeeAccount = payee_account,
+                Amount = amount,
+                Remark = remark
+            };
+            var req = new AlipayFundTransToaccountTransferRequest();
+            req.SetBizModel(builder);
+            var response = await _client.ExecuteAsync(req);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> TransQuery(string out_biz_no, string order_id)
+        {
+            var builder = new AlipayFundTransOrderQueryModel()
+            {
+                OutBizNo = out_biz_no,
+                OrderId = order_id,
+            };
+
+            var req = new AlipayFundTransOrderQueryRequest();
+            req.SetBizModel(builder);
+            var response = await _client.ExecuteAsync(req);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> BillDownloadurlQuery(string bill_date, string bill_type)
+        {
+            var builder = new AlipayDataDataserviceBillDownloadurlQueryModel()
+            {
+                BillDate = bill_date,
+                BillType = bill_type
+            };
+
+            var req = new AlipayDataDataserviceBillDownloadurlQueryRequest();
+            req.SetBizModel(builder);
+            var response = await _client.ExecuteAsync(req);
+            return Ok(response.Body);
+        }
+    }
+}

+ 19 - 0
samples/WebApplicationSample/Controllers/HomeController.cs

@@ -0,0 +1,19 @@
+using Microsoft.AspNetCore.Mvc;
+using System.Diagnostics;
+using WebApplicationSample.Models;
+
+namespace WebApplicationSample.Controllers
+{
+    public class HomeController : Controller
+    {
+        public IActionResult Index()
+        {
+            return View();
+        }
+
+        public IActionResult Error()
+        {
+            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
+        }
+    }
+}

+ 80 - 0
samples/WebApplicationSample/Controllers/JdPayController.cs

@@ -0,0 +1,80 @@
+using Microsoft.AspNetCore.Mvc;
+using Essensoft.AspNetCore.JdPay.Request;
+using Essensoft.AspNetCore.JdPay;
+using System.Threading.Tasks;
+
+namespace WebApplicationSample.Controllers
+{
+    public class JdPayController : Controller
+    {
+        public readonly JdPayClient _client = null;
+
+        public JdPayController(JdPayClient client)
+        {
+            _client = client;
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> Uniorder(string tradeNum, string tradeName, string tradeDesc, string tradeTime, string amount,
+            string orderType, string currency, string note, string notifyUrl, string tradeType)
+        {
+            var request = new JdPayUnifiedOrderRequest()
+            {
+                TradeNum = tradeNum,
+                TradeName = tradeName,
+                TradeDesc = tradeDesc,
+                TradeTime = tradeTime,
+                Amount = amount,
+                OrderType = orderType,
+                Currency = currency,
+                Note = note,
+                NotifyUrl = notifyUrl,
+                TradeType = tradeType
+            };
+
+            var response = await _client.ExecuteAsync(request);
+            return Content(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> OrderQuery(string tradeNum, string oTradeNum)
+        {
+            var request = new JdPayOrderQueryRequest()
+            {
+                TradeNum = tradeNum,
+                OTradeNum = oTradeNum
+            };
+
+            var response = await _client.ExecuteAsync(request);
+            return Content(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> Refund(string tradeNum, string oTradeNum, long amount, string currency)
+        {
+            var request = new JdPayRefundRequest()
+            {
+                TradeNum = tradeNum,
+                OTradeNum = oTradeNum,
+                Amount = amount,
+                Currency = currency,
+            };
+
+            var response = await _client.ExecuteAsync(request);
+            return Content(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> RefundQuery(string tradeNum, string oTradeNum)
+        {
+            var request = new JdPayRefundQueryRequest()
+            {
+                TradeNum = tradeNum,
+                OTradeNum = oTradeNum
+            };
+
+            var response = await _client.ExecuteAsync(request);
+            return Content(response.Body);
+        }
+    }
+}

+ 198 - 0
samples/WebApplicationSample/Controllers/NotifyController.cs

@@ -0,0 +1,198 @@
+using Essensoft.AspNetCore.Alipay;
+using Essensoft.AspNetCore.Alipay.Notify;
+using Essensoft.AspNetCore.JdPay;
+using Essensoft.AspNetCore.JdPay.Notify;
+using Essensoft.AspNetCore.QPay;
+using Essensoft.AspNetCore.QPay.Notify;
+using Essensoft.AspNetCore.WeChatPay;
+using Essensoft.AspNetCore.WeChatPay.Notify;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Threading.Tasks;
+
+namespace WebApplicationSample.Controllers
+{
+    [Route("notify/alipay")]
+    public class AlipayNotifyController : Controller
+    {
+        private readonly AlipayNotifyClient _client = null;
+        public AlipayNotifyController(AlipayNotifyClient client)
+        {
+            _client = client;
+        }
+
+        /// <summary>
+        /// 网页支付异步通知
+        /// </summary>
+        /// <returns></returns>
+        [Route("pagepay")]
+        [HttpPost]
+        public IActionResult PagePay()
+        {
+            try
+            {
+                var notify = _client.Execute<AlipayTradePagePayNotifyResponse>(Request);
+                if ("TRADE_SUCCESS" == notify.TradeStatus)
+                {
+                    Console.WriteLine("OutTradeNo: " + notify.OutTradeNo);
+
+                    return Content("success", "text/plain");
+                }
+                return NoContent();
+            }
+            catch
+            {
+                return NoContent();
+            }
+        }
+
+        /// <summary>
+        /// 扫码支付异步通知
+        /// </summary>
+        /// <returns></returns>
+        [Route("precreate")]
+        [HttpPost]
+        public IActionResult Precreate()
+        {
+            try
+            {
+                var notify = _client.Execute<AlipayTradePrecreateNotifyResponse>(Request);
+                if ("TRADE_SUCCESS" == notify.TradeStatus)
+                {
+                    Console.WriteLine("OutTradeNo: " + notify.OutTradeNo);
+
+                    return Content("success", "text/plain");
+                }
+                return NoContent();
+            }
+            catch
+            {
+                return NoContent();
+            }
+        }
+    }
+
+    [Route("notify/wechatpay")]
+    public class WeChatPayNotifyController : Controller
+    {
+        private readonly WeChatPayNotifyClient _client = null;
+        public WeChatPayNotifyController(WeChatPayNotifyClient client)
+        {
+            _client = client;
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> PostAsync()
+        {
+            try
+            {
+                var notify = await _client.ExecuteAsync<WeChatPayUnifiedOrderNotifyResponse>(Request);
+                if (!notify.IsError)
+                {
+                    if (notify.ResultCode == "SUCCESS")
+                    {
+                        Console.WriteLine("OutTradeNo: " + notify.OutTradeNo);
+
+                        return Content("<xml><return_code><![CDATA[SUCCESS]]></return_code></xml>", "text/xml");
+                    }
+                }
+                return NoContent();
+            }
+            catch
+            {
+                return NoContent();
+            }
+        }
+    }
+
+    /// <summary>
+    /// 微信支付退款通知 需要在微信支付后台设置通知地址
+    /// </summary>
+    [Route("notify/wechatpay/refund")]
+    public class WeChatPayRefundNotifyController : Controller
+    {
+        private readonly WeChatPayNotifyClient _client = null;
+        public WeChatPayRefundNotifyController(WeChatPayNotifyClient client)
+        {
+            _client = client;
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> PostAsync()
+        {
+            try
+            {
+                var notify = await _client.ExecuteAsync<WeChatPayRefundNotifyResponse>(Request);
+                if (!notify.IsError)
+                {
+                    if (notify.RefundStatus == "SUCCESS")
+                    {
+                        Console.WriteLine("OutTradeNo: " + notify.OutTradeNo);
+                        return Content("<xml><return_code><![CDATA[SUCCESS]]></return_code></xml>", "text/xml");
+                    }
+                }
+                return NoContent();
+            }
+            catch
+            {
+                return NoContent();
+            }
+        }
+    }
+
+    [Route("notify/qpay")]
+    public class QPayNotifyController : Controller
+    {
+        private readonly QPayNotifyClient _client = null;
+        public QPayNotifyController(QPayNotifyClient client)
+        {
+            _client = client;
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> PostAsync()
+        {
+            try
+            {
+                var notify = await _client.ExecuteAsync<QPayUnifiedOrderNotifyResponse>(Request);
+                if ("SUCCESS" == notify.TradeState)
+                {
+                    Console.WriteLine("OutTradeNo: " + notify.OutTradeNo);
+
+                    return Content("<xml><return_code><![CDATA[SUCCESS]]></return_code></xml>", "text/xml");
+                }
+                return NoContent();
+            }
+            catch
+            {
+                return NoContent();
+            }
+        }
+    }
+
+    [Route("notify/jdpay")]
+    public class JdPayNotifyController : Controller
+    {
+        private readonly JdPayNotifyClient _client = null;
+        public JdPayNotifyController(JdPayNotifyClient client)
+        {
+            _client = client;
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> PostAsync()
+        {
+            try
+            {
+                var notify = await _client.ExecuteAsync<JdPayAsynNotifyResponse>(Request);
+                Console.WriteLine("TradeNum: " + notify.TradeNum + " tradeType :" + notify.TradeType);
+
+                return Content("success", "text/plain");
+            }
+            catch
+            {
+                return NoContent();
+            }
+        }
+    }
+}

+ 87 - 0
samples/WebApplicationSample/Controllers/QPayController.cs

@@ -0,0 +1,87 @@
+using Essensoft.AspNetCore.QPay;
+using Essensoft.AspNetCore.QPay.Request;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+
+namespace WebApplicationSample.Controllers
+{
+    public class QPayController : Controller
+    {
+        public readonly QPayClient _client = null;
+        public readonly QPayCertificateClient _certClient = null;
+        public QPayController(QPayClient client, QPayCertificateClient certClient)
+        {
+            _client = client;
+            _certClient = certClient;
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> UnifiedOrder(string out_trade_no, string body, int total_fee, string spbill_create_ip, string notify_url, string trade_type)
+        {
+            var request = new QPayUnifiedOrderRequest()
+            {
+                OutTradeNo = out_trade_no,
+                Body = body,
+                TotalFee = total_fee,
+                SpbillCreateIp = spbill_create_ip,
+                NotifyUrl = notify_url,
+                TradeType = trade_type,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> OrderQuery(string transaction_id, string out_trade_no)
+        {
+            var request = new QPayOrderQueryRequest()
+            {
+                TransactionId = transaction_id,
+                OutTradeNo = out_trade_no,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> CloseOrder(string out_trade_no)
+        {
+            var request = new QPayCloseOrderRequest()
+            {
+                OutTradeNo = out_trade_no,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> Refund(string out_refund_no, string transaction_id, string out_trade_no, int refund_fee, string op_user_id, string op_user_passwd)
+        {
+            var request = new QPayRefundRequest()
+            {
+                OutRefundNo = out_refund_no,
+                TransactionId = transaction_id,
+                OutTradeNo = out_trade_no,
+                RefundFee = refund_fee,
+                OpUserId = op_user_id,
+                OpUserPasswd = op_user_passwd,
+            };
+            var response = await _certClient.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> RefundQuery(string refund_id, string out_refund_no, string transaction_id, string out_trade_no)
+        {
+            var request = new QPayRefundQueryRequest()
+            {
+                RefundId = refund_id,
+                OutRefundNo = out_refund_no,
+                TransactionId = transaction_id,
+                OutTradeNo = out_trade_no,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+    }
+}

+ 164 - 0
samples/WebApplicationSample/Controllers/WeChatPayController.cs

@@ -0,0 +1,164 @@
+using Essensoft.AspNetCore.WeChatPay;
+using Essensoft.AspNetCore.WeChatPay.Request;
+using Microsoft.AspNetCore.Mvc;
+using System.Threading.Tasks;
+
+namespace WebApplicationSample.Controllers
+{
+    public class WeChatPayController : Controller
+    {
+        public readonly WeChatPayClient _client = null;
+        public readonly WeChatPayCertificateClient _certClient = null;
+        public WeChatPayController(WeChatPayClient client, WeChatPayCertificateClient certClient)
+        {
+            _client = client;
+            _certClient = certClient;
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> UnifiedOrder(string out_trade_no, string body, int total_fee, string spbill_create_ip, string notify_url, string trade_type, string openid)
+        {
+            var request = new WeChatPayUnifiedOrderRequest()
+            {
+                OutTradeNo = out_trade_no,
+                Body = body,
+                TotalFee = total_fee,
+                SpbillCreateIp = spbill_create_ip,
+                NotifyUrl = notify_url,
+                TradeType = trade_type,
+                OpenId = openid,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> OrderQuery(string transaction_id, string out_trade_no)
+        {
+            var request = new WeChatPayOrderQueryRequest()
+            {
+                TransactionId = transaction_id,
+                OutTradeNo = out_trade_no,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> CloseOrder(string out_trade_no)
+        {
+            var request = new WeChatPayCloseOrderRequest()
+            {
+                OutTradeNo = out_trade_no,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> Refund(string out_refund_no, string transaction_id, string out_trade_no, int total_fee, int refund_fee, string refund_desc)
+        {
+            var request = new WeChatPayRefundRequest()
+            {
+                OutRefundNo = out_refund_no,
+                TransactionId = transaction_id,
+                OutTradeNo = out_trade_no,
+                TotalFee = total_fee,
+                RefundFee = refund_fee,
+                RefundDesc = refund_desc,
+            };
+            var response = await _certClient.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> RefundQuery(string refund_id, string out_refund_no, string transaction_id, string out_trade_no)
+        {
+            var request = new WeChatPayRefundQueryRequest()
+            {
+                RefundId = refund_id,
+                OutRefundNo = out_refund_no,
+                TransactionId = transaction_id,
+                OutTradeNo = out_trade_no,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> DownloadBill(string bill_date, string bill_type, string tar_type)
+        {
+            var request = new WeChatPayDownloadBillRequest()
+            {
+                BillDate = bill_date,
+                BillType = bill_type,
+                TarType = tar_type,
+            };
+            var response = await _client.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> Transfers(string partner_trade_no, string openid, string check_name, string re_user_name, int amount, string desc, string spbill_create_ip)
+        {
+            var request = new WeChatPayTransfersRequest()
+            {
+                PartnerTradeNo = partner_trade_no,
+                OpenId = openid,
+                CheckName = check_name,
+                ReUserName = re_user_name,
+                Amount = amount,
+                Desc = desc,
+                SpbillCreateIp = spbill_create_ip
+            };
+            var response = await _certClient.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> GetTransferInfo(string partner_trade_no)
+        {
+            var request = new WeChatPayGetTransferInfoRequest()
+            {
+                PartnerTradeNo = partner_trade_no,
+            };
+            var response = await _certClient.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> GetPublicKey()
+        {
+            var request = new WeChatPayGetPublicKeyRequest();
+            var response = await _certClient.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> PayBank(string partner_trade_no, string bank_no, string true_name, string bank_code, int amount, string desc)
+        {
+            var request = new WeChatPayPayBankRequest()
+            {
+                PartnerTradeNo = partner_trade_no,
+                EncBankNo = bank_no,
+                EncTrueName = true_name,
+                BankCode = bank_code,
+                Amount = amount,
+                Desc = desc,
+            };
+            var response = await _certClient.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+
+        [HttpPost]
+        public async Task<IActionResult> QueryBank(string partner_trade_no)
+        {
+            var request = new WeChatPayQueryBankRequest()
+            {
+                PartnerTradeNo = partner_trade_no,
+            };
+            var response = await _certClient.ExecuteAsync(request);
+            return Ok(response.Body);
+        }
+    }
+}

+ 9 - 0
samples/WebApplicationSample/Models/ErrorViewModel.cs

@@ -0,0 +1,9 @@
+namespace WebApplicationSample.Models
+{
+    public class ErrorViewModel
+    {
+        public string RequestId { get; set; }
+
+        public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
+    }
+}

+ 18 - 0
samples/WebApplicationSample/Program.cs

@@ -0,0 +1,18 @@
+using Microsoft.AspNetCore;
+using Microsoft.AspNetCore.Hosting;
+
+namespace WebApplicationSample
+{
+    public class Program
+    {
+        public static void Main(string[] args)
+        {
+            BuildWebHost(args).Run();
+        }
+
+        public static IWebHost BuildWebHost(string[] args) =>
+            WebHost.CreateDefaultBuilder(args)
+                .UseStartup<Startup>()
+                .Build();
+    }
+}

+ 20 - 0
samples/WebApplicationSample/Properties/PublishProfiles/FolderProfile.pubxml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件
+自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。 
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <WebPublishMethod>FileSystem</WebPublishMethod>
+    <PublishProvider>FileSystem</PublishProvider>
+    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
+    <LastUsedPlatform>Any CPU</LastUsedPlatform>
+    <SiteUrlToLaunchAfterPublish />
+    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
+    <ExcludeApp_Data>False</ExcludeApp_Data>
+    <ProjectGuid>4e02282b-63b1-4ae9-8a41-28b5346b54a1</ProjectGuid>
+    <publishUrl>C:\Users\roc\Desktop\WebApplicationSample</publishUrl>
+    <DeleteExistingFiles>True</DeleteExistingFiles>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+  </PropertyGroup>
+</Project>

+ 27 - 0
samples/WebApplicationSample/Properties/launchSettings.json

@@ -0,0 +1,27 @@
+{
+  "iisSettings": {
+    "windowsAuthentication": false,
+    "anonymousAuthentication": true,
+    "iisExpress": {
+      "applicationUrl": "http://localhost:61475/",
+      "sslPort": 0
+    }
+  },
+  "profiles": {
+    "IIS Express": {
+      "commandName": "IISExpress",
+      "launchBrowser": true,
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      }
+    },
+    "WebApplicationSample": {
+      "commandName": "Project",
+      "launchBrowser": true,
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      },
+      "applicationUrl": "http://localhost:61476/"
+    }
+  }
+}

+ 95 - 0
samples/WebApplicationSample/Startup.cs

@@ -0,0 +1,95 @@
+using Essensoft.AspNetCore.Alipay;
+using Essensoft.AspNetCore.JdPay;
+using Essensoft.AspNetCore.QPay;
+using Essensoft.AspNetCore.WeChatPay;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace WebApplicationSample
+{
+    public class Startup
+    {
+        public IConfiguration Configuration { get; }
+
+        public Startup(IHostingEnvironment env)
+        {
+            var builder = new ConfigurationBuilder();
+
+            if (env.IsDevelopment()) // 添加用户机密
+            {
+                builder.AddUserSecrets<Startup>();
+            }
+
+            Configuration = builder.Build();
+        }
+
+        public void ConfigureServices(IServiceCollection services)
+        {
+            services.AddMvc();
+
+            services.AddAlipay();
+            services.AddWeChatPay();
+            services.AddQPay();
+            services.AddJdPay();
+
+            services.Configure<AlipayOptions>(Configuration.GetSection("Alipay"));
+            services.Configure<WeChatPayOptions>(Configuration.GetSection("WeChatPay"));
+            services.Configure<QPayOptions>(Configuration.GetSection("QPay"));
+            services.Configure<JdPayOptions>(Configuration.GetSection("JdPay"));
+
+            // 配置参数
+
+            //{
+            //  "Alipay": {
+            //    "AppId": "xxx",
+            //    "RsaPublicKey": "xxx",
+            //    "RsaPrivateKey": "xxx"
+            //  },
+            //  "WeChatPay": {
+            //    "AppId": "xxx",
+            //    "AppSecret": "xxx",
+            //    "MchId": "xxx",
+            //    "Key": "xxx",
+            //    "Certificate": "xxx",
+            //    "Password": "xxx"
+            //  },
+            //  "QPay": {
+            //    "MchId": "xxx",
+            //    "Key": "xxx",
+            //    "Certificate": "xxx",
+            //    "Password": "xxx"
+            //  },
+            //  "JdPay": {
+            //    "Merchant": "xxx",
+            //    "RsaPublicKey": "xxx",
+            //    "RsaPrivateKey": "xxx",
+            //    "DesKey": "xxx"
+            //  }
+            //}
+        }
+
+        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
+        {
+            if (env.IsDevelopment())
+            {
+                app.UseDeveloperExceptionPage();
+                app.UseBrowserLink();
+            }
+            else
+            {
+                app.UseExceptionHandler("/Home/Error");
+            }
+
+            app.UseStaticFiles();
+
+            app.UseMvc(routes =>
+            {
+                routes.MapRoute(
+                    name: "default",
+                    template: "{controller=Home}/{action=Index}/{id?}");
+            });
+        }
+    }
+}

+ 898 - 0
samples/WebApplicationSample/Views/Home/Index.cshtml

@@ -0,0 +1,898 @@
+@{
+    ViewData["Title"] = ".Net Core 支付产品示例";
+}
+<div id="wrapper">
+
+    <div id="header">
+        <h2>.Net Core 支付产品示例</h2>
+    </div>
+
+    <div id="tabs-api">
+        <ul>
+            <li><a href="#tabs-api-1">前言</a></li>
+            <li><a href="#tabs-api-alipay">支付宝示例</a></li>
+            <li><a href="#tabs-api-wechatpay">微信支付示例</a></li>
+            <li><a href="#tabs-api-qpay">QQ钱包示例</a></li>
+            <li><a href="#tabs-api-jdpay">京东支付示例</a></li>
+        </ul>
+        <div id="tabs-api-1">
+            <h3>官方文档/帮助:</h3>
+            <p>支付宝:<a href="https://openhome.alipay.com/developmentDocument.htm" target="_blank">文档中心</a>、<a href="https://open.alipay.com/support/supportCenter.htm" target="_blank">技术支持中心</a>、<a href="https://openclub.alipay.com/index.php" target="_blank">开发者社区</a></p>
+            <p>微信支付:<a href="https://pay.weixin.qq.com/wiki/doc/api/index.html" target="_blank">开发文档</a>、<a href="http://wxpay.wxutil.com/qa/index.php" target="_blank">问答中心</a>、<a href="http://kf.qq.com/product/wechatpaymentmerchant.html" target="_blank">帮助中心</a></p>
+            <p>QQ钱包:<a href="https://qpay.qq.com/qpaywiki.shtml" target="_blank">开发文档</a>、<a href="http://kf.qq.com/product/qq_enterprise.html" target="_blank">帮助中心</a></p>
+            <p>京东支付:<a href="http://payapi.jd.com/" target="_blank">开发文档</a></p>
+            <h3>*参数配置(3选1,推荐使用3):</h3>
+            <p>1.使用代码配置如:services.AddAlipay(Options => { Options.AppId = ""; });</p>
+            <p>2.使用<a href="https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/configuration?tabs=basicconfiguration" target="_blank">"配置文件"</a>的方式,可在appsetting.json、appsettings.Development.json设置参数</p>
+            <p>3.使用<a href="https://docs.microsoft.com/zh-cn/aspnet/core/security/app-secrets?tabs=visual-studio" target="_blank">"用户机密"</a>的方式,可在VS中右键项目->管理用户机密,再设置参数(与2相似)。</p>
+            <p>*参数详情可见Startup.cs文件的ConfigureServices方法下的注释代码"配置参数"。</p>
+            <h3>*注意:</h3>
+            <p>1.示例开发环境:Windows10、VS2017 15.4.4、.Net Core 2.0.3</p>
+            <p>2.支持渠道:支付宝、微信支付、QQ钱包、京东支付(仅扫码支付)。</p>
+            <p>3.示例使用了依赖注入与用户机密(见Startup.cs文件的ConfigureServices方法),需要自行配置(可以参考上方"参数配置")。当然你不使用依赖注入方式,自己new AlipayClient(...,...)/new WeChatPayClient(...,...)再调用也可以。</p>
+            <p>4.部分API未做示例,可根据现有示例与官网API参数文档自行调用(除京东支付外其他支付的API基本齐全了)。</p>
+            <p>5.接收支付渠道通知(NotifyController.cs文件)需要公网环境运行(另外记得修改notify_url参数)。</p>
+        </div>
+        <div id="tabs-api-alipay">
+            <div id="tabs-purchase-alipay">
+                <ul>
+                    <li><a href="#tabs-purchase-1">网页支付</a></li>
+                    <li><a href="#tabs-purchase-2">扫码支付</a></li>
+                    <li><a href="#tabs-purchase-3">交易查询</a></li>
+                    <li><a href="#tabs-purchase-4">交易退款</a></li>
+                    <li><a href="#tabs-purchase-5">退款查询</a></li>
+                    <li><a href="#tabs-purchase-6">交易关闭</a></li>
+                    <li><a href="#tabs-purchase-7">单笔转账</a></li>
+                    <li><a href="#tabs-purchase-8">转账查询</a></li>
+                    <li><a href="#tabs-purchase-9">对账查询</a></li>
+                </ul>
+                <div id="tabs-purchase-1">
+                    <form class="api-form" asp-controller="Alipay" asp-action="PagePay" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>subject:</label>
+                            <input type="text" name="subject" value="支付宝网页支付测试">
+                        </p>
+                        <p>
+                            <label>total_amount:</label>
+                            <input type="text" name="total_amount" value="0.01" title="单位为元,精确至小数点后2位。">
+                        </p>
+                        <p>
+                            <label>body:</label>
+                            <input type="text" name="body">
+                        </p>
+                        <p>
+                            <label>product_code:</label>
+                            <input type="text" name="product_code" value="FAST_INSTANT_TRADE_PAY">
+                        </p>
+                        <p>
+                            <label>notify_url:</label>
+                            <input type="text" name="notify_url" value="http://www.baidu.com/notify/alipay/pagepay">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <hr />
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/270/alipay.trade.page.pay" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+                <div id="tabs-purchase-2">
+                    <form class="api-form" asp-controller="Alipay" asp-action="PreCreate" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>subject:</label>
+                            <input type="text" name="subject" value="支付宝扫码支付测试">
+                        </p>
+                        <p>
+                            <label>total_amount:</label>
+                            <input type="text" name="total_amount" value="0.01" title="单位为元,精确至小数点后2位。">
+                        </p>
+                        <p>
+                            <label>body:</label>
+                            <input type="text" name="body">
+                        </p>
+                        <p>
+                            <label>notify_url:</label>
+                            <input type="text" name="notify_url" value="http://www.baidu.com/notify/alipay/precreate">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <hr />
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/api_1/alipay.trade.precreate" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+                <div id="tabs-purchase-3">
+                    <form class="api-form" asp-controller="Alipay" asp-action="Query" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>trade_no:</label>
+                            <input type="text" name="trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <hr />
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/api_1/alipay.trade.query" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+                <div id="tabs-purchase-4">
+                    <form class="api-form" asp-controller="Alipay" asp-action="Refund" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>trade_no:</label>
+                            <input type="text" name="trade_no">
+                        </p>
+                        <p>
+                            <label>out_request_no:</label>
+                            <input type="text" name="out_request_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>refund_amount:</label>
+                            <input type="text" name="refund_amount">
+                        </p>
+                        <p>
+                            <label>refund_reason:</label>
+                            <input type="text" name="refund_reason">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <hr />
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/api_1/alipay.trade.refund" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+                <div id="tabs-purchase-5">
+                    <form class="api-form" asp-controller="Alipay" asp-action="RefundQuery" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>trade_no:</label>
+                            <input type="text" name="trade_no">
+                        </p>
+                        <p>
+                            <label>out_request_no:</label>
+                            <input type="text" name="out_request_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <hr />
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/api_1/alipay.trade.fastpay.refund.query" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+                <div id="tabs-purchase-6">
+                    <form class="api-form" asp-controller="Alipay" asp-action="Close" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>trade_no:</label>
+                            <input type="text" name="trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <hr />
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/api_1/alipay.trade.close" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+                <div id="tabs-purchase-7">
+                    <form class="api-form" asp-controller="Alipay" asp-action="Trans" method="post" target="_blank">
+                        <p>
+                            <label>out_biz_no:</label>
+                            <input type="text" name="out_biz_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>payee_type:</label>
+                            <input type="text" name="payee_type" value="ALIPAY_LOGONID">
+                        </p>
+                        <p>
+                            <label>payee_account:</label>
+                            <input type="text" name="payee_account">
+                        </p>
+                        <p>
+                            <label>amount:</label>
+                            <input type="text" name="amount">
+                        </p>
+                        <p>
+                            <label>remark:</label>
+                            <input type="text" name="remark">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/api_28/alipay.fund.trans.toaccount.transfer" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+                <div id="tabs-purchase-8">
+                    <form class="api-form" asp-controller="Alipay" asp-action="TransQuery" method="post" target="_blank">
+                        <p>
+                            <label>out_biz_no:</label>
+                            <input type="text" name="out_biz_no">
+                        </p>
+                        <p>
+                            <label>order_id:</label>
+                            <input type="text" name="order_id">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <hr />
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/api_28/alipay.fund.trans.order.query" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+                <div id="tabs-purchase-9">
+                    <form class="api-form" asp-controller="Alipay" asp-action="Close" method="post" target="_blank">
+                        <p>
+                            <label>bill_date:</label>
+                            <input type="text" name="bill_date">
+                        </p>
+                        <p>
+                            <label>bill_type:</label>
+                            <input type="text" name="bill_type">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <hr />
+                    <p class="faq">
+                        <a href="https://docs.open.alipay.com/api_15/alipay.data.dataservice.bill.downloadurl.query" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+            </div>
+        </div>
+        <div id="tabs-api-wechatpay">
+            <div id="tabs-purchase-wechatpay">
+                <ul>
+                    <li><a href="#tabs-purchase-1">扫码支付</a></li>
+                    <li><a href="#tabs-purchase-2">公众号支付</a></li>
+                    <li><a href="#tabs-purchase-3">查询订单</a></li>
+                    <li><a href="#tabs-purchase-4">关闭订单</a></li>
+                    <li><a href="#tabs-purchase-5">申请退款</a></li>
+                    <li><a href="#tabs-purchase-6">查询退款</a></li>
+                    <li><a href="#tabs-purchase-7">下载对账单</a></li>
+                    <li><a href="#tabs-purchase-8">企业付款到零钱</a></li>
+                    <li><a href="#tabs-purchase-9">查询付款</a></li>
+                    <li><a href="#tabs-purchase-10">获取RSA加密公钥</a></li>
+                    <li><a href="#tabs-purchase-11">企业付款到银行卡</a></li>
+                    <li><a href="#tabs-purchase-12">查询企业付款银行卡</a></li>
+                </ul>
+                <div id="tabs-purchase-1">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="UnifiedOrder" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>body:</label>
+                            <input type="text" name="body" value="微信扫码支付测试">
+                        </p>
+                        <p>
+                            <label>total_fee:</label>
+                            <input type="text" name="total_fee" value="1" title="单位为分。">
+                        </p>
+                        <p>
+                            <label>spbill_create_ip:</label>
+                            <input type="text" name="spbill_create_ip" value="127.0.0.1">
+                        </p>
+                        <p>
+                            <label>notify_url:</label>
+                            <input type="text" name="notify_url" value="http://www.baidu.com/notify/wechatpay">
+                        </p>
+                        <p>
+                            <label>trade_type:</label>
+                            <input type="text" name="trade_type" value="NATIVE">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_1" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-2">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="UnifiedOrder" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>body:</label>
+                            <input type="text" name="body" value="微信公众号支付支付测试">
+                        </p>
+                        <p>
+                            <label>total_fee:</label>
+                            <input type="text" name="total_fee" value="1" title="单位为分。">
+                        </p>
+                        <p>
+                            <label>spbill_create_ip:</label>
+                            <input type="text" name="spbill_create_ip" value="127.0.0.1">
+                        </p>
+                        <p>
+                            <label>notify_url:</label>
+                            <input type="text" name="notify_url" value="http://www.baidu.com/notify/wechatpay">
+                        </p>
+                        <p>
+                            <label>trade_type:</label>
+                            <input type="text" name="trade_type" value="JSAPI">
+                        </p>
+                        <p>
+                            <label>openid:</label>
+                            <input type="text" name="openid" value="">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-3">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="OrderQuery" method="post" target="_blank">
+                        <p>
+                            <label>transaction_id:</label>
+                            <input type="text" name="transaction_id">
+                        </p>
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_2" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-4">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="CloseOrder" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_3" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-5">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="Refund" method="post" target="_blank">
+                        <p>
+                            <label>out_refund_no:</label>
+                            <input type="text" name="out_refund_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>transaction_id:</label>
+                            <input type="text" name="transaction_id">
+                        </p>
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>total_fee:</label>
+                            <input type="text" name="total_fee" value="1" title="单位为分。">
+                        </p>
+                        <p>
+                            <label>refund_fee:</label>
+                            <input type="text" name="refund_fee" value="1" title="单位为分。">
+                        </p>
+                        <p>
+                            <label>refund_desc:</label>
+                            <input type="text" name="refund_desc">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_4" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-6">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="RefundQuery" method="post" target="_blank">
+                        <p>
+                            <label>refund_id:</label>
+                            <input type="text" name="refund_id">
+                        </p>
+                        <p>
+                            <label>out_refund_no:</label>
+                            <input type="text" name="out_refund_no">
+                        </p>
+                        <p>
+                            <label>transaction_id:</label>
+                            <input type="text" name="transaction_id">
+                        </p>
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_5" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-7">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="DownloadBill" method="post" target="_blank">
+                        <p>
+                            <label>bill_date:</label>
+                            <input type="text" name="bill_date">
+                        </p>
+                        <p>
+                            <label>bill_type:</label>
+                            <input type="text" name="bill_type">
+                        </p>
+                        <p>
+                            <label>tar_type:</label>
+                            <input type="text" name="tar_type">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_6" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-8">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="Transfers" method="post" target="_blank">
+                        <p>
+                            <label>partner_trade_no:</label>
+                            <input type="text" name="partner_trade_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>openid:</label>
+                            <input type="text" name="openid">
+                        </p>
+                        <p>
+                            <label>check_name:</label>
+                            <input type="text" name="check_name" value="NO_CHECK">
+                        </p>
+                        <p>
+                            <label>re_user_name:</label>
+                            <input type="text" name="re_user_name">
+                        </p>
+                        <p>
+                            <label>amount:</label>
+                            <input type="text" name="amount" value="100">
+                        </p>
+                        <p>
+                            <label>desc:</label>
+                            <input type="text" name="desc" value="企业付款测试">
+                        </p>
+                        <p>
+                            <label>spbill_create_ip:</label>
+                            <input type="text" name="spbill_create_ip" value="127.0.0.1">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_2" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-9">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="GetTransferInfo" method="post" target="_blank">
+                        <p>
+                            <label>partner_trade_no:</label>
+                            <input type="text" name="partner_trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_3" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-10">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="GetPublicKey" method="post" target="_blank">
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=24_7&index=4" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-11">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="PayBank" method="post" target="_blank">
+                        <p>
+                            <label>partner_trade_no:</label>
+                            <input type="text" name="partner_trade_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>bank_no:</label>
+                            <input type="text" name="bank_no">
+                        </p>
+                        <p>
+                            <label>true_name:</label>
+                            <input type="text" name="true_name">
+                        </p>
+                        <p>
+                            <label>bank_code:</label>
+                            <input type="text" name="bank_code">
+                        </p>
+                        <p>
+                            <label>amount:</label>
+                            <input type="text" name="amount" value="100">
+                        </p>
+                        <p>
+                            <label>desc:</label>
+                            <input type="text" name="desc" value="企业付款到银行卡测试">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=24_2" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-12">
+                    <form class="api-form" asp-controller="WeChatPay" asp-action="QueryBank" method="post" target="_blank">
+                        <p>
+                            <label>partner_trade_no:</label>
+                            <input type="text" name="partner_trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=24_3" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+            </div>
+        </div>
+        <div id="tabs-api-qpay">
+            <div id="tabs-purchase-qpay">
+                <ul>
+                    <li><a href="#tabs-purchase-1">扫码支付</a></li>
+                    <li><a href="#tabs-purchase-2">查询订单</a></li>
+                    <li><a href="#tabs-purchase-3">关闭订单</a></li>
+                    <li><a href="#tabs-purchase-4">申请退款</a></li>
+                    <li><a href="#tabs-purchase-5">查询退款</a></li>
+                </ul>
+                <div id="tabs-purchase-1">
+                    <form class="api-form" asp-controller="QPay" asp-action="UnifiedOrder" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>body:</label>
+                            <input type="text" name="body" value="QQ钱包扫码支付测试">
+                        </p>
+                        <p>
+                            <label>total_fee:</label>
+                            <input type="text" name="total_fee" value="1" title="单位为分。">
+                        </p>
+                        <p>
+                            <label>spbill_create_ip:</label>
+                            <input type="text" name="spbill_create_ip" value="127.0.0.1">
+                        </p>
+                        <p>
+                            <label>notify_url:</label>
+                            <input type="text" name="notify_url" value="http://www.baidu.com/notify/qpay">
+                        </p>
+                        <p>
+                            <label>trade_type:</label>
+                            <input type="text" name="trade_type" value="NATIVE">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://qpay.qq.com/qpaywiki/showdocument.php?pid=38&docid=58" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-2">
+                    <form class="api-form" asp-controller="QPay" asp-action="OrderQuery" method="post" target="_blank">
+                        <p>
+                            <label>transaction_id:</label>
+                            <input type="text" name="transaction_id">
+                        </p>
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://qpay.qq.com/qpaywiki/showdocument.php?pid=38&docid=60" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-3">
+                    <form class="api-form" asp-controller="QPay" asp-action="CloseOrder" method="post" target="_blank">
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://qpay.qq.com/qpaywiki/showdocument.php?pid=38&docid=61" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-4">
+                    <form class="api-form" asp-controller="QPay" asp-action="Refund" method="post" target="_blank">
+                        <p>
+                            <label>out_refund_no:</label>
+                            <input type="text" name="out_refund_no" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>QQtransaction_id:</label>
+                            <input type="text" name="transaction_id">
+                        </p>
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>refund_fee:</label>
+                            <input type="text" name="refund_fee" value="1" title="单位为分。">
+                        </p>
+                        <p>
+                            <label>op_user_idID:</label>
+                            <input type="text" name="op_user_id">
+                        </p>
+                        <p>
+                            <label>op_user_passwd:</label>
+                            <input type="text" name="op_user_passwd">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://qpay.qq.com/qpaywiki/showdocument.php?pid=38&docid=62" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-5">
+                    <form class="api-form" asp-controller="QPay" asp-action="RefundQuery" method="post" target="_blank">
+                        <p>
+                            <label>refund_id:</label>
+                            <input type="text" name="refund_id">
+                        </p>
+                        <p>
+                            <label>out_refund_no:</label>
+                            <input type="text" name="out_refund_no">
+                        </p>
+                        <p>
+                            <label>transaction_id:</label>
+                            <input type="text" name="transaction_id">
+                        </p>
+                        <p>
+                            <label>out_trade_no:</label>
+                            <input type="text" name="out_trade_no">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="https://qpay.qq.com/qpaywiki/showdocument.php?pid=38&docid=63" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+            </div>
+        </div>
+        <div id="tabs-api-jdpay">
+            <div id="tabs-purchase-jdpay">
+                <ul>
+                    <li><a href="#tabs-purchase-1">扫码支付</a></li>
+                    <li><a href="#tabs-purchase-2">交易查询</a></li>
+                    <li><a href="#tabs-purchase-3">退款申请</a></li>
+                    <li><a href="#tabs-purchase-4">退款查询</a></li>
+                </ul>
+                <div id="tabs-purchase-1">
+                    <form class="api-form" asp-controller="JdPay" asp-action="Uniorder" method="post" target="_blank">
+                        <p>
+                            <label>tradeNum:</label>
+                            <input type="text" name="tradeNum" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>tradeName:</label>
+                            <input type="text" name="tradeName" value="京东扫码支付测试">
+                        </p>
+                        <p>
+                            <label>tradeDesc:</label>
+                            <input type="text" name="tradeDesc" value="交易描述">
+                        </p>
+                        <p>
+                            <label>tradeTime:</label>
+                            <input type="text" name="tradeTime" value="@DateTime.Now.ToString("yyyyMMddHHmmss")">
+                        </p>
+                        <p>
+                            <label>amount:</label>
+                            <input type="text" name="amount" value="1">
+                        </p>
+                        <p>
+                            <label>orderType:</label>
+                            <input type="text" name="orderType" value="1">
+                        </p>
+                        <p>
+                            <label>currency:</label>
+                            <input type="text" name="currency" value="CNY">
+                        </p>
+                        <p>
+                            <label>note:</label>
+                            <input type="text" name="note" value="备注">
+                        </p>
+                        <p>
+                            <label>notifyUrl:</label>
+                            <input type="text" name="notifyUrl" value="http://www.baidu.com/notify/jdpay">
+                        </p>
+                        <p>
+                            <label>tradeType:</label>
+                            <input type="text" name="tradeType" value="QR">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="http://payapi.jd.com/docList.html" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-2">
+                    <form class="api-form" asp-controller="JdPay" asp-action="OrderQuery" method="post" target="_blank">
+                        <p>
+                            <label>tradeNum:</label>
+                            <input type="text" name="tradeNum">
+                        </p>
+                        <p>
+                            <label>oTradeNum:</label>
+                            <input type="text" name="oTradeNum">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="http://payapi.jd.com/docList.html" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-3">
+                    <form class="api-form" asp-controller="JdPay" asp-action="Refund" method="post" target="_blank">
+                        <p>
+                            <label>tradeNum:</label>
+                            <input type="text" name="tradeNum" value="@DateTime.Now.ToString("yyyyMMddHHmmssfff")">
+                        </p>
+                        <p>
+                            <label>oTradeNum:</label>
+                            <input type="text" name="oTradeNum">
+                        </p>
+                        <p>
+                            <label>amount:</label>
+                            <input type="text" name="amount" value="1">
+                        </p>
+                        <p>
+                            <label>currency:</label>
+                            <input type="text" name="currency" value="CNY">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="http://payapi.jd.com/docList.html" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+                <div id="tabs-purchase-4">
+                    <form class="api-form" asp-controller="JdPay" asp-action="RefundQuery" method="post" target="_blank">
+                        <p>
+                            <label>tradeNum:</label>
+                            <input type="text" name="tradeNum">
+                        </p>
+                        <p>
+                            <label>oTradeNum:</label>
+                            <input type="text" name="oTradeNum">
+                        </p>
+                        <p>
+                            <label>&nbsp;</label>
+                            <input type="submit" class="button" value="提交">
+                        </p>
+                    </form>
+                    <p class="faq">
+                        <a href="http://payapi.jd.com/docList.html" target="_blank">* 查看接口 请求参数、响应参数</a>
+                    </p>
+                </div>
+
+            </div>
+        </div>
+    </div>
+
+</div>
+@section Scripts {
+    <script src="~/demo.js" asp-append-version="true"></script>
+}
+@section Styles {
+    <link rel="stylesheet" href="~/demo.css" asp-append-version="true">
+}

+ 22 - 0
samples/WebApplicationSample/Views/Shared/Error.cshtml

@@ -0,0 +1,22 @@
+@model ErrorViewModel
+@{
+    ViewData["Title"] = "Error";
+}
+
+<h1 class="text-danger">Error.</h1>
+<h2 class="text-danger">An error occurred while processing your request.</h2>
+
+@if (Model.ShowRequestId)
+{
+    <p>
+        <strong>Request ID:</strong> <code>@Model.RequestId</code>
+    </p>
+}
+
+<h3>Development Mode</h3>
+<p>
+    Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
+</p>
+<p>
+    <strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
+</p>

+ 16 - 0
samples/WebApplicationSample/Views/Shared/_Layout.cshtml

@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <title>@ViewData["Title"] - WebApplicationSample</title>
+    <link rel="stylesheet" href="~/jquery-ui.min.css" asp-append-version="true">
+    @RenderSection("Styles", required: false)
+</head>
+<body style="background-color:#e5eecc;">
+    @RenderBody()
+    <script src="~/jquery.min.js" asp-append-version="true"></script>
+    <script src="~/jquery-ui.min.js" asp-append-version="true"></script>
+    @RenderSection("Scripts", required: false)
+</body>
+</html>

+ 3 - 0
samples/WebApplicationSample/Views/_ViewImports.cshtml

@@ -0,0 +1,3 @@
+@using WebApplicationSample
+@using WebApplicationSample.Models
+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

+ 3 - 0
samples/WebApplicationSample/Views/_ViewStart.cshtml

@@ -0,0 +1,3 @@
+@{
+    Layout = "_Layout";
+}

+ 25 - 0
samples/WebApplicationSample/WebApplicationSample.csproj

@@ -0,0 +1,25 @@
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+  <PropertyGroup>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+    <UserSecretsId>a59ca38e-9b52-44fe-b3d2-8cb5a1641623</UserSecretsId>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="..\..\src\Essensoft.AspNetCore.Alipay\Essensoft.AspNetCore.Alipay.csproj" />
+    <ProjectReference Include="..\..\src\Essensoft.AspNetCore.JdPay\Essensoft.AspNetCore.JdPay.csproj" />
+    <ProjectReference Include="..\..\src\Essensoft.AspNetCore.QPay\Essensoft.AspNetCore.QPay.csproj" />
+    <ProjectReference Include="..\..\src\Essensoft.AspNetCore.WeChatPay\Essensoft.AspNetCore.WeChatPay.csproj" />
+  </ItemGroup>
+
+  <ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
+
+</Project>

+ 10 - 0
samples/WebApplicationSample/appsettings.Development.json

@@ -0,0 +1,10 @@
+{
+  "Logging": {
+    "IncludeScopes": false,
+    "LogLevel": {
+      "Default": "Debug",
+      "System": "Information",
+      "Microsoft": "Information"
+    }
+  }
+}

+ 15 - 0
samples/WebApplicationSample/appsettings.json

@@ -0,0 +1,15 @@
+{
+  "Logging": {
+    "IncludeScopes": false,
+    "Debug": {
+      "LogLevel": {
+        "Default": "Warning"
+      }
+    },
+    "Console": {
+      "LogLevel": {
+        "Default": "Warning"
+      }
+    }
+  }
+}

+ 142 - 0
samples/WebApplicationSample/wwwroot/demo.css

@@ -0,0 +1,142 @@
+@CHARSET "UTF-8";
+/*! index页面 */
+.ui-tabs-vertical {
+    width: 51.5em;
+}
+
+    .ui-tabs-vertical .ui-tabs-nav {
+        padding: .2em .1em .2em .2em;
+        float: left;
+        width: 11em;
+    }
+
+        .ui-tabs-vertical .ui-tabs-nav li {
+            clear: left;
+            width: 100%;
+            border-bottom-width: 1px !important;
+            border-right-width: 0 !important;
+            margin: 0 -1px .2em 0;
+        }
+
+            .ui-tabs-vertical .ui-tabs-nav li a {
+                display: block;
+            }
+
+            .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active {
+                padding-bottom: 0;
+                padding-right: .1em;
+                border-right-width: 1px;
+                border-right-width: 1px;
+            }
+
+    .ui-tabs-vertical .ui-tabs-panel {
+        padding: 1.2em;
+        float: right;
+        width: 37.5em;
+    }
+
+.ui-tabs {
+    font-family: 微软雅黑;
+}
+
+div#header {
+    width: inherit;
+    height: 3em;
+}
+
+div#wrapper {
+    font-family: 微软雅黑;
+    width: 62em;
+    margin: 0 auto;
+    font-size: 16px;
+    color: #5E5E5E;
+}
+
+h1, h2, h3, h4, h5, h6, h7, .ui-tooltip {
+    font-family: 微软雅黑 !important;
+    color: #555 !important;
+}
+
+
+/*! 各个接口的页面 */
+hr {
+    height: 1px;
+    border: none;
+    border-top: 1px dashed #9DC45F;
+}
+
+.api-form {
+    margin-left: auto;
+    margin-right: auto;
+    background: #F8F8F8;
+    padding: 30px 30px 20px 30px;
+    color: #666;
+    border-radius: 5px;
+    -webkit-border-radius: 5px;
+    -moz-border-radius: 5px;
+}
+
+    .api-form p {
+        display: block;
+        margin: 0px 0px 5px;
+    }
+
+        .api-form p > label {
+            float: left;
+            width: 10em;
+            text-align: right;
+            padding-right: 0.5em;
+            margin-top: .1em;
+            color: #5E5E5E;
+        }
+
+    .api-form input[type="text"] {
+        border: 1px solid #E5E5E5;
+        ;
+        color: #555;
+        height: 20px;
+        line-height: 15px;
+        margin-bottom: 16px;
+        margin-right: 6px;
+        margin-top: 2px;
+        outline: 0 none;
+        padding: 5px 0px 5px 5px;
+        width: 65%;
+        border-radius: 4px;
+        -webkit-border-radius: 4px;
+        -moz-border-radius: 4px;
+        -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+        box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+        -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+    }
+
+    .api-form input.button {
+        font-family: 微软雅黑;
+        background-color: #9DC45F;
+        border-radius: 5px;
+        -webkit-border-radius: 5px;
+        -moz-border-border-radius: 5px;
+        border: none;
+        padding: 10px 25px 10px 25px;
+        color: #FFF;
+        text-shadow: 1px 1px 1px #949494;
+    }
+
+        .api-form input.button:hover {
+            font-family: 微软雅黑;
+            background-color: #80A24A;
+        }
+
+    .api-form .showFaqBtn {
+        font-family: 微软雅黑;
+        float: right;
+        background-color: transparent;
+        color: inherit;
+        border: none;
+        padding: 10px 25px 10px 25px;
+    }
+
+.faq {
+    font-size: 14px;
+    font-weight: normal;
+}

+ 21 - 0
samples/WebApplicationSample/wwwroot/demo.js

@@ -0,0 +1,21 @@
+$(function () {
+    $("#tabs-api").tabs();
+    setApiDemoTabs("#tabs-purchase-alipay");
+    setApiDemoTabs("#tabs-purchase-wechatpay");
+    setApiDemoTabs("#tabs-purchase-qpay");
+    setApiDemoTabs("#tabs-purchase-jdpay");
+    $(document).tooltip();
+});
+
+function setApiDemoTabs(selector) {
+    $(selector).tabs({
+        beforeLoad: function (event, ui) {
+            ui.jqXHR.error(function () { ui.panel.html("加载中"); });
+        }, load: function (event, ui) {
+            $(".question").hide();
+            $(".showFaqBtn").click(
+                function () { $(".question").toggle(); });
+        }
+    }).addClass("ui-tabs-vertical ui-helper-clearfix");
+    $(selector + " li").removeClass("ui-corner-top").addClass("ui-corner-left");
+}

BIN
samples/WebApplicationSample/wwwroot/favicon.ico


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 6 - 0
samples/WebApplicationSample/wwwroot/jquery-ui.min.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 5 - 0
samples/WebApplicationSample/wwwroot/jquery-ui.min.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 0
samples/WebApplicationSample/wwwroot/jquery.min.js


+ 456 - 0
src/Essensoft.AspNetCore.Alipay/AlipayClient.cs

@@ -0,0 +1,456 @@
+using Essensoft.AspNetCore.Alipay.Parser;
+using Essensoft.AspNetCore.Alipay.Request;
+using Essensoft.AspNetCore.Alipay.Utility;
+using Microsoft.Extensions.Options;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Essensoft.AspNetCore.Alipay
+{
+    /// <summary>
+    /// Alipay客户端。
+    /// </summary>
+    public class AlipayClient : IAlipayClient
+    {
+        private const string APP_ID = "app_id";
+        private const string FORMAT = "format";
+        private const string METHOD = "method";
+        private const string TIMESTAMP = "timestamp";
+        private const string VERSION = "version";
+        private const string SIGN_TYPE = "sign_type";
+        private const string ACCESS_TOKEN = "auth_token";
+        private const string SIGN = "sign";
+        private const string TERMINAL_TYPE = "terminal_type";
+        private const string TERMINAL_INFO = "terminal_info";
+        private const string PROD_CODE = "prod_code";
+        private const string NOTIFY_URL = "notify_url";
+        private const string CHARSET = "charset";
+        private const string ENCRYPT_TYPE = "encrypt_type";
+        private const string BIZ_CONTENT = "biz_content";
+        private const string APP_AUTH_TOKEN = "app_auth_token";
+        private const string RETURN_URL = "return_url";
+
+        private JsonSerializerSettings Settings { get; set; }
+
+        public AlipayOptions Options { get; set; }
+
+        protected internal HttpClientEx Client { get; set; }
+
+        #region AlipayClient Constructors
+
+        public AlipayClient(IOptions<AlipayOptions> optionsAccessor)
+        {
+            Options = optionsAccessor?.Value ?? new AlipayOptions();
+            Settings = new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore };
+            Client = new HttpClientEx();
+        }
+
+        public AlipayClient(string serverUrl, string appId, string privateKey)
+            : this(null)
+        {
+            Options.AppId = appId;
+            Options.RsaPrivateKey = privateKey;
+            Options.ServerUrl = serverUrl;
+        }
+
+        public AlipayClient(string serverUrl, string appId, string privateKey, string format)
+            : this(serverUrl, appId, privateKey)
+        {
+            Options.Format = format;
+        }
+
+        public AlipayClient(string serverUrl, string appId, string privateKey, string format, string version, string signType)
+            : this(serverUrl, appId, privateKey, format)
+        {
+            Options.Version = version;
+            Options.SignType = signType;
+        }
+
+        public AlipayClient(string serverUrl, string appId, string privateKey, string format, string version, string signType, string alipayPulicKey)
+            : this(serverUrl, appId, privateKey, format, version, signType)
+        {
+            Options.RsaPublicKey = alipayPulicKey;
+        }
+
+        public AlipayClient(string serverUrl, string appId, string privateKey, string format, string version, string signType, string alipayPulicKey, string encyptKey)
+            : this(serverUrl, appId, privateKey, format, version, signType, alipayPulicKey)
+        {
+            Options.EncyptKey = encyptKey;
+            Options.EncyptType = "AES";
+        }
+
+        public void SetTimeout(int timeout)
+        {
+            Client.Timeout = new TimeSpan(0, 0, 0, timeout);
+        }
+
+        #endregion
+
+        #region IAlipayClient Members
+
+        public async Task<T> ExecuteAsync<T>(IAlipayRequest<T> request) where T : AlipayResponse
+        {
+            return await ExecuteAsync<T>(request, null);
+        }
+
+        public async Task<T> ExecuteAsync<T>(IAlipayRequest<T> request, string accessToken) where T : AlipayResponse
+        {
+
+            return await ExecuteAsync<T>(request, accessToken, null);
+
+        }
+        #endregion
+
+        #region IAlipayClient Members
+        public async Task<T> PageExecuteAsync<T>(IAlipayRequest<T> request) where T : AlipayResponse
+        {
+            return await PageExecuteAsync<T>(request, null, "POST");
+        }
+        #endregion
+
+        #region IAlipayClient Members
+        public async Task<T> PageExecuteAsync<T>(IAlipayRequest<T> request, string accessToken, string reqMethod) where T : AlipayResponse
+        {
+            string apiVersion = null;
+
+            if (!string.IsNullOrEmpty(request.GetApiVersion()))
+            {
+                apiVersion = request.GetApiVersion();
+            }
+            else
+            {
+                apiVersion = Options.Version;
+            }
+
+            var txtParams = new AlipayDictionary(request.GetParameters())
+            {
+                // 序列化BizModel
+                { BIZ_CONTENT, JsonConvert.SerializeObject(request.GetBizModel(), Settings) },
+                // 添加协议级请求参数
+                { METHOD, request.GetApiName() },
+                { VERSION, apiVersion },
+                { APP_ID, Options.AppId },
+                { FORMAT, Options.Format },
+                { TIMESTAMP, DateTime.Now },
+                { ACCESS_TOKEN, accessToken },
+                { SIGN_TYPE, Options.SignType },
+                { TERMINAL_TYPE, request.GetTerminalType() },
+                { TERMINAL_INFO, request.GetTerminalInfo() },
+                { PROD_CODE, request.GetProdCode() },
+                { NOTIFY_URL, request.GetNotifyUrl() },
+                { CHARSET, Options.Charset },
+                { RETURN_URL, request.GetReturnUrl() }
+            };
+
+            // 添加签名参数
+            txtParams.Add(SIGN, AlipaySignature.RSASign(txtParams, Options.RsaPrivateKey, Options.SignType));
+
+            // 是否需要上传文件
+            string body;
+
+            if (request is IAlipayUploadRequest<T> uRequest)
+            {
+                var fileParams = AlipayUtility.CleanupDictionary(uRequest.GetFileParameters());
+                body = await Client.DoPostAsync(Options.ServerUrl, txtParams, fileParams);
+            }
+            else
+            {
+
+                if (reqMethod.Equals("GET"))
+                {
+                    //拼接get请求的url
+                    var tmpUrl = Options.ServerUrl;
+                    if (txtParams != null && txtParams.Count > 0)
+                    {
+                        if (tmpUrl.Contains("?"))
+                        {
+                            tmpUrl = tmpUrl + "&" + HttpClientEx.BuildQuery(txtParams);
+                        }
+                        else
+                        {
+                            tmpUrl = tmpUrl + "?" + HttpClientEx.BuildQuery(txtParams);
+                        }
+                    }
+                    body = tmpUrl;
+                }
+                else
+                {
+                    //输出post表单
+                    body = BuildHtmlRequest(txtParams, reqMethod, reqMethod);
+                }
+            }
+
+            T rsp = null;
+            IAlipayParser<T> parser = null;
+            if ("json".Equals(Options.Format))
+            {
+                parser = new AlipayJsonParser<T>();
+                rsp = parser.Parse(body);
+            }
+            return rsp;
+        }
+
+        #endregion
+
+        #region IAlipayClient Members
+        public async Task<T> ExecuteAsync<T>(IAlipayRequest<T> request, string accessToken, string appAuthToken) where T : AlipayResponse
+        {
+            string apiVersion = null;
+
+            if (!string.IsNullOrEmpty(request.GetApiVersion()))
+            {
+                apiVersion = request.GetApiVersion();
+            }
+            else
+            {
+                apiVersion = Options.Version;
+            }
+
+            // 添加协议级请求参数
+            var txtParams = new AlipayDictionary(request.GetParameters())
+            {
+                { BIZ_CONTENT, JsonConvert.SerializeObject(request.GetBizModel(), Settings) },
+                { METHOD, request.GetApiName() },
+                { VERSION, apiVersion },
+                { APP_ID, Options.AppId },
+                { FORMAT, Options.Format },
+                { TIMESTAMP, DateTime.Now },
+                { ACCESS_TOKEN, accessToken },
+                { SIGN_TYPE, Options.SignType },
+                { TERMINAL_TYPE, request.GetTerminalType() },
+                { TERMINAL_INFO, request.GetTerminalInfo() },
+                { PROD_CODE, request.GetProdCode() },
+                { CHARSET, Options.Charset }
+            };
+
+            if (!string.IsNullOrEmpty(request.GetNotifyUrl()))
+            {
+                txtParams.Add(NOTIFY_URL, request.GetNotifyUrl());
+            }
+
+            if (!string.IsNullOrEmpty(appAuthToken))
+            {
+                txtParams.Add(APP_AUTH_TOKEN, appAuthToken);
+            }
+
+            if (request.GetNeedEncrypt())
+            {
+
+                if (string.IsNullOrEmpty(txtParams[BIZ_CONTENT]))
+                {
+                    throw new AlipayException("api request Fail ! The reason: encrypt request is not supported!");
+                }
+
+                if (string.IsNullOrEmpty(Options.EncyptKey) || string.IsNullOrEmpty(Options.EncyptType))
+                {
+                    throw new AlipayException("encryptType or encryptKey must not null!");
+                }
+
+                if (!"AES".Equals(Options.EncyptType))
+                {
+                    throw new AlipayException("api only support Aes!");
+
+                }
+
+                var encryptContent = AlipayUtility.AesEncrypt(Options.EncyptKey, txtParams[BIZ_CONTENT]);
+                txtParams.Remove(BIZ_CONTENT);
+                txtParams.Add(BIZ_CONTENT, encryptContent);
+                txtParams.Add(ENCRYPT_TYPE, Options.EncyptType);
+            }
+
+            // 添加签名参数
+            txtParams.Add(SIGN, AlipaySignature.RSASign(txtParams, Options.RsaPrivateKey, Options.SignType));
+
+            // 是否需要上传文件
+            string body;
+            if (request is IAlipayUploadRequest<T> uRequest)
+            {
+                var fileParams = AlipayUtility.CleanupDictionary(uRequest.GetFileParameters());
+                body = await Client.DoPostAsync(Options.ServerUrl, txtParams, fileParams);
+            }
+            else
+            {
+                body = await Client.DoPostAsync(Options.ServerUrl, txtParams);
+            }
+
+            T rsp = null;
+            IAlipayParser<T> parser = null;
+            if ("json".Equals(Options.Format))
+            {
+                parser = new AlipayJsonParser<T>();
+            }
+
+            var item = ParseRespItem(request, body, parser, Options.EncyptKey, Options.EncyptType);
+
+            rsp = parser.Parse(item.realContent);
+
+            CheckResponseSign(request, item.respContent, rsp.IsError, parser, Options.RsaPublicKey, Options.SignType);
+
+            return rsp;
+
+        }
+
+        private ResponseParseItem ParseRespItem<T>(IAlipayRequest<T> request, string respBody, IAlipayParser<T> parser, string encryptKey, string encryptType) where T : AlipayResponse
+        {
+            string realContent = null;
+
+            if (request.GetNeedEncrypt())
+            {
+                realContent = parser.EncryptSourceData(request, respBody, encryptType, encryptKey);
+            }
+            else
+            {
+                realContent = respBody;
+            }
+
+            var item = new ResponseParseItem()
+            {
+                realContent = realContent,
+                respContent = respBody
+            };
+            return item;
+
+        }
+
+        private void CheckResponseSign<T>(IAlipayRequest<T> request, string responseBody, bool isError, IAlipayParser<T> parser, string alipayPublicKey, string signType) where T : AlipayResponse
+        {
+            var signItem = parser.GetSignItem(request, responseBody);
+            if (signItem == null)
+            {
+                throw new AlipayException("sign check fail: Body is Empty!");
+            }
+
+            if (!isError || (isError && !string.IsNullOrEmpty(signItem.Sign)))
+            {
+                var rsaCheckContent = AlipaySignature.RSACheckContent(signItem.SignSourceDate, signItem.Sign, alipayPublicKey, signType);
+                if (!rsaCheckContent)
+                {
+                    if (!string.IsNullOrEmpty(signItem.SignSourceDate) && signItem.SignSourceDate.Contains("\\/"))
+                    {
+                        var srouceData = signItem.SignSourceDate.Replace("\\/", "/");
+                        var jsonCheck = AlipaySignature.RSACheckContent(srouceData, signItem.Sign, alipayPublicKey, signType);
+                        if (!jsonCheck)
+                        {
+                            throw new AlipayException("sign check fail: check Sign and Data Fail JSON also");
+                        }
+                    }
+                    else
+                    {
+                        throw new AlipayException("sign check fail: check Sign and Data Fail!");
+                    }
+                }
+
+            }
+        }
+
+        #endregion
+
+        #region IAlipayClient Members
+        public string BuildHtmlRequest(IDictionary<string, string> sParaTemp, string strMethod, string strButtonValue)
+        {
+            //待请求参数数组
+            var dicPara = new Dictionary<string, string>(sParaTemp);
+
+            var sbHtml = new StringBuilder();
+            sbHtml.Append("<form id='alipaysubmit' name='alipaysubmit' action='" + Options.ServerUrl + "?charset=" + Options.Charset +
+                 "' method='" + strMethod + "' style='display:none;'>");
+
+            foreach (var temp in dicPara)
+            {
+                sbHtml.Append("<input  name='" + temp.Key + "' value='" + temp.Value + "'/>");
+            }
+            sbHtml.Append("<input type='submit' value='" + strButtonValue + "' style='display:none;'></form>");
+            //表单实现自动提交
+            sbHtml.Append("<script>document.forms['alipaysubmit'].submit();</script>");
+
+            return sbHtml.ToString();
+        }
+        #endregion
+
+        #region SDK Execute
+
+        public T SdkExecute<T>(IAlipayRequest<T> request) where T : AlipayResponse
+        {
+            // 构造请求参数
+            var requestParams = BuildRequestParams(request, null, null);
+
+            // 字典排序
+            var sortedParams = new SortedDictionary<string, string>(requestParams);
+            var sortedAlipayDic = new AlipayDictionary(sortedParams);
+
+            // 参数签名
+            var signResult = AlipaySignature.RSASign(sortedAlipayDic, Options.RsaPrivateKey, Options.SignType);
+
+            // 添加签名结果参数
+            sortedAlipayDic.Add(SIGN, signResult);
+
+            // 参数拼接
+            var signedResult = HttpClientEx.BuildQuery(sortedAlipayDic);
+
+            // 构造结果
+            var rsp = (T)Activator.CreateInstance(typeof(T));
+            rsp.Body = signedResult;
+            return rsp;
+        }
+
+        #endregion
+
+        #region Common Method
+
+        private AlipayDictionary BuildRequestParams<T>(IAlipayRequest<T> request, string accessToken, string appAuthToken) where T : AlipayResponse
+        {
+            // 默认参数
+            var result = new AlipayDictionary(request.GetParameters())
+            {
+                // 序列化BizModel
+                { BIZ_CONTENT, JsonConvert.SerializeObject(request.GetBizModel(), Settings) },
+                // 添加协议级请求参数,为空的参数后面会自动过滤,这里不做处理。
+                { METHOD, request.GetApiName() },
+                // 获取参数
+                { VERSION, string.IsNullOrEmpty(request.GetApiVersion()) ? Options.Version : request.GetApiVersion() },
+                { APP_ID, Options.AppId },
+                { FORMAT, Options.Format },
+                { TIMESTAMP, DateTime.Now },
+                { ACCESS_TOKEN, accessToken },
+                { SIGN_TYPE, Options.SignType },
+                { TERMINAL_TYPE, request.GetTerminalType() },
+                { TERMINAL_INFO, request.GetTerminalInfo() },
+                { PROD_CODE, request.GetProdCode() },
+                { NOTIFY_URL, request.GetNotifyUrl() },
+                { CHARSET, Options.Charset },
+                { RETURN_URL, request.GetReturnUrl() },
+                { APP_AUTH_TOKEN, appAuthToken }
+            };
+
+            if (request.GetNeedEncrypt())
+            {
+                if (string.IsNullOrEmpty(result[BIZ_CONTENT]))
+                {
+                    throw new AlipayException("api request Fail ! The reason: encrypt request is not supported!");
+                }
+
+                if (string.IsNullOrEmpty(Options.EncyptKey) || string.IsNullOrEmpty(Options.EncyptType))
+                {
+                    throw new AlipayException("encryptType or encryptKey must not null!");
+                }
+
+                if (!"AES".Equals(Options.EncyptType))
+                {
+                    throw new AlipayException("api only support Aes!");
+                }
+
+                var encryptContent = AlipayUtility.AesEncrypt(Options.EncyptKey, result[BIZ_CONTENT]);
+                result.Remove(BIZ_CONTENT);
+                result.Add(BIZ_CONTENT, encryptContent);
+                result.Add(ENCRYPT_TYPE, Options.EncyptType);
+            }
+
+            return result;
+        }
+
+        #endregion
+    }
+}

+ 11 - 0
src/Essensoft.AspNetCore.Alipay/AlipayConstants.cs

@@ -0,0 +1,11 @@
+namespace Essensoft.AspNetCore.Alipay
+{
+    public class AlipayConstants
+    {
+        public const string RESPONSE_SUFFIX = "_response";
+        public const string ERROR_RESPONSE = "error_response";
+        public const string SIGN = "sign";
+
+        public const string ENCRYPT_NODE_NAME = "response_encrypted";
+    }
+}

+ 73 - 0
src/Essensoft.AspNetCore.Alipay/AlipayDictionary.cs

@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay
+{
+    /// <summary>
+    /// 符合Alipay习惯的纯字符串字典结构。
+    /// </summary>
+    public class AlipayDictionary : Dictionary<string, string>
+    {
+        private const string DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
+
+        public AlipayDictionary() { }
+
+        public AlipayDictionary(IDictionary<string, string> dictionary)
+            : base(dictionary)
+        { }
+
+        /// <summary>
+        /// 添加一个新的键值对。空键或者空值的键值对将会被忽略。
+        /// </summary>
+        /// <param name="key">键名称</param>
+        /// <param name="value">键对应的值,目前支持:string, int, long, double, bool, DateTime类型</param>
+        public void Add(string key, object value)
+        {
+            string strValue;
+
+            if (value == null)
+            {
+                strValue = null;
+            }
+            else if (value is string)
+            {
+                strValue = (string)value;
+            }
+            else if (value is DateTime?)
+            {
+                var dateTime = value as DateTime?;
+                strValue = dateTime.Value.ToString(DATE_TIME_FORMAT);
+            }
+            else if (value is int?)
+            {
+                strValue = (value as int?).Value.ToString();
+            }
+            else if (value is long?)
+            {
+                strValue = (value as long?).Value.ToString();
+            }
+            else if (value is double?)
+            {
+                strValue = (value as double?).Value.ToString();
+            }
+            else if (value is bool?)
+            {
+                strValue = (value as bool?).Value.ToString().ToLower();
+            }
+            else
+            {
+                strValue = value.ToString();
+            }
+
+            Add(key, strValue);
+        }
+
+        public new void Add(string key, string value)
+        {
+            if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(value))
+            {
+                base.Add(key, value);
+            }
+        }
+    }
+}

+ 45 - 0
src/Essensoft.AspNetCore.Alipay/AlipayException.cs

@@ -0,0 +1,45 @@
+using System;
+
+namespace Essensoft.AspNetCore.Alipay
+{
+    /// <summary>
+    /// Alipay客户端异常。
+    /// </summary>
+    public class AlipayException : Exception
+    {
+        private string errorCode;
+        private string errorMsg;
+
+        public AlipayException()
+            : base()
+        {
+        }
+
+        public AlipayException(string message)
+            : base(message)
+        {
+        }
+
+        public AlipayException(string message, Exception innerException)
+            : base(message, innerException)
+        {
+        }
+
+        public AlipayException(string errorCode, string errorMsg)
+            : base(errorCode + ":" + errorMsg)
+        {
+            this.errorCode = errorCode;
+            this.errorMsg = errorMsg;
+        }
+
+        public string ErrorCode
+        {
+            get { return errorCode; }
+        }
+
+        public string ErrorMsg
+        {
+            get { return errorMsg; }
+        }
+    }
+}

+ 174 - 0
src/Essensoft.AspNetCore.Alipay/AlipayMobilePublicMultiMediaClient.cs

@@ -0,0 +1,174 @@
+using Essensoft.AspNetCore.Alipay.Parser;
+using Essensoft.AspNetCore.Alipay.Request;
+using Essensoft.AspNetCore.Alipay.Response;
+using Essensoft.AspNetCore.Alipay.Utility;
+using Microsoft.Extensions.Options;
+using System;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace Essensoft.AspNetCore.Alipay
+{
+    public class AlipayMobilePublicMultiMediaClient : IAlipayClient
+    {
+
+        public const string APP_ID = "app_id";
+        public const string FORMAT = "format";
+        public const string METHOD = "method";
+        public const string TIMESTAMP = "timestamp";
+        public const string VERSION = "version";
+        public const string SIGN_TYPE = "sign_type";
+        public const string ACCESS_TOKEN = "auth_token";
+        public const string SIGN = "sign";
+        public const string TERMINAL_TYPE = "terminal_type";
+        public const string TERMINAL_INFO = "terminal_info";
+        public const string PROD_CODE = "prod_code";
+        public const string APP_AUTH_TOKEN = "app_auth_token";
+
+        public AlipayOptions Options { get; set; }
+
+        protected internal HttpClientEx Client { get; set; }
+
+        #region AlipayClient Constructors
+
+        public AlipayMobilePublicMultiMediaClient(IOptions<AlipayOptions> optionsAccessor)
+        {
+            Options = optionsAccessor?.Value ?? new AlipayOptions();
+            Client = new HttpClientEx();
+        }
+
+        public AlipayMobilePublicMultiMediaClient(string serverUrl, string appId, string privateKey)
+            : this(null)
+        {
+            Options.AppId = appId;
+            Options.RsaPrivateKey = privateKey;
+            Options.ServerUrl = serverUrl;
+        }
+
+        public AlipayMobilePublicMultiMediaClient(string serverUrl, string appId, string privateKey, string format)
+            : this(serverUrl, appId, privateKey)
+        {
+            Options.Format = format;
+        }
+
+        public AlipayMobilePublicMultiMediaClient(string serverUrl, string appId, string privateKey, string format, string version, string signType)
+            : this(serverUrl, appId, privateKey, format)
+        {
+            Options.Version = version;
+            Options.SignType = signType;
+        }
+
+        public void SetTimeout(int timeout)
+        {
+            Client.Timeout = new TimeSpan(0, 0, 0, timeout);
+        }
+
+        #endregion
+
+        #region IAlipayClient Members
+
+        public async Task<T> ExecuteAsync<T>(IAlipayRequest<T> request) where T : AlipayResponse
+        {
+            return await ExecuteAsync<T>(request, null);
+        }
+
+        public async Task<T> ExecuteAsync<T>(IAlipayRequest<T> request, string accessToken) where T : AlipayResponse
+        {
+
+            return await ExecuteAsync<T>(request, accessToken, null);
+        }
+
+        public async Task<T> ExecuteAsync<T>(IAlipayRequest<T> request, string accessToken, string appAuthToken) where T : AlipayResponse
+        {
+
+            var multiMediaDownloadRequest = ((AlipayMobilePublicMultiMediaDownloadRequest)request);
+            // 添加协议级请求参数
+            var txtParams = new AlipayDictionary(request.GetParameters())
+            {
+                { METHOD, request.GetApiName() },
+                { VERSION, Options.Version },
+                { APP_ID, Options.AppId },
+                { FORMAT, Options.Format },
+                { TIMESTAMP, DateTime.Now },
+                { ACCESS_TOKEN, accessToken },
+                { SIGN_TYPE, Options.SignType },
+                { TERMINAL_TYPE, request.GetTerminalType() },
+                { TERMINAL_INFO, request.GetTerminalInfo() },
+                { PROD_CODE, request.GetProdCode() }
+            };
+
+            if (!string.IsNullOrEmpty(appAuthToken))
+            {
+                txtParams.Add(APP_AUTH_TOKEN, appAuthToken);
+            }
+
+            // 添加签名参数
+            txtParams.Add(SIGN, AlipaySignature.RSASign(txtParams, Options.RsaPrivateKey, Options.SignType));
+
+            var outStream = multiMediaDownloadRequest.Stream;
+            var rsp = await DoGetAsync(txtParams, outStream);
+
+            return (T)rsp;
+
+        }
+
+        #endregion
+
+        private async Task<AlipayResponse> DoGetAsync(AlipayDictionary parameters, Stream outStream)
+        {
+            AlipayMobilePublicMultiMediaDownloadResponse response = null;
+
+            var url = Options.ServerUrl;
+            if (parameters != null && parameters.Count > 0)
+            {
+                if (url.Contains("?"))
+                {
+                    url = url + "&" + HttpClientEx.BuildQuery(parameters);
+                }
+                else
+                {
+                    url = url + "?" + HttpClientEx.BuildQuery(parameters);
+                }
+            }
+
+
+            using (var clientResponse = await Client.GetAsync(url))
+            {
+                if (clientResponse.StatusCode == System.Net.HttpStatusCode.OK)
+                {
+                    using (var content = clientResponse.Content)
+                    {
+                        if (content.Headers.ContentType.ToString().ToLower().Contains("text/plain"))
+                        {
+                            var body = await content.ReadAsStringAsync();
+                            IAlipayParser<AlipayMobilePublicMultiMediaDownloadResponse> tp = new AlipayJsonParser<AlipayMobilePublicMultiMediaDownloadResponse>();
+                            response = tp.Parse(body);
+                        }
+                        else
+                        {
+                            outStream = await content.ReadAsStreamAsync();
+                            response = new AlipayMobilePublicMultiMediaDownloadResponse();
+                        }
+                    }
+                }
+            }
+
+            return response;
+        }
+
+        public Task<T> PageExecuteAsync<T>(IAlipayRequest<T> request) where T : AlipayResponse
+        {
+            throw new NotImplementedException();
+        }
+
+        public Task<T> PageExecuteAsync<T>(IAlipayRequest<T> request, string session, string reqMethod) where T : AlipayResponse
+        {
+            throw new NotImplementedException();
+        }
+
+        public T SdkExecute<T>(IAlipayRequest<T> request) where T : AlipayResponse
+        {
+            throw new NotImplementedException();
+        }
+    }
+}

+ 120 - 0
src/Essensoft.AspNetCore.Alipay/AlipayMobilePublicMultiMediaDownloadRequest.cs

@@ -0,0 +1,120 @@
+using Essensoft.AspNetCore.Alipay.Response;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Essensoft.AspNetCore.Alipay.Request
+{
+    public class AlipayMobilePublicMultiMediaDownloadRequest : IAlipayRequest<AlipayMobilePublicMultiMediaDownloadResponse>
+    {
+
+        public string BizContent { get; set; }
+        public Stream Stream { set; get; }
+
+        #region IAlipayRequest Members
+
+        private string apiVersion = "1.0";
+        private string terminalType;
+        private string terminalInfo;
+        private string prodCode;
+        private string notifyUrl;
+        private string returnUrl;
+        private bool needEncrypt = false;
+        private AlipayObject bizModel;
+
+      public void SetNeedEncrypt(bool needEncrypt)
+        {
+            this.needEncrypt = needEncrypt;
+        }
+
+      public  bool GetNeedEncrypt()
+        {
+            return needEncrypt;
+        }
+
+        public void SetNotifyUrl(string notifyUrl)
+        {
+            this.notifyUrl = notifyUrl;
+        }
+
+        public string GetNotifyUrl()
+        {
+            return notifyUrl;
+        }
+
+        public void SetReturnUrl(string returnUrl)
+        {
+            this.returnUrl = returnUrl;
+        }
+
+        public string GetReturnUrl()
+        {
+            return returnUrl;
+        }
+
+        public void SetApiVersion(string apiVersion)
+        {
+            this.apiVersion = apiVersion;
+        }
+
+        public string GetApiVersion()
+        {
+            return apiVersion;
+        }
+
+        public void SetTerminalType(string terminalType)
+        {
+            this.terminalType = terminalType;
+        }
+
+        public string GetTerminalType()
+        {
+            return terminalType;
+        }
+
+        public void SetTerminalInfo(string terminalInfo)
+        {
+            this.terminalInfo = terminalInfo;
+        }
+
+        public string GetTerminalInfo()
+        {
+            return terminalInfo;
+        }
+
+        public void SetProdCode(string prodCode)
+        {
+            this.prodCode = prodCode;
+        }
+
+        public string GetProdCode()
+        {
+            return prodCode;
+        }
+
+        public string GetApiName()
+        {
+            return "alipay.mobile.public.multimedia.download";
+        }
+
+        public IDictionary<string, string> GetParameters()
+        {
+            var parameters = new AlipayDictionary()
+            {
+                { "biz_content", BizContent }
+            };
+            return parameters;
+        }
+
+        public AlipayObject GetBizModel()
+        {
+            return bizModel;
+        }
+
+        public void SetBizModel(AlipayObject bizModel)
+        {
+            this.bizModel = bizModel;
+        }
+
+        #endregion
+    }
+}

+ 9 - 0
src/Essensoft.AspNetCore.Alipay/AlipayMobilePublicMultiMediaDownloadResponse.cs

@@ -0,0 +1,9 @@
+namespace Essensoft.AspNetCore.Alipay.Response
+{
+    /// <summary>
+    /// AlipayMobilePublicMultiMediaDownloadResponse.
+    /// </summary>
+    public class AlipayMobilePublicMultiMediaDownloadResponse : AlipayResponse
+    {
+    }
+}

+ 86 - 0
src/Essensoft.AspNetCore.Alipay/AlipayNotifyClient.cs

@@ -0,0 +1,86 @@
+using Essensoft.AspNetCore.Alipay.Parser;
+using Essensoft.AspNetCore.Alipay.Utility;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Options;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Essensoft.AspNetCore.Alipay
+{
+    public class AlipayNotifyClient
+    {
+        public AlipayOptions Options { get; set; }
+        public AlipayNotifyClient(IOptions<AlipayOptions> optionsAccessor)
+        {
+            Options = optionsAccessor?.Value ?? new AlipayOptions();
+        }
+
+        public AlipayNotifyClient(string signType, string alipayPublicKey)
+            : this(null)
+        {
+            Options.SignType = signType;
+            Options.RsaPublicKey = alipayPublicKey;
+        }
+
+        public T Execute<T>(HttpRequest request) where T : AlipayObject
+        {
+            var parameters = GetParameters(request);
+            var parser = new AlipayDictionaryParser<T>();
+            var rsp = parser.Parse(parameters);
+
+            CheckNotifySign(parameters, Options.RsaPublicKey, Options.SignType);
+            return rsp;
+        }
+
+        private SortedDictionary<string, string> GetParameters(HttpRequest request)
+        {
+            var parameters = new SortedDictionary<string, string>();
+            if (request.Method == "POST")
+            {
+                foreach (var item in request?.Form)
+                {
+                    parameters.Add(item.Key, item.Value);
+                }
+            }
+            else if (request.Method == "GET")
+            {
+                foreach (var item in request?.Query)
+                {
+                    parameters.Add(item.Key, item.Value);
+                }
+            }
+            return parameters;
+        }
+
+        private void CheckNotifySign(IDictionary<string, string> parameters, string alipayPublicKey, string signType)
+        {
+            if (parameters.Count == 0)
+            {
+                throw new AlipayException("sign check fail: Body is Empty!");
+            }
+
+            var sign = parameters["sign"];
+            if (!string.IsNullOrEmpty(sign))
+            {
+                var prestr = GetSignContent(parameters);
+                if (!AlipaySignature.RSACheckContent(prestr, sign, alipayPublicKey, signType))
+                {
+                    throw new AlipayException("sign check fail: check Sign and Data Fail JSON also");
+                }
+            }
+        }
+
+        private string GetSignContent(IDictionary<string, string> parameters)
+        {
+            var content = new StringBuilder();
+            foreach (var iter in parameters)
+            {
+                if (iter.Key.ToLower() != "sign" && iter.Key.ToLower() != "sign_type" && !string.IsNullOrEmpty(iter.Value))
+                {
+                    content.Append(iter.Key + "=" + iter.Value + "&");
+                }
+            }
+            return content.ToString().Substring(0, content.Length - 1);
+        }
+    }
+}

+ 9 - 0
src/Essensoft.AspNetCore.Alipay/AlipayObject.cs

@@ -0,0 +1,9 @@
+namespace Essensoft.AspNetCore.Alipay
+{
+    /// <summary>
+    /// 基础对象。
+    /// </summary>
+    public abstract class AlipayObject
+    {
+    }
+}

+ 55 - 0
src/Essensoft.AspNetCore.Alipay/AlipayOptions.cs

@@ -0,0 +1,55 @@
+namespace Essensoft.AspNetCore.Alipay
+{
+    public class AlipayOptions
+    {
+        /// <summary>
+        /// 应用ID
+        /// </summary>
+        public string AppId { get; set; }
+
+        /// <summary>
+        /// 支付宝公钥
+        /// </summary>
+        public string RsaPublicKey { get; set; }
+        
+        /// <summary>
+        /// 商户私钥
+        /// </summary>
+        public string RsaPrivateKey { get; set; }
+
+        /// <summary>
+        /// 服务地址
+        /// </summary>
+        public string ServerUrl { get; set; } = "https://openapi.alipay.com/gateway.do";
+
+        /// <summary>
+        /// 数据格式
+        /// </summary>
+        public string Format { get; set; } = "json";
+
+        /// <summary>
+        /// 接口版本
+        /// </summary>
+        public string Version { get; set; } = "1.0";
+
+        /// <summary>
+        /// 签名方式
+        /// </summary>
+        public string SignType { get; set; } = "RSA2";
+
+        /// <summary>
+        /// 编码格式
+        /// </summary>
+        public string Charset { get; } = "utf-8";
+
+        /// <summary>
+        /// 加密方式
+        /// </summary>
+        public string EncyptType { get; set; } = "AES";
+
+        /// <summary>
+        /// 加密秘钥
+        /// </summary>
+        public string EncyptKey { get; set; }
+    }
+}

+ 89 - 0
src/Essensoft.AspNetCore.Alipay/AlipayResponse.cs

@@ -0,0 +1,89 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay
+{
+
+    public abstract class AlipayResponse
+    {
+        private string code;
+        private string msg;
+        private string subCode;
+        private string subMsg;
+        private string sign;
+        private string body;
+
+        /// <summary>
+        /// 错误码
+        /// 对应 ErrCode
+        /// </summary>
+        [JsonProperty("code")]
+        public string Code
+        {
+            get { return code; }
+            set { code = value; }
+        }
+
+        /// <summary>
+        /// 错误信息
+        /// 对应 ErrMsg
+        /// </summary>
+        [JsonProperty("msg")]
+        public string Msg
+        {
+            get { return msg; }
+            set { msg = value; }
+        }
+
+        /// <summary>
+        /// 子错误码
+        /// 对应 SubErrCode
+        /// </summary>
+        [JsonProperty("sub_code")]
+        public string SubCode
+        {
+            get { return subCode; }
+            set { subCode = value; }
+        }
+
+        /// <summary>
+        /// 子错误信息
+        /// 对应 SubErrMsg
+        /// </summary>
+        [JsonProperty("sub_msg")]
+        public string SubMsg
+        {
+            get { return subMsg; }
+            set { subMsg = value; }
+        }
+
+        /// <summary>
+        /// 签名
+        /// </summary>
+        [JsonProperty("sign")]
+        public string Sign
+        {
+            get { return sign; }
+            set { sign = value; }
+        }
+
+        /// <summary>
+        /// 响应原始内容
+        /// </summary>
+        public string Body
+        {
+            get { return body; }
+            set { body = value; }
+        }
+
+        /// <summary>
+        /// 响应结果是否错误
+        /// </summary>
+        public bool IsError
+        {
+            get
+            {
+                return !string.IsNullOrEmpty(SubCode);
+            }
+        }
+    }
+}

+ 46 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessOrdersFeedBack.cs

@@ -0,0 +1,46 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessOrdersFeedBack Data Structure.
+    /// </summary>
+    public class AccessOrdersFeedBack : AlipayObject
+    {
+        /// <summary>
+        /// 错误码
+        /// </summary>
+        [JsonProperty("error_code")]
+        public string ErrorCode { get; set; }
+
+        /// <summary>
+        /// 错误描述
+        /// </summary>
+        [JsonProperty("error_desc")]
+        public string ErrorDesc { get; set; }
+
+        /// <summary>
+        /// 反馈主键ID(生产单ID或者采购单ID或者码token)
+        /// </summary>
+        [JsonProperty("feedback_id")]
+        public string FeedbackId { get; set; }
+
+        /// <summary>
+        /// 生产单:PRODUCE_ORDER  采购单:PURCHASE_ORDER  二维码:QRCODE
+        /// </summary>
+        [JsonProperty("order_type")]
+        public string OrderType { get; set; }
+
+        /// <summary>
+        /// 外部单据号
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// 每条记录处理结果
+        /// </summary>
+        [JsonProperty("success")]
+        public bool Success { get; set; }
+    }
+}

+ 46 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessOrdersFeedBackResult.cs

@@ -0,0 +1,46 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessOrdersFeedBackResult Data Structure.
+    /// </summary>
+    public class AccessOrdersFeedBackResult : AlipayObject
+    {
+        /// <summary>
+        /// 错误码
+        /// </summary>
+        [JsonProperty("error_code")]
+        public string ErrorCode { get; set; }
+
+        /// <summary>
+        /// 错误描述
+        /// </summary>
+        [JsonProperty("error_desc")]
+        public string ErrorDesc { get; set; }
+
+        /// <summary>
+        /// 反馈主键ID(生产单ID或者采购单ID或者码token)
+        /// </summary>
+        [JsonProperty("feedback_id")]
+        public string FeedbackId { get; set; }
+
+        /// <summary>
+        /// 生产单:PRODUCE_ORDER  采购单:PURCHASE_ORDER  二维码:QRCODE
+        /// </summary>
+        [JsonProperty("order_type")]
+        public string OrderType { get; set; }
+
+        /// <summary>
+        /// 外部单据号
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// 每条记录处理结果
+        /// </summary>
+        [JsonProperty("success")]
+        public bool Success { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessParams.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessParams Data Structure.
+    /// </summary>
+    public class AccessParams : AlipayObject
+    {
+        /// <summary>
+        /// 目前支持以下值:  1. ALIPAYAPP  (钱包h5页面签约)  2. QRCODE(扫码签约)  3. QRCODEORSMS(扫码签约或者短信签约)
+        /// </summary>
+        [JsonProperty("channel")]
+        public string Channel { get; set; }
+    }
+}

+ 64 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessProduceOrder.cs

@@ -0,0 +1,64 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessProduceOrder Data Structure.
+    /// </summary>
+    public class AccessProduceOrder : AlipayObject
+    {
+        /// <summary>
+        /// 口碑码批次号
+        /// </summary>
+        [JsonProperty("batch_id")]
+        public string BatchId { get; set; }
+
+        /// <summary>
+        /// 生产单标识
+        /// </summary>
+        [JsonProperty("produce_order_id")]
+        public string ProduceOrderId { get; set; }
+
+        /// <summary>
+        /// 生产数量
+        /// </summary>
+        [JsonProperty("produce_quantity")]
+        public long ProduceQuantity { get; set; }
+
+        /// <summary>
+        /// 物料属性名称
+        /// </summary>
+        [JsonProperty("stuff_attr_name")]
+        public string StuffAttrName { get; set; }
+
+        /// <summary>
+        /// 物料材质
+        /// </summary>
+        [JsonProperty("stuff_material")]
+        public string StuffMaterial { get; set; }
+
+        /// <summary>
+        /// 物料尺寸
+        /// </summary>
+        [JsonProperty("stuff_size")]
+        public string StuffSize { get; set; }
+
+        /// <summary>
+        /// 物料类型
+        /// </summary>
+        [JsonProperty("stuff_type")]
+        public string StuffType { get; set; }
+
+        /// <summary>
+        /// 模板唯一标识
+        /// </summary>
+        [JsonProperty("template_id")]
+        public string TemplateId { get; set; }
+
+        /// <summary>
+        /// 模板名称
+        /// </summary>
+        [JsonProperty("template_name")]
+        public string TemplateName { get; set; }
+    }
+}

+ 34 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessProduceQrcode.cs

@@ -0,0 +1,34 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessProduceQrcode Data Structure.
+    /// </summary>
+    public class AccessProduceQrcode : AlipayObject
+    {
+        /// <summary>
+        /// 口碑码批次号
+        /// </summary>
+        [JsonProperty("batch_id")]
+        public string BatchId { get; set; }
+
+        /// <summary>
+        /// 码url
+        /// </summary>
+        [JsonProperty("core_url")]
+        public string CoreUrl { get; set; }
+
+        /// <summary>
+        /// 生产单号
+        /// </summary>
+        [JsonProperty("produce_order_id")]
+        public string ProduceOrderId { get; set; }
+
+        /// <summary>
+        /// 二维码编码
+        /// </summary>
+        [JsonProperty("qrcode")]
+        public string Qrcode { get; set; }
+    }
+}

+ 124 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessPurchaseOrder.cs

@@ -0,0 +1,124 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessPurchaseOrder Data Structure.
+    /// </summary>
+    public class AccessPurchaseOrder : AlipayObject
+    {
+        /// <summary>
+        /// 申请日期, 格式:  yyyy-MM-dd HH:mm:ss
+        /// </summary>
+        [JsonProperty("apply_date")]
+        public string ApplyDate { get; set; }
+
+        /// <summary>
+        /// 申请订单明细号
+        /// </summary>
+        [JsonProperty("asset_item_id")]
+        public string AssetItemId { get; set; }
+
+        /// <summary>
+        /// 申请订单号
+        /// </summary>
+        [JsonProperty("asset_order_id")]
+        public string AssetOrderId { get; set; }
+
+        /// <summary>
+        /// 采购单号(订单汇总表ID)
+        /// </summary>
+        [JsonProperty("asset_purchase_id")]
+        public string AssetPurchaseId { get; set; }
+
+        /// <summary>
+        /// 市
+        /// </summary>
+        [JsonProperty("city")]
+        public string City { get; set; }
+
+        /// <summary>
+        /// 数量
+        /// </summary>
+        [JsonProperty("count")]
+        public string Count { get; set; }
+
+        /// <summary>
+        /// 订单创建日期, 格式: yyyy-MM-dd HH:mm:ss
+        /// </summary>
+        [JsonProperty("create_date")]
+        public string CreateDate { get; set; }
+
+        /// <summary>
+        /// 区
+        /// </summary>
+        [JsonProperty("district")]
+        public string District { get; set; }
+
+        /// <summary>
+        /// 是否需要生产
+        /// </summary>
+        [JsonProperty("is_produce")]
+        public string IsProduce { get; set; }
+
+        /// <summary>
+        /// 省
+        /// </summary>
+        [JsonProperty("province")]
+        public string Province { get; set; }
+
+        /// <summary>
+        /// 收货人地址
+        /// </summary>
+        [JsonProperty("receiver_address")]
+        public string ReceiverAddress { get; set; }
+
+        /// <summary>
+        /// 联系人电话
+        /// </summary>
+        [JsonProperty("receiver_mobile")]
+        public string ReceiverMobile { get; set; }
+
+        /// <summary>
+        /// 收货人姓名
+        /// </summary>
+        [JsonProperty("receiver_name")]
+        public string ReceiverName { get; set; }
+
+        /// <summary>
+        /// 物料类型
+        /// </summary>
+        [JsonProperty("stuff_attr_name")]
+        public string StuffAttrName { get; set; }
+
+        /// <summary>
+        /// 物料材质
+        /// </summary>
+        [JsonProperty("stuff_material")]
+        public string StuffMaterial { get; set; }
+
+        /// <summary>
+        /// 物料尺寸
+        /// </summary>
+        [JsonProperty("stuff_size")]
+        public string StuffSize { get; set; }
+
+        /// <summary>
+        /// 物料属性
+        /// </summary>
+        [JsonProperty("stuff_type")]
+        public string StuffType { get; set; }
+
+        /// <summary>
+        /// 模板ID
+        /// </summary>
+        [JsonProperty("template_id")]
+        public string TemplateId { get; set; }
+
+        /// <summary>
+        /// 模板名称,线下约定的物料名
+        /// </summary>
+        [JsonProperty("template_name")]
+        public string TemplateName { get; set; }
+    }
+}

+ 70 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessPurchaseOrderSend.cs

@@ -0,0 +1,70 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessPurchaseOrderSend Data Structure.
+    /// </summary>
+    public class AccessPurchaseOrderSend : AlipayObject
+    {
+        /// <summary>
+        /// 申请单明细号
+        /// </summary>
+        [JsonProperty("asset_item_id")]
+        public string AssetItemId { get; set; }
+
+        /// <summary>
+        /// 申请单号
+        /// </summary>
+        [JsonProperty("asset_order_id")]
+        public string AssetOrderId { get; set; }
+
+        /// <summary>
+        /// 采购单ID
+        /// </summary>
+        [JsonProperty("asset_purchase_id")]
+        public string AssetPurchaseId { get; set; }
+
+        /// <summary>
+        /// 物流公司code
+        /// </summary>
+        [JsonProperty("express_code")]
+        public string ExpressCode { get; set; }
+
+        /// <summary>
+        /// 物流公司名称
+        /// </summary>
+        [JsonProperty("express_name")]
+        public string ExpressName { get; set; }
+
+        /// <summary>
+        /// 物流单号
+        /// </summary>
+        [JsonProperty("express_no")]
+        public string ExpressNo { get; set; }
+
+        /// <summary>
+        /// 外部单号(供应商主键标识)
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// PO单号
+        /// </summary>
+        [JsonProperty("po_no")]
+        public string PoNo { get; set; }
+
+        /// <summary>
+        /// 回传码值数量1000(不是码物料时为0)
+        /// </summary>
+        [JsonProperty("return_qrcode_count")]
+        public string ReturnQrcodeCount { get; set; }
+
+        /// <summary>
+        /// 本次发货数量
+        /// </summary>
+        [JsonProperty("ship_count")]
+        public string ShipCount { get; set; }
+    }
+}

+ 52 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessPurchaseOrderSendResult.cs

@@ -0,0 +1,52 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessPurchaseOrderSendResult Data Structure.
+    /// </summary>
+    public class AccessPurchaseOrderSendResult : AlipayObject
+    {
+        /// <summary>
+        /// 申请单明细号
+        /// </summary>
+        [JsonProperty("asset_item_id")]
+        public string AssetItemId { get; set; }
+
+        /// <summary>
+        /// 申请单号
+        /// </summary>
+        [JsonProperty("asset_order_id")]
+        public string AssetOrderId { get; set; }
+
+        /// <summary>
+        /// 采购单ID
+        /// </summary>
+        [JsonProperty("asset_purchase_id")]
+        public string AssetPurchaseId { get; set; }
+
+        /// <summary>
+        /// 错误CODE
+        /// </summary>
+        [JsonProperty("error_code")]
+        public string ErrorCode { get; set; }
+
+        /// <summary>
+        /// 错误描述
+        /// </summary>
+        [JsonProperty("error_desc")]
+        public string ErrorDesc { get; set; }
+
+        /// <summary>
+        /// 外部单号(调用方业务主键标识)
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// 处理是否成功
+        /// </summary>
+        [JsonProperty("success")]
+        public bool Success { get; set; }
+    }
+}

+ 34 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessReturnQrcode.cs

@@ -0,0 +1,34 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessReturnQrcode Data Structure.
+    /// </summary>
+    public class AccessReturnQrcode : AlipayObject
+    {
+        /// <summary>
+        /// 采购单ID
+        /// </summary>
+        [JsonProperty("asset_purchase_id")]
+        public string AssetPurchaseId { get; set; }
+
+        /// <summary>
+        /// 物流单号
+        /// </summary>
+        [JsonProperty("express_no")]
+        public string ExpressNo { get; set; }
+
+        /// <summary>
+        /// 外部单号(调用方业务主键)
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// 二维码token值
+        /// </summary>
+        [JsonProperty("qrcode")]
+        public string Qrcode { get; set; }
+    }
+}

+ 52 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccessReturnQrcodeResult.cs

@@ -0,0 +1,52 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccessReturnQrcodeResult Data Structure.
+    /// </summary>
+    public class AccessReturnQrcodeResult : AlipayObject
+    {
+        /// <summary>
+        /// 采购单ID
+        /// </summary>
+        [JsonProperty("asset_purchase_id")]
+        public string AssetPurchaseId { get; set; }
+
+        /// <summary>
+        /// 错误码
+        /// </summary>
+        [JsonProperty("error_code")]
+        public string ErrorCode { get; set; }
+
+        /// <summary>
+        /// 错误描述
+        /// </summary>
+        [JsonProperty("error_desc")]
+        public string ErrorDesc { get; set; }
+
+        /// <summary>
+        /// 物流单号
+        /// </summary>
+        [JsonProperty("express_no")]
+        public string ExpressNo { get; set; }
+
+        /// <summary>
+        /// 外部单号(调用方业务主键)
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// 二维码token值
+        /// </summary>
+        [JsonProperty("qrcode")]
+        public string Qrcode { get; set; }
+
+        /// <summary>
+        /// 处理结果(成功或失败)
+        /// </summary>
+        [JsonProperty("success")]
+        public bool Success { get; set; }
+    }
+}

+ 28 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccountFreeze.cs

@@ -0,0 +1,28 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccountFreeze Data Structure.
+    /// </summary>
+    public class AccountFreeze : AlipayObject
+    {
+        /// <summary>
+        /// 冻结金额
+        /// </summary>
+        [JsonProperty("freeze_amount")]
+        public string FreezeAmount { get; set; }
+
+        /// <summary>
+        /// 冻结类型名称
+        /// </summary>
+        [JsonProperty("freeze_name")]
+        public string FreezeName { get; set; }
+
+        /// <summary>
+        /// 冻结类型值
+        /// </summary>
+        [JsonProperty("freeze_type")]
+        public string FreezeType { get; set; }
+    }
+}

+ 76 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AccountRecord.cs

@@ -0,0 +1,76 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AccountRecord Data Structure.
+    /// </summary>
+    public class AccountRecord : AlipayObject
+    {
+        /// <summary>
+        /// 支付宝订单号
+        /// </summary>
+        [JsonProperty("alipay_order_no")]
+        public string AlipayOrderNo { get; set; }
+
+        /// <summary>
+        /// 当时账户的余额
+        /// </summary>
+        [JsonProperty("balance")]
+        public string Balance { get; set; }
+
+        /// <summary>
+        /// 业务类型
+        /// </summary>
+        [JsonProperty("business_type")]
+        public string BusinessType { get; set; }
+
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        [JsonProperty("create_time")]
+        public string CreateTime { get; set; }
+
+        /// <summary>
+        /// 收入金额
+        /// </summary>
+        [JsonProperty("in_amount")]
+        public string InAmount { get; set; }
+
+        /// <summary>
+        /// 账务备注说明
+        /// </summary>
+        [JsonProperty("memo")]
+        public string Memo { get; set; }
+
+        /// <summary>
+        /// 商户订单号
+        /// </summary>
+        [JsonProperty("merchant_order_no")]
+        public string MerchantOrderNo { get; set; }
+
+        /// <summary>
+        /// 对方支付宝账户ID
+        /// </summary>
+        [JsonProperty("opt_user_id")]
+        public string OptUserId { get; set; }
+
+        /// <summary>
+        /// 支出金额
+        /// </summary>
+        [JsonProperty("out_amount")]
+        public string OutAmount { get; set; }
+
+        /// <summary>
+        /// 本方支付宝账户ID
+        /// </summary>
+        [JsonProperty("self_user_id")]
+        public string SelfUserId { get; set; }
+
+        /// <summary>
+        /// 账务类型
+        /// </summary>
+        [JsonProperty("type")]
+        public string Type { get; set; }
+    }
+}

+ 46 - 0
src/Essensoft.AspNetCore.Alipay/Domain/ActivityAuditDTO.cs

@@ -0,0 +1,46 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// ActivityAuditDTO Data Structure.
+    /// </summary>
+    public class ActivityAuditDTO : AlipayObject
+    {
+        /// <summary>
+        /// 审核id
+        /// </summary>
+        [JsonProperty("audit_id")]
+        public string AuditId { get; set; }
+
+        /// <summary>
+        /// INIT:初始化;AUDITING:审核中;REJECT:审核驳回;PASS:审核通过;CANCEL:审核撤销;FAIL:审核失败
+        /// </summary>
+        [JsonProperty("audit_status")]
+        public string AuditStatus { get; set; }
+
+        /// <summary>
+        /// 操作人id
+        /// </summary>
+        [JsonProperty("creator_id")]
+        public string CreatorId { get; set; }
+
+        /// <summary>
+        /// SALES:口碑内部小二;PROVIDER:外部服务商;PROVIDER_STAFF:外部服务商员工
+        /// </summary>
+        [JsonProperty("creator_type")]
+        public string CreatorType { get; set; }
+
+        /// <summary>
+        /// 操作时间
+        /// </summary>
+        [JsonProperty("operation_time")]
+        public string OperationTime { get; set; }
+
+        /// <summary>
+        /// 审核通过或者审核驳回的原因
+        /// </summary>
+        [JsonProperty("reason")]
+        public string Reason { get; set; }
+    }
+}

+ 41 - 0
src/Essensoft.AspNetCore.Alipay/Domain/ActivityOrderDTO.cs

@@ -0,0 +1,41 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// ActivityOrderDTO Data Structure.
+    /// </summary>
+    public class ActivityOrderDTO : AlipayObject
+    {
+        /// <summary>
+        /// 工单中的审核信息
+        /// </summary>
+        [JsonProperty("activity_audit_list")]
+        public List<ActivityAuditDTO> ActivityAuditList { get; set; }
+
+        /// <summary>
+        /// INIT:初始化;AUDITING:审核中;REJECT:审核驳回;PASS:审核通过;CANCEL:审核撤销;FAIL:审核失败
+        /// </summary>
+        [JsonProperty("audit_status")]
+        public string AuditStatus { get; set; }
+
+        /// <summary>
+        /// 订单号
+        /// </summary>
+        [JsonProperty("order_id")]
+        public string OrderId { get; set; }
+
+        /// <summary>
+        /// INIT:初始化;DOING:处理中;SUCCESS:成功;FAIL:失败
+        /// </summary>
+        [JsonProperty("order_status")]
+        public string OrderStatus { get; set; }
+
+        /// <summary>
+        /// CAMPAIGN_CREATE_ORDER:创建工单;CAMPAIGN_ENABLE_ORDER:生效工单;CAMPAIGN_START_ORDER:启动工单;CAMPAIGN_CLOSE_ORDER:关闭工单;CAMPAIGN_FINISH_ORDER:结束工单;CAMPAIGN_DELETE_ORDER:删除工单;CAMPAIGN_MODIFY_ORDER:修改工单
+        /// </summary>
+        [JsonProperty("order_type")]
+        public string OrderType { get; set; }
+    }
+}

+ 83 - 0
src/Essensoft.AspNetCore.Alipay/Domain/ActivityPlanInfo.cs

@@ -0,0 +1,83 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// ActivityPlanInfo Data Structure.
+    /// </summary>
+    public class ActivityPlanInfo : AlipayObject
+    {
+        /// <summary>
+        /// 平台活动结束时间
+        /// </summary>
+        [JsonProperty("activity_end_time")]
+        public string ActivityEndTime { get; set; }
+
+        /// <summary>
+        /// 平台活动开始时间
+        /// </summary>
+        [JsonProperty("activity_start_time")]
+        public string ActivityStartTime { get; set; }
+
+        /// <summary>
+        /// 招商结束时间
+        /// </summary>
+        [JsonProperty("confirm_end_time")]
+        public string ConfirmEndTime { get; set; }
+
+        /// <summary>
+        /// 平台活动邀约工单号(需要在第三方活动中回传)
+        /// </summary>
+        [JsonProperty("invite_order_id")]
+        public string InviteOrderId { get; set; }
+
+        /// <summary>
+        /// 规则描述
+        /// </summary>
+        [JsonProperty("plan_rule_list")]
+        public List<PlanRule> PlanRuleList { get; set; }
+
+        /// <summary>
+        /// 是个链接地址,下载后是pdf文件
+        /// </summary>
+        [JsonProperty("plat_activity_agreement")]
+        public string PlatActivityAgreement { get; set; }
+
+        /// <summary>
+        /// 平台活动id(需要在第三方方活动中回传)
+        /// </summary>
+        [JsonProperty("plat_activity_id")]
+        public string PlatActivityId { get; set; }
+
+        /// <summary>
+        /// 平台活动标签类型
+        /// </summary>
+        [JsonProperty("plat_activity_label_type")]
+        public string PlatActivityLabelType { get; set; }
+
+        /// <summary>
+        /// 平台活动名称
+        /// </summary>
+        [JsonProperty("plat_activity_name")]
+        public string PlatActivityName { get; set; }
+
+        /// <summary>
+        /// 活动规则描述
+        /// </summary>
+        [JsonProperty("plat_activity_rule_desc")]
+        public string PlatActivityRuleDesc { get; set; }
+
+        /// <summary>
+        /// 平台活动状态,GOING/FINISH,GOING表示招商中,FINISH表示招商已经结束(再报名活动也无法成功),只有GOING状态可以报名
+        /// </summary>
+        [JsonProperty("plat_activity_status")]
+        public string PlatActivityStatus { get; set; }
+
+        /// <summary>
+        /// 其他说明
+        /// </summary>
+        [JsonProperty("plat_other_desc")]
+        public string PlatOtherDesc { get; set; }
+    }
+}

+ 52 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AddressInfo.cs

@@ -0,0 +1,52 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AddressInfo Data Structure.
+    /// </summary>
+    public class AddressInfo : AlipayObject
+    {
+        /// <summary>
+        /// 商户详细经营地址
+        /// </summary>
+        [JsonProperty("address")]
+        public string Address { get; set; }
+
+        /// <summary>
+        /// 商户所在城市编码,城市编码是与国家统计局一致,请查询:  http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/  国标省市区号下载:http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/2016.xls?spm=a219a.7629140.0.0.qRW4KQ&file=2016.xls
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 商户所在区县编码,区县编码是与国家统计局一致,请查询: http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/ 国标省市区号下载:http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/2016.xls?spm=a219a.7629140.0.0.qRW4KQ&file=2016.xls
+        /// </summary>
+        [JsonProperty("district_code")]
+        public string DistrictCode { get; set; }
+
+        /// <summary>
+        /// 纬度,浮点型,小数点后最多保留6位  如需要录入经纬度,请以高德坐标系为准,录入时请确保经纬度参数准确。高德经纬度查询:http://lbs.amap.com/console/show/picker
+        /// </summary>
+        [JsonProperty("latitude")]
+        public string Latitude { get; set; }
+
+        /// <summary>
+        /// 经度,浮点型, 小数点后最多保留6位。  如需要录入经纬度,请以高德坐标系为准,录入时请确保经纬度参数准确。高德经纬度查询:http://lbs.amap.com/console/show/picker
+        /// </summary>
+        [JsonProperty("longitude")]
+        public string Longitude { get; set; }
+
+        /// <summary>
+        /// 商户所在省份编码,  省份编码是与国家统计局一致,请查询:  http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/  国标省市区号下载:http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/2016.xls?spm=a219a.7629140.0.0.qRW4KQ&file=2016.xls
+        /// </summary>
+        [JsonProperty("province_code")]
+        public string ProvinceCode { get; set; }
+
+        /// <summary>
+        /// 地址类型。取值范围:BUSINESS_ADDRESS:经营地址(默认)
+        /// </summary>
+        [JsonProperty("type")]
+        public string Type { get; set; }
+    }
+}

+ 208 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AdviceVO.cs

@@ -0,0 +1,208 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AdviceVO Data Structure.
+    /// </summary>
+    public class AdviceVO : AlipayObject
+    {
+        /// <summary>
+        /// 兑换请求发起时间
+        /// </summary>
+        [JsonProperty("client_advice_timestamp")]
+        public string ClientAdviceTimestamp { get; set; }
+
+        /// <summary>
+        /// 客户号:用于定义FX交易的客户,由外汇交易中心统一分配
+        /// </summary>
+        [JsonProperty("client_id")]
+        public string ClientId { get; set; }
+
+        /// <summary>
+        /// 客户请求序号:  客户侧的流水号,由客户上送
+        /// </summary>
+        [JsonProperty("client_ref")]
+        public string ClientRef { get; set; }
+
+        /// <summary>
+        /// 对应金额,选输项
+        /// </summary>
+        [JsonProperty("contra_amount")]
+        public string ContraAmount { get; set; }
+
+        /// <summary>
+        /// 对应币种
+        /// </summary>
+        [JsonProperty("contra_ccy")]
+        public string ContraCcy { get; set; }
+
+        /// <summary>
+        /// 端对端流水号  原TransactionID,用于标识全局唯一序号
+        /// </summary>
+        [JsonProperty("end_to_end_id")]
+        public string EndToEndId { get; set; }
+
+        /// <summary>
+        /// 请求类型:H - HedgeAdvise , T - TradeAdvise。锁价模式下先发送Hedge,在发送对应的Trade。非锁价模式下,可直接发送Trade
+        /// </summary>
+        [JsonProperty("msg_type")]
+        public string MsgType { get; set; }
+
+        /// <summary>
+        /// 是否部分成交:Y,N。是否可部分成交  默认为不可部分成交
+        /// </summary>
+        [JsonProperty("partial_trade")]
+        public string PartialTrade { get; set; }
+
+        /// <summary>
+        /// 支付渠道:  上送收单业务中的支付渠道,须提前约定。
+        /// </summary>
+        [JsonProperty("payment_provider")]
+        public string PaymentProvider { get; set; }
+
+        /// <summary>
+        /// 支付类型, 默认为DEFAULT
+        /// </summary>
+        [JsonProperty("payment_type")]
+        public string PaymentType { get; set; }
+
+        /// <summary>
+        /// 客户协议扩展号,用于支持同一客户在不同场景下所需的汇率
+        /// </summary>
+        [JsonProperty("profile_id")]
+        public string ProfileId { get; set; }
+
+        /// <summary>
+        /// 汇率的唯一编码
+        /// </summary>
+        [JsonProperty("rate_ref")]
+        public string RateRef { get; set; }
+
+        /// <summary>
+        /// 汇率请求模式 :  TA时必输,仅在TA时有效。  字典:REQ - 按客户请求(含滑点)成交,若该价格失效,则交易失败;ACP - 汇率失效或请求中不带汇率,接受该客户协议的最新汇率,实际成交汇率以GlobalFX为准;"
+        /// </summary>
+        [JsonProperty("rate_request_mode")]
+        public string RateRequestMode { get; set; }
+
+        /// <summary>
+        /// 汇率类型:SPOT,FORWARD。送RateRef的情况下,以RateRef关联的汇率为准。
+        /// </summary>
+        [JsonProperty("rate_type")]
+        public string RateType { get; set; }
+
+        /// <summary>
+        /// 备用字段1
+        /// </summary>
+        [JsonProperty("reference_field1")]
+        public string ReferenceField1 { get; set; }
+
+        /// <summary>
+        /// 备用字段2
+        /// </summary>
+        [JsonProperty("reference_field2")]
+        public string ReferenceField2 { get; set; }
+
+        /// <summary>
+        /// 备用字段3
+        /// </summary>
+        [JsonProperty("reference_field3")]
+        public string ReferenceField3 { get; set; }
+
+        /// <summary>
+        /// 关联交易请求号: "本次交易请求关联的原交易号。填写规范:  1)正向交易的TA,填写HA MessageId  2)REFUND,添加原SALE的TA MessageId  3)CHARGEBACK,填写原SALE的TA MessageId  4)CHARGEBACK_REVERSE,填写原CHARGEBACK的TA MessageId  5)CANCELLATION,填写被Cancel交易的TA MessageId"
+        /// </summary>
+        [JsonProperty("related_message_id")]
+        public string RelatedMessageId { get; set; }
+
+        /// <summary>
+        /// 交易请求号
+        /// </summary>
+        [JsonProperty("request_message_id")]
+        public string RequestMessageId { get; set; }
+
+        /// <summary>
+        /// 客户请求的汇率,送RateRef的情况下,以RateRef关联的汇率为准。
+        /// </summary>
+        [JsonProperty("requested_rate")]
+        public string RequestedRate { get; set; }
+
+        /// <summary>
+        /// NDF交割下,实际交割币种的金额
+        /// </summary>
+        [JsonProperty("settlement_amount")]
+        public string SettlementAmount { get; set; }
+
+        /// <summary>
+        /// NDF交割下,实际交割的币种
+        /// </summary>
+        [JsonProperty("settlement_ccy")]
+        public string SettlementCcy { get; set; }
+
+        /// <summary>
+        /// 买卖方向:BUY,SELL。客户视角对交易货币的操作。该字段为必填,与原TransactionType的对应关系如下:  SALE - SELL  REFUND - BUY  CHARGEBACK - BUY  CHARGEBACK_RESEVSE - SELL  CANCELLATION - 使用原交易的side"
+        /// </summary>
+        [JsonProperty("side")]
+        public string Side { get; set; }
+
+        /// <summary>
+        /// 汇率上浮滑点 : BP单位,即汇率单位的万分之一。仅在“请求汇率模式”为REQ时有效,在请求汇率/汇率编码对应的汇率的基础上,Side为BUY时上浮滑点,Side为SELL时下浮滑点
+        /// </summary>
+        [JsonProperty("slip_point")]
+        public long SlipPoint { get; set; }
+
+        /// <summary>
+        /// 调用方事件码
+        /// </summary>
+        [JsonProperty("source_event_code")]
+        public string SourceEventCode { get; set; }
+
+        /// <summary>
+        /// 调用方产品码
+        /// </summary>
+        [JsonProperty("source_product_code")]
+        public string SourceProductCode { get; set; }
+
+        /// <summary>
+        /// 时间所在时区
+        /// </summary>
+        [JsonProperty("time_zone")]
+        public string TimeZone { get; set; }
+
+        /// <summary>
+        /// 上层业务发起时间
+        /// </summary>
+        [JsonProperty("trade_timestamp")]
+        public string TradeTimestamp { get; set; }
+
+        /// <summary>
+        /// 交易金额
+        /// </summary>
+        [JsonProperty("transaction_amount")]
+        public string TransactionAmount { get; set; }
+
+        /// <summary>
+        /// 交易币种: 客户视角的交易买卖币种
+        /// </summary>
+        [JsonProperty("transaction_ccy")]
+        public string TransactionCcy { get; set; }
+
+        /// <summary>
+        /// 交易币种交割方式:DELIV,NDF。当Client的实际交割货币与交易币种不一致时,送NDF。
+        /// </summary>
+        [JsonProperty("transaction_ccy_type")]
+        public string TransactionCcyType { get; set; }
+
+        /// <summary>
+        /// 交易类型:   兼容收单业务兑换使用。字典:SALE,REFUND,CHARGEBACK,CHARGEBACK_REVERSE,CANCELLATION
+        /// </summary>
+        [JsonProperty("transaction_type")]
+        public string TransactionType { get; set; }
+
+        /// <summary>
+        /// 起息日期 :  YYYYMMDD,客户期望的资金交割日期
+        /// </summary>
+        [JsonProperty("value_date")]
+        public string ValueDate { get; set; }
+    }
+}

+ 28 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AgreementParams.cs

@@ -0,0 +1,28 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AgreementParams Data Structure.
+    /// </summary>
+    public class AgreementParams : AlipayObject
+    {
+        /// <summary>
+        /// 支付宝系统中用以唯一标识用户签约记录的编号(用户签约成功后的协议号 )
+        /// </summary>
+        [JsonProperty("agreement_no")]
+        public string AgreementNo { get; set; }
+
+        /// <summary>
+        /// 鉴权申请token,其格式和内容,由支付宝定义。在需要做支付鉴权校验时,该参数不能为空。
+        /// </summary>
+        [JsonProperty("apply_token")]
+        public string ApplyToken { get; set; }
+
+        /// <summary>
+        /// 鉴权确认码,在需要做支付鉴权校验时,该参数不能为空
+        /// </summary>
+        [JsonProperty("auth_confirm_no")]
+        public string AuthConfirmNo { get; set; }
+    }
+}

+ 64 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AgreementSignParams.cs

@@ -0,0 +1,64 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AgreementSignParams Data Structure.
+    /// </summary>
+    public class AgreementSignParams : AlipayObject
+    {
+        /// <summary>
+        /// 商户在芝麻端申请的appId
+        /// </summary>
+        [JsonProperty("buckle_app_id")]
+        public string BuckleAppId { get; set; }
+
+        /// <summary>
+        /// 商户在芝麻端申请的merchantId
+        /// </summary>
+        [JsonProperty("buckle_merchant_id")]
+        public string BuckleMerchantId { get; set; }
+
+        /// <summary>
+        /// 商户签约号,代扣协议中标示用户的唯一签约号(确保在商户系统中唯一)。  格式规则:支持大写小写字母和数字,最长32位。  商户系统按需传入,如果同一用户在同一产品码、同一签约场景下,签订了多份代扣协议,那么需要指定并传入该值。
+        /// </summary>
+        [JsonProperty("external_agreement_no")]
+        public string ExternalAgreementNo { get; set; }
+
+        /// <summary>
+        /// 用户在商户网站的登录账号,用于在签约页面展示,如果为空,则不展示
+        /// </summary>
+        [JsonProperty("external_logon_id")]
+        public string ExternalLogonId { get; set; }
+
+        /// <summary>
+        /// 个人签约产品码,商户和支付宝签约时确定。
+        /// </summary>
+        [JsonProperty("personal_product_code")]
+        public string PersonalProductCode { get; set; }
+
+        /// <summary>
+        /// 签约营销参数,此值为json格式;具体的key需与营销约定
+        /// </summary>
+        [JsonProperty("promo_params")]
+        public string PromoParams { get; set; }
+
+        /// <summary>
+        /// 协议签约场景,商户和支付宝签约时确定。  当传入商户签约号external_agreement_no时,场景不能为默认值DEFAULT|DEFAULT。
+        /// </summary>
+        [JsonProperty("sign_scene")]
+        public string SignScene { get; set; }
+
+        /// <summary>
+        /// 当前用户签约请求的协议有效周期。  整形数字加上时间单位的协议有效期,从发起签约请求的时间开始算起。  目前支持的时间单位:  1. d:天  2. m:月  如果未传入,默认为长期有效。
+        /// </summary>
+        [JsonProperty("sign_validity_period")]
+        public string SignValidityPeriod { get; set; }
+
+        /// <summary>
+        /// 签约第三方主体类型。对于三方协议,表示当前用户和哪一类的第三方主体进行签约。  取值范围:  1. PARTNER(平台商户);  2. MERCHANT(集团商户),集团下子商户可共享用户签约内容;  默认为PARTNER。
+        /// </summary>
+        [JsonProperty("third_party_type")]
+        public string ThirdPartyType { get; set; }
+    }
+}

+ 46 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AliTrustAlipayCert.cs

@@ -0,0 +1,46 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AliTrustAlipayCert Data Structure.
+    /// </summary>
+    public class AliTrustAlipayCert : AlipayObject
+    {
+        /// <summary>
+        /// 用户出生日期
+        /// </summary>
+        [JsonProperty("birthday")]
+        public string Birthday { get; set; }
+
+        /// <summary>
+        /// 点击支付宝实名认证图标之后的跳转链接
+        /// </summary>
+        [JsonProperty("forward_url")]
+        public string ForwardUrl { get; set; }
+
+        /// <summary>
+        /// 用户性别(M/F)
+        /// </summary>
+        [JsonProperty("gender")]
+        public string Gender { get; set; }
+
+        /// <summary>
+        /// 支付宝实名认证图标的链接地址
+        /// </summary>
+        [JsonProperty("icon_url")]
+        public string IconUrl { get; set; }
+
+        /// <summary>
+        /// 当账户为支付宝实名认证时,取值为"T";否则为"F".
+        /// </summary>
+        [JsonProperty("is_certified")]
+        public string IsCertified { get; set; }
+
+        /// <summary>
+        /// 用户姓名
+        /// </summary>
+        [JsonProperty("name")]
+        public string Name { get; set; }
+    }
+}

+ 40 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AliTrustCert.cs

@@ -0,0 +1,40 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AliTrustCert Data Structure.
+    /// </summary>
+    public class AliTrustCert : AlipayObject
+    {
+        /// <summary>
+        /// 点击信用认证图标之后的跳转链接
+        /// </summary>
+        [JsonProperty("forward_url")]
+        public string ForwardUrl { get; set; }
+
+        /// <summary>
+        /// 通过信用认证的图标链接
+        /// </summary>
+        [JsonProperty("icon_url")]
+        public string IconUrl { get; set; }
+
+        /// <summary>
+        /// 当通过信用认证时,取值为"T";否则为"F".
+        /// </summary>
+        [JsonProperty("is_certified")]
+        public string IsCertified { get; set; }
+
+        /// <summary>
+        /// 芝麻认证等级,取值为1,2,3
+        /// </summary>
+        [JsonProperty("level")]
+        public string Level { get; set; }
+
+        /// <summary>
+        /// 当用户未通过芝麻认证时给出的原因提示
+        /// </summary>
+        [JsonProperty("message")]
+        public string Message { get; set; }
+    }
+}

+ 29 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AliTrustRiskIdentify.cs

@@ -0,0 +1,29 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AliTrustRiskIdentify Data Structure.
+    /// </summary>
+    public class AliTrustRiskIdentify : AlipayObject
+    {
+        /// <summary>
+        /// 芝麻信用风险名单详情列表
+        /// </summary>
+        [JsonProperty("details")]
+        public List<ZhimaRiskDetail> Details { get; set; }
+
+        /// <summary>
+        /// 当有风险时,为"T";无风险识别是为"F"
+        /// </summary>
+        [JsonProperty("is_risk")]
+        public string IsRisk { get; set; }
+
+        /// <summary>
+        /// 已废弃
+        /// </summary>
+        [JsonProperty("risk_tag")]
+        public string RiskTag { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AliTrustScore.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AliTrustScore Data Structure.
+    /// </summary>
+    public class AliTrustScore : AlipayObject
+    {
+        /// <summary>
+        /// 芝麻分
+        /// </summary>
+        [JsonProperty("score")]
+        public long Score { get; set; }
+    }
+}

+ 34 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccount.cs

@@ -0,0 +1,34 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAccount Data Structure.
+    /// </summary>
+    public class AlipayAccount : AlipayObject
+    {
+        /// <summary>
+        /// 支付宝用户ID
+        /// </summary>
+        [JsonProperty("alipay_user_id")]
+        public string AlipayUserId { get; set; }
+
+        /// <summary>
+        /// 可用余额
+        /// </summary>
+        [JsonProperty("available_amount")]
+        public string AvailableAmount { get; set; }
+
+        /// <summary>
+        /// 不可用余额
+        /// </summary>
+        [JsonProperty("freeze_amount")]
+        public string FreezeAmount { get; set; }
+
+        /// <summary>
+        /// 余额总额
+        /// </summary>
+        [JsonProperty("total_amount")]
+        public string TotalAmount { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateAdviceAcceptModel.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAccountExrateAdviceAcceptModel Data Structure.
+    /// </summary>
+    public class AlipayAccountExrateAdviceAcceptModel : AlipayObject
+    {
+        /// <summary>
+        /// 交易请求对象内容
+        /// </summary>
+        [JsonProperty("advice")]
+        public AdviceVO Advice { get; set; }
+    }
+}

+ 22 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateAllclientrateQueryModel.cs

@@ -0,0 +1,22 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAccountExrateAllclientrateQueryModel Data Structure.
+    /// </summary>
+    public class AlipayAccountExrateAllclientrateQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 客户id,客户和报价中心签约时约定的信息
+        /// </summary>
+        [JsonProperty("client_id")]
+        public string ClientId { get; set; }
+
+        /// <summary>
+        /// 子协议扩展号,同一个客户不同业务场景下需要不同的客户报价,通过profile_id区分。正常情况下可能每个客户只有一个默认的profile_id
+        /// </summary>
+        [JsonProperty("profile_id")]
+        public string ProfileId { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateCollectcoreDataSendModel.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAccountExrateCollectcoreDataSendModel Data Structure.
+    /// </summary>
+    public class AlipayAccountExrateCollectcoreDataSendModel : AlipayObject
+    {
+        /// <summary>
+        /// 上数提交数据内容
+        /// </summary>
+        [JsonProperty("content")]
+        public string Content { get; set; }
+    }
+}

+ 41 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExratePricingNotifyModel.cs

@@ -0,0 +1,41 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAccountExratePricingNotifyModel Data Structure.
+    /// </summary>
+    public class AlipayAccountExratePricingNotifyModel : AlipayObject
+    {
+        /// <summary>
+        /// 标识该汇率提供给哪个客户使用
+        /// </summary>
+        [JsonProperty("client_id")]
+        public string ClientId { get; set; }
+
+        /// <summary>
+        /// 源汇率机构
+        /// </summary>
+        [JsonProperty("inst")]
+        public string Inst { get; set; }
+
+        /// <summary>
+        /// 源汇率数据
+        /// </summary>
+        [JsonProperty("pricing_list")]
+        public List<PricingVO> PricingList { get; set; }
+
+        /// <summary>
+        /// 该汇率的使用场景
+        /// </summary>
+        [JsonProperty("segment_id")]
+        public string SegmentId { get; set; }
+
+        /// <summary>
+        /// 所在时区,所有的时间都是该时区的时间  支持 GMT+8 UTC+0 Europe/London 的格式
+        /// </summary>
+        [JsonProperty("time_zone")]
+        public string TimeZone { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateRatequeryModel.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAccountExrateRatequeryModel Data Structure.
+    /// </summary>
+    public class AlipayAccountExrateRatequeryModel : AlipayObject
+    {
+        /// <summary>
+        /// 需要查询汇率的货币对,如果为空则返回当前支持的所有货币对的汇率
+        /// </summary>
+        [JsonProperty("currency_pair")]
+        public string CurrencyPair { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAccountExrateTraderequestCreateModel.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAccountExrateTraderequestCreateModel Data Structure.
+    /// </summary>
+    public class AlipayAccountExrateTraderequestCreateModel : AlipayObject
+    {
+        /// <summary>
+        /// 交易请求对象内容
+        /// </summary>
+        [JsonProperty("trade_request")]
+        public TradeRequestVO TradeRequest { get; set; }
+    }
+}

+ 59 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAssetPointAccountlogQueryModel.cs

@@ -0,0 +1,59 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAssetPointAccountlogQueryModel Data Structure.
+    /// </summary>
+    public class AlipayAssetPointAccountlogQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 用户流水查询起始时间
+        /// </summary>
+        [JsonProperty("account_date_begin")]
+        public string AccountDateBegin { get; set; }
+
+        /// <summary>
+        /// 用户流水查询结束时间
+        /// </summary>
+        [JsonProperty("account_date_end")]
+        public string AccountDateEnd { get; set; }
+
+        /// <summary>
+        /// 分页查询的当前页号,从1开始
+        /// </summary>
+        [JsonProperty("page_number")]
+        public long PageNumber { get; set; }
+
+        /// <summary>
+        /// 分页查询的单页大小
+        /// </summary>
+        [JsonProperty("page_size")]
+        public long PageSize { get; set; }
+
+        /// <summary>
+        /// 子交易代码,标记大业务下的子业务,例如充值-外部商户发放,可选参数可以不传
+        /// </summary>
+        [JsonProperty("sub_trans_code")]
+        public List<string> SubTransCode { get; set; }
+
+        /// <summary>
+        /// 主交易代码,例如支付、充值等,标记业务大类,可选参数可以不传
+        /// </summary>
+        [JsonProperty("trans_code")]
+        public List<string> TransCode { get; set; }
+
+        /// <summary>
+        /// 用户标识符,用于指定集分宝发放的用户,和user_symbol_type一起使用,确定一个唯一的支付宝用户
+        /// </summary>
+        [JsonProperty("user_symbol")]
+        public string UserSymbol { get; set; }
+
+        /// <summary>
+        /// 用户标识符类型,  现在支持ALIPAY_USER_ID:表示支付宝用户ID,  ALIPAY_LOGON_ID:表示支付宝登陆号,
+        /// </summary>
+        [JsonProperty("user_symbol_type")]
+        public string UserSymbolType { get; set; }
+    }
+}

+ 46 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAssetPointOrderCreateModel.cs

@@ -0,0 +1,46 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAssetPointOrderCreateModel Data Structure.
+    /// </summary>
+    public class AlipayAssetPointOrderCreateModel : AlipayObject
+    {
+        /// <summary>
+        /// 向用户展示集分宝发放备注
+        /// </summary>
+        [JsonProperty("memo")]
+        public string Memo { get; set; }
+
+        /// <summary>
+        /// isv提供的发放订单号,由数字和字母组成,最大长度为32位,需要保证每笔订单发放的唯一性,支付宝对该参数做唯一性校验。如果订单号已存在,支付宝将返回订单号已经存在的错误
+        /// </summary>
+        [JsonProperty("merchant_order_no")]
+        public string MerchantOrderNo { get; set; }
+
+        /// <summary>
+        /// 发放集分宝时间
+        /// </summary>
+        [JsonProperty("order_time")]
+        public string OrderTime { get; set; }
+
+        /// <summary>
+        /// 发放集分宝的数量
+        /// </summary>
+        [JsonProperty("point_count")]
+        public long PointCount { get; set; }
+
+        /// <summary>
+        /// 用户标识符,用于指定集分宝发放的用户,和user_symbol_type一起使用,确定一个唯一的支付宝用户
+        /// </summary>
+        [JsonProperty("user_symbol")]
+        public string UserSymbol { get; set; }
+
+        /// <summary>
+        /// 用户标识符类型,  现在支持ALIPAY_USER_ID:表示支付宝用户ID,  ALIPAY_LOGON_ID:表示支付宝登陆号,  TAOBAO_NICK:淘宝昵称
+        /// </summary>
+        [JsonProperty("user_symbol_type")]
+        public string UserSymbolType { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayAssetPointOrderQueryModel.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayAssetPointOrderQueryModel Data Structure.
+    /// </summary>
+    public class AlipayAssetPointOrderQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// isv提供的发放号订单号,由数字和字母组成,最大长度为32为,需要保证每笔发放的唯一性,集分宝系统会对该参数做唯一性控制。调用接口后集分宝系统会根据这个外部订单号查询发放的订单详情。
+        /// </summary>
+        [JsonProperty("merchant_order_no")]
+        public string MerchantOrderNo { get; set; }
+    }
+}

+ 28 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossBaseProcessInstanceCancelModel.cs

@@ -0,0 +1,28 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossBaseProcessInstanceCancelModel Data Structure.
+    /// </summary>
+    public class AlipayBossBaseProcessInstanceCancelModel : AlipayObject
+    {
+        /// <summary>
+        /// 备注
+        /// </summary>
+        [JsonProperty("memo")]
+        public string Memo { get; set; }
+
+        /// <summary>
+        /// 处理人域账号
+        /// </summary>
+        [JsonProperty("operator")]
+        public string Operator { get; set; }
+
+        /// <summary>
+        /// 流程全局唯一ID
+        /// </summary>
+        [JsonProperty("puid")]
+        public string Puid { get; set; }
+    }
+}

+ 77 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossBaseProcessInstanceCreateModel.cs

@@ -0,0 +1,77 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossBaseProcessInstanceCreateModel Data Structure.
+    /// </summary>
+    public class AlipayBossBaseProcessInstanceCreateModel : AlipayObject
+    {
+        /// <summary>
+        /// 加签内容
+        /// </summary>
+        [JsonProperty("add_sign_content")]
+        public List<BPOpenApiAddSignContent> AddSignContent { get; set; }
+
+        /// <summary>
+        /// 业务上下文,JSON格式
+        /// </summary>
+        [JsonProperty("context")]
+        public string Context { get; set; }
+
+        /// <summary>
+        /// 创建人的域账号
+        /// </summary>
+        [JsonProperty("creator")]
+        public string Creator { get; set; }
+
+        /// <summary>
+        /// 描述信息
+        /// </summary>
+        [JsonProperty("description")]
+        public string Description { get; set; }
+
+        /// <summary>
+        /// 2088账号
+        /// </summary>
+        [JsonProperty("ip_role_id")]
+        public string IpRoleId { get; set; }
+
+        /// <summary>
+        /// 流程配置名称。需要先在流程平台配置流程
+        /// </summary>
+        [JsonProperty("name")]
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 优先级,数字越大优先级越高,最大不超过29
+        /// </summary>
+        [JsonProperty("priority")]
+        public long Priority { get; set; }
+
+        /// <summary>
+        /// 流程全局唯一ID,和业务一一对应
+        /// </summary>
+        [JsonProperty("puid")]
+        public BPOpenApiPUID Puid { get; set; }
+
+        /// <summary>
+        /// 前置流程从哪个节点发起的本流程
+        /// </summary>
+        [JsonProperty("source_node_name")]
+        public string SourceNodeName { get; set; }
+
+        /// <summary>
+        /// 前置流程的PUID。用于串连起两个流程
+        /// </summary>
+        [JsonProperty("source_puid")]
+        public string SourcePuid { get; set; }
+
+        /// <summary>
+        /// 子流程的上下文。每一个上下文都使用JSON格式
+        /// </summary>
+        [JsonProperty("sub_contexts")]
+        public List<string> SubContexts { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossBaseProcessInstanceQueryModel.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossBaseProcessInstanceQueryModel Data Structure.
+    /// </summary>
+    public class AlipayBossBaseProcessInstanceQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 流程全局唯一ID
+        /// </summary>
+        [JsonProperty("puid")]
+        public string Puid { get; set; }
+    }
+}

+ 65 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossBaseProcessTaskProcessModel.cs

@@ -0,0 +1,65 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossBaseProcessTaskProcessModel Data Structure.
+    /// </summary>
+    public class AlipayBossBaseProcessTaskProcessModel : AlipayObject
+    {
+        /// <summary>
+        /// 更新的业务上下文。和原有业务上下文同key覆盖,新增key新增。
+        /// </summary>
+        [JsonProperty("context")]
+        public string Context { get; set; }
+
+        /// <summary>
+        /// 处理幂等值,特别注意这个值的使用,不能依赖于流程中的任何值。
+        /// </summary>
+        [JsonProperty("idempotent_id")]
+        public string IdempotentId { get; set; }
+
+        /// <summary>
+        /// 处理备注
+        /// </summary>
+        [JsonProperty("memo")]
+        public string Memo { get; set; }
+
+        /// <summary>
+        /// 当前需要推进的节点
+        /// </summary>
+        [JsonProperty("node")]
+        public string Node { get; set; }
+
+        /// <summary>
+        /// 操作名称
+        /// </summary>
+        [JsonProperty("operate")]
+        public string Operate { get; set; }
+
+        /// <summary>
+        /// 当前处理人域账号
+        /// </summary>
+        [JsonProperty("operator")]
+        public string Operator { get; set; }
+
+        /// <summary>
+        /// 更新的优先级。填写0则不更新,使用原值
+        /// </summary>
+        [JsonProperty("priority")]
+        public long Priority { get; set; }
+
+        /// <summary>
+        /// 流程全局唯一ID
+        /// </summary>
+        [JsonProperty("puid")]
+        public string Puid { get; set; }
+
+        /// <summary>
+        /// 更新的子流程上下文。完全覆盖原值。若不需要覆盖,则传null
+        /// </summary>
+        [JsonProperty("sub_contexts")]
+        public List<string> SubContexts { get; set; }
+    }
+}

+ 82 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossCsChannelQueryModel.cs

@@ -0,0 +1,82 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossCsChannelQueryModel Data Structure.
+    /// </summary>
+    public class AlipayBossCsChannelQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 平均通话时长的qualifier
+        /// </summary>
+        [JsonProperty("att")]
+        public string Att { get; set; }
+
+        /// <summary>
+        /// 总接通率的qualifier
+        /// </summary>
+        [JsonProperty("connectionrate")]
+        public string Connectionrate { get; set; }
+
+        /// <summary>
+        /// 在线小二人数的qualifier
+        /// </summary>
+        [JsonProperty("curragentsloggedin")]
+        public string Curragentsloggedin { get; set; }
+
+        /// <summary>
+        /// 通话中人数的qualifier
+        /// </summary>
+        [JsonProperty("curragenttalking")]
+        public string Curragenttalking { get; set; }
+
+        /// <summary>
+        /// 小休人数的qualifier
+        /// </summary>
+        [JsonProperty("currentnotreadyagents")]
+        public string Currentnotreadyagents { get; set; }
+
+        /// <summary>
+        /// 等待人数的qualifier
+        /// </summary>
+        [JsonProperty("currentreadyagents")]
+        public string Currentreadyagents { get; set; }
+
+        /// <summary>
+        /// 总排队数的Qualifier
+        /// </summary>
+        [JsonProperty("currnumberwaitingcalls")]
+        public string Currnumberwaitingcalls { get; set; }
+
+        /// <summary>
+        /// 查询hbase的rowkey
+        /// </summary>
+        [JsonProperty("endkey")]
+        public string Endkey { get; set; }
+
+        /// <summary>
+        /// 查询hbase的rowkey
+        /// </summary>
+        [JsonProperty("startkey")]
+        public string Startkey { get; set; }
+
+        /// <summary>
+        /// 总流入量的qualifier
+        /// </summary>
+        [JsonProperty("visitorinflow")]
+        public string Visitorinflow { get; set; }
+
+        /// <summary>
+        /// 总应答量的qualifier
+        /// </summary>
+        [JsonProperty("visitorresponse")]
+        public string Visitorresponse { get; set; }
+
+        /// <summary>
+        /// 应答量[转接] 的qualifier
+        /// </summary>
+        [JsonProperty("visitorresponsetransfer")]
+        public string Visitorresponsetransfer { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossCsDatacollectSendModel.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossCsDatacollectSendModel Data Structure.
+    /// </summary>
+    public class AlipayBossCsDatacollectSendModel : AlipayObject
+    {
+        /// <summary>
+        /// 上数提交数据内容
+        /// </summary>
+        [JsonProperty("content")]
+        public string Content { get; set; }
+    }
+}

+ 112 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossProdSubmerchantCreateModel.cs

@@ -0,0 +1,112 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossProdSubmerchantCreateModel Data Structure.
+    /// </summary>
+    public class AlipayBossProdSubmerchantCreateModel : AlipayObject
+    {
+        /// <summary>
+        /// 受理商户详细经营地址
+        /// </summary>
+        [JsonProperty("address")]
+        public string Address { get; set; }
+
+        /// <summary>
+        /// 受理商户简称
+        /// </summary>
+        [JsonProperty("alias_name")]
+        public string AliasName { get; set; }
+
+        /// <summary>
+        /// 受理商户营业执照编号
+        /// </summary>
+        [JsonProperty("business_license")]
+        public string BusinessLicense { get; set; }
+
+        /// <summary>
+        /// 受理商户经营类目,参考开放平台口碑开放行业入驻要求
+        /// </summary>
+        [JsonProperty("category_id")]
+        public string CategoryId { get; set; }
+
+        /// <summary>
+        /// 受理商户所在城市编码
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 受理商户联系人邮箱
+        /// </summary>
+        [JsonProperty("contact_email")]
+        public string ContactEmail { get; set; }
+
+        /// <summary>
+        /// 受理商户联系人手机号
+        /// </summary>
+        [JsonProperty("contact_mobile")]
+        public string ContactMobile { get; set; }
+
+        /// <summary>
+        /// 受理商户联系人名称
+        /// </summary>
+        [JsonProperty("contact_name")]
+        public string ContactName { get; set; }
+
+        /// <summary>
+        /// 受理商户联系人电话
+        /// </summary>
+        [JsonProperty("contact_phone")]
+        public string ContactPhone { get; set; }
+
+        /// <summary>
+        /// 受理商户所在区县编码
+        /// </summary>
+        [JsonProperty("district_code")]
+        public string DistrictCode { get; set; }
+
+        /// <summary>
+        /// 受理商户编号,由受理机构定义,需要保证在受理机构下唯一
+        /// </summary>
+        [JsonProperty("external_id")]
+        public string ExternalId { get; set; }
+
+        /// <summary>
+        /// 受理商户身份证编号
+        /// </summary>
+        [JsonProperty("id_card")]
+        public string IdCard { get; set; }
+
+        /// <summary>
+        /// 受理商户备注信息,可填写额外信息
+        /// </summary>
+        [JsonProperty("memo")]
+        public string Memo { get; set; }
+
+        /// <summary>
+        /// 受理商户名称
+        /// </summary>
+        [JsonProperty("name")]
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 受理商户所在省份编码
+        /// </summary>
+        [JsonProperty("province_code")]
+        public string ProvinceCode { get; set; }
+
+        /// <summary>
+        /// 受理商户客服电话
+        /// </summary>
+        [JsonProperty("service_phone")]
+        public string ServicePhone { get; set; }
+
+        /// <summary>
+        /// 受理商户来源机构标识,填写受理机构在支付宝的pid
+        /// </summary>
+        [JsonProperty("source")]
+        public string Source { get; set; }
+    }
+}

+ 82 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossProdSubmerchantModifyModel.cs

@@ -0,0 +1,82 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossProdSubmerchantModifyModel Data Structure.
+    /// </summary>
+    public class AlipayBossProdSubmerchantModifyModel : AlipayObject
+    {
+        /// <summary>
+        /// 受理商户详细经营地址
+        /// </summary>
+        [JsonProperty("address")]
+        public string Address { get; set; }
+
+        /// <summary>
+        /// 受理商户简称
+        /// </summary>
+        [JsonProperty("alias_name")]
+        public string AliasName { get; set; }
+
+        /// <summary>
+        /// 受理商户营业执照编号
+        /// </summary>
+        [JsonProperty("business_license")]
+        public string BusinessLicense { get; set; }
+
+        /// <summary>
+        /// 受理商户城市编码
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 受理商户联系人名称
+        /// </summary>
+        [JsonProperty("contact_name")]
+        public string ContactName { get; set; }
+
+        /// <summary>
+        /// 受理商户区县编码
+        /// </summary>
+        [JsonProperty("district_code")]
+        public string DistrictCode { get; set; }
+
+        /// <summary>
+        /// 受理商户编号,与sub_merchant_id二选一必传
+        /// </summary>
+        [JsonProperty("external_id")]
+        public string ExternalId { get; set; }
+
+        /// <summary>
+        /// 受理商户身份证编号
+        /// </summary>
+        [JsonProperty("id_card")]
+        public string IdCard { get; set; }
+
+        /// <summary>
+        /// 受理商户省份编码
+        /// </summary>
+        [JsonProperty("province_code")]
+        public string ProvinceCode { get; set; }
+
+        /// <summary>
+        /// 受理商户客服电话
+        /// </summary>
+        [JsonProperty("service_phone")]
+        public string ServicePhone { get; set; }
+
+        /// <summary>
+        /// 受理商户来源机构标识,填写受理机构在支付宝的pid
+        /// </summary>
+        [JsonProperty("source")]
+        public string Source { get; set; }
+
+        /// <summary>
+        /// 本次修改受理商户的支付宝识别号,同请求传入的sub_merchant_id字段,与external_id二选一必传
+        /// </summary>
+        [JsonProperty("sub_merchant_id")]
+        public string SubMerchantId { get; set; }
+    }
+}

+ 22 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayBossProdSubmerchantQueryModel.cs

@@ -0,0 +1,22 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayBossProdSubmerchantQueryModel Data Structure.
+    /// </summary>
+    public class AlipayBossProdSubmerchantQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 受理商户在受理机构下的唯一标识,与sub_merchant_id二选一必传
+        /// </summary>
+        [JsonProperty("external_id")]
+        public string ExternalId { get; set; }
+
+        /// <summary>
+        /// 受理商户在支付宝入驻后的识别号,商户入驻后由支付宝返回,与external_id二选一必传
+        /// </summary>
+        [JsonProperty("sub_merchant_id")]
+        public string SubMerchantId { get; set; }
+    }
+}

+ 34 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayChinareModelResult.cs

@@ -0,0 +1,34 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayChinareModelResult Data Structure.
+    /// </summary>
+    public class AlipayChinareModelResult : AlipayObject
+    {
+        /// <summary>
+        /// 体检记录id
+        /// </summary>
+        [JsonProperty("id")]
+        public string Id { get; set; }
+
+        /// <summary>
+        /// 规则id
+        /// </summary>
+        [JsonProperty("rule_id")]
+        public string RuleId { get; set; }
+
+        /// <summary>
+        /// 核保结果
+        /// </summary>
+        [JsonProperty("rule_result")]
+        public string RuleResult { get; set; }
+
+        /// <summary>
+        /// 交易流水记录id
+        /// </summary>
+        [JsonProperty("trans_id")]
+        public string TransId { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCodeRecoResult.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCodeRecoResult Data Structure.
+    /// </summary>
+    public class AlipayCodeRecoResult : AlipayObject
+    {
+        /// <summary>
+        /// 识别的验证码内容
+        /// </summary>
+        [JsonProperty("content")]
+        public string Content { get; set; }
+    }
+}

+ 59 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceBusinessorderQueryModel.cs

@@ -0,0 +1,59 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceBusinessorderQueryModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceBusinessorderQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 查询办事记录的时间区间中的开始时间,格式为yyyy-MM-dd HH:mm:ss
+        /// </summary>
+        [JsonProperty("begin_time")]
+        public string BeginTime { get; set; }
+
+        /// <summary>
+        /// 查询办事记录的时间区间中的结束时间,格式为yyyy-MM-dd HH:mm:ss
+        /// </summary>
+        [JsonProperty("end_time")]
+        public string EndTime { get; set; }
+
+        /// <summary>
+        /// isv的appid
+        /// </summary>
+        [JsonProperty("isv_appid")]
+        public string IsvAppid { get; set; }
+
+        /// <summary>
+        /// 分页查询的起始页数
+        /// </summary>
+        [JsonProperty("page_num")]
+        public string PageNum { get; set; }
+
+        /// <summary>
+        /// 分页查询的每页数据量
+        /// </summary>
+        [JsonProperty("page_size")]
+        public string PageSize { get; set; }
+
+        /// <summary>
+        /// 查询的办事记录所属服务展台(如城市服务为CITY_SERVICE,车主平台为MYCAR_SERVICE等)
+        /// </summary>
+        [JsonProperty("platform_type")]
+        public string PlatformType { get; set; }
+
+        /// <summary>
+        /// 办事记录状态列表
+        /// </summary>
+        [JsonProperty("status_list")]
+        public List<string> StatusList { get; set; }
+
+        /// <summary>
+        /// 支付宝userId
+        /// </summary>
+        [JsonProperty("user_id")]
+        public string UserId { get; set; }
+    }
+}

+ 46 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorDepositCancelModel.cs

@@ -0,0 +1,46 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorDepositCancelModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorDepositCancelModel : AlipayObject
+    {
+        /// <summary>
+        /// 扩展字段,传递撤销的终端信息,原因等
+        /// </summary>
+        [JsonProperty("biz_info_ext")]
+        public string BizInfoExt { get; set; }
+
+        /// <summary>
+        /// 充值卡号
+        /// </summary>
+        [JsonProperty("card_no")]
+        public string CardNo { get; set; }
+
+        /// <summary>
+        /// 交通卡卡类型,一个城市只有一个固定的值
+        /// </summary>
+        [JsonProperty("card_type")]
+        public string CardType { get; set; }
+
+        /// <summary>
+        /// 撤销时间
+        /// </summary>
+        [JsonProperty("operate_time")]
+        public string OperateTime { get; set; }
+
+        /// <summary>
+        /// 商户的交易号
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// 交易号
+        /// </summary>
+        [JsonProperty("trade_no")]
+        public string TradeNo { get; set; }
+    }
+}

+ 52 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorDepositConfirmModel.cs

@@ -0,0 +1,52 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorDepositConfirmModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorDepositConfirmModel : AlipayObject
+    {
+        /// <summary>
+        /// 传递确认的终端信息,终端编号等
+        /// </summary>
+        [JsonProperty("biz_info_ext")]
+        public string BizInfoExt { get; set; }
+
+        /// <summary>
+        /// 交通卡号
+        /// </summary>
+        [JsonProperty("card_no")]
+        public string CardNo { get; set; }
+
+        /// <summary>
+        /// 交通卡卡类型,一个城市只有一个固定的值
+        /// </summary>
+        [JsonProperty("card_type")]
+        public string CardType { get; set; }
+
+        /// <summary>
+        /// 核销时间
+        /// </summary>
+        [JsonProperty("operate_time")]
+        public string OperateTime { get; set; }
+
+        /// <summary>
+        /// 商户的交易号
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// 该笔请求的唯一编号,强校验,控制幂等性
+        /// </summary>
+        [JsonProperty("request_id")]
+        public string RequestId { get; set; }
+
+        /// <summary>
+        /// 支付宝交易号
+        /// </summary>
+        [JsonProperty("trade_no")]
+        public string TradeNo { get; set; }
+    }
+}

+ 28 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorDepositQueryModel.cs

@@ -0,0 +1,28 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorDepositQueryModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorDepositQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 交通卡号
+        /// </summary>
+        [JsonProperty("card_no")]
+        public string CardNo { get; set; }
+
+        /// <summary>
+        /// 和渠道定义的卡类型,一个城市支持一种卡类型
+        /// </summary>
+        [JsonProperty("card_type")]
+        public string CardType { get; set; }
+
+        /// <summary>
+        /// transfer:待圈存 success:圈存成功 fail:圈存失败
+        /// </summary>
+        [JsonProperty("status")]
+        public string Status { get; set; }
+    }
+}

+ 22 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorFunctionQueryModel.cs

@@ -0,0 +1,22 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorFunctionQueryModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorFunctionQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 城市国家标准编码
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 终端设备编码,android可直接获取设备的devicecode值
+        /// </summary>
+        [JsonProperty("device_code")]
+        public string DeviceCode { get; set; }
+    }
+}

+ 22 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorScriptQueryModel.cs

@@ -0,0 +1,22 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorScriptQueryModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorScriptQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 卡类型,智能卡中心的内部编码规则
+        /// </summary>
+        [JsonProperty("card_type")]
+        public string CardType { get; set; }
+
+        /// <summary>
+        /// 脚本类型,目前支持两种  readCardType:判定卡是什么城市的交通卡  readCardInfo:读取卡中的余额等信息
+        /// </summary>
+        [JsonProperty("script_type")]
+        public string ScriptType { get; set; }
+    }
+}

+ 16 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorStationQueryModel.cs

@@ -0,0 +1,16 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorStationQueryModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorStationQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 城市编码请参考查询:http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html;  已支持城市:广州 440100,深圳 440300,杭州330100。
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+    }
+}

+ 23 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherBatchqueryModel.cs

@@ -0,0 +1,23 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorVoucherBatchqueryModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorVoucherBatchqueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 城市编码请参考查询:http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html;  已支持城市:广州 440100,深圳 440300,杭州330100。
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 支付宝交易号列表
+        /// </summary>
+        [JsonProperty("trade_nos")]
+        public List<string> TradeNos { get; set; }
+    }
+}

+ 40 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherCancelModel.cs

@@ -0,0 +1,40 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorVoucherCancelModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorVoucherCancelModel : AlipayObject
+    {
+        /// <summary>
+        /// 渠道商提供的其它信息
+        /// </summary>
+        [JsonProperty("biz_info_ext")]
+        public string BizInfoExt { get; set; }
+
+        /// <summary>
+        /// 城市标准码
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 商户退款时间
+        /// </summary>
+        [JsonProperty("operate_time")]
+        public string OperateTime { get; set; }
+
+        /// <summary>
+        /// 核销号
+        /// </summary>
+        [JsonProperty("ticket_no")]
+        public string TicketNo { get; set; }
+
+        /// <summary>
+        /// 支付宝交易号
+        /// </summary>
+        [JsonProperty("trade_no")]
+        public string TradeNo { get; set; }
+    }
+}

+ 100 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherConfirmModel.cs

@@ -0,0 +1,100 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorVoucherConfirmModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorVoucherConfirmModel : AlipayObject
+    {
+        /// <summary>
+        /// 金额,元为单位
+        /// </summary>
+        [JsonProperty("amount")]
+        public string Amount { get; set; }
+
+        /// <summary>
+        /// 渠道商提供的其它信息
+        /// </summary>
+        [JsonProperty("biz_info_ext")]
+        public string BizInfoExt { get; set; }
+
+        /// <summary>
+        /// 该笔请求的唯一编号,有值请求强校验
+        /// </summary>
+        [JsonProperty("biz_request_id")]
+        public string BizRequestId { get; set; }
+
+        /// <summary>
+        /// 城市标准码
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 终点站编号
+        /// </summary>
+        [JsonProperty("end_station")]
+        public string EndStation { get; set; }
+
+        /// <summary>
+        /// 单张票编号列表,多个逗号分隔
+        /// </summary>
+        [JsonProperty("exchange_ids")]
+        public string ExchangeIds { get; set; }
+
+        /// <summary>
+        /// 商户核销时间
+        /// </summary>
+        [JsonProperty("operate_time")]
+        public string OperateTime { get; set; }
+
+        /// <summary>
+        /// 商户的交易号
+        /// </summary>
+        [JsonProperty("out_biz_no")]
+        public string OutBizNo { get; set; }
+
+        /// <summary>
+        /// 票数
+        /// </summary>
+        [JsonProperty("quantity")]
+        public string Quantity { get; set; }
+
+        /// <summary>
+        /// 请求方标识
+        /// </summary>
+        [JsonProperty("seller_id")]
+        public string SellerId { get; set; }
+
+        /// <summary>
+        /// 起点站编号
+        /// </summary>
+        [JsonProperty("start_station")]
+        public string StartStation { get; set; }
+
+        /// <summary>
+        /// 核销号
+        /// </summary>
+        [JsonProperty("ticket_no")]
+        public string TicketNo { get; set; }
+
+        /// <summary>
+        /// 票单价,元为单位
+        /// </summary>
+        [JsonProperty("ticket_price")]
+        public string TicketPrice { get; set; }
+
+        /// <summary>
+        /// 票类型
+        /// </summary>
+        [JsonProperty("ticket_type")]
+        public string TicketType { get; set; }
+
+        /// <summary>
+        /// 支付宝交易号
+        /// </summary>
+        [JsonProperty("trade_no")]
+        public string TradeNo { get; set; }
+    }
+}

+ 58 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherGenerateModel.cs

@@ -0,0 +1,58 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorVoucherGenerateModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorVoucherGenerateModel : AlipayObject
+    {
+        /// <summary>
+        /// 城市编码请参考查询:http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html;  已支持城市:广州 440100,深圳 440300,杭州330100。
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 起点站站点编码
+        /// </summary>
+        [JsonProperty("site_begin")]
+        public string SiteBegin { get; set; }
+
+        /// <summary>
+        /// 终点站站点编码
+        /// </summary>
+        [JsonProperty("site_end")]
+        public string SiteEnd { get; set; }
+
+        /// <summary>
+        /// 地铁票购票数量
+        /// </summary>
+        [JsonProperty("ticket_num")]
+        public string TicketNum { get; set; }
+
+        /// <summary>
+        /// 单张票价,元为单价
+        /// </summary>
+        [JsonProperty("ticket_price")]
+        public string TicketPrice { get; set; }
+
+        /// <summary>
+        /// 地铁票种类
+        /// </summary>
+        [JsonProperty("ticket_type")]
+        public string TicketType { get; set; }
+
+        /// <summary>
+        /// 订单总金额,元为单位
+        /// </summary>
+        [JsonProperty("total_fee")]
+        public string TotalFee { get; set; }
+
+        /// <summary>
+        /// 支付宝交易号(交易支付时,必须通过指定sellerId:2088121612215201,将钱支付到指定的中间户中)
+        /// </summary>
+        [JsonProperty("trade_no")]
+        public string TradeNo { get; set; }
+    }
+}

+ 28 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherQueryModel.cs

@@ -0,0 +1,28 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorVoucherQueryModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorVoucherQueryModel : AlipayObject
+    {
+        /// <summary>
+        /// 城市标准码
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 8位核销码
+        /// </summary>
+        [JsonProperty("ticket_no")]
+        public string TicketNo { get; set; }
+
+        /// <summary>
+        /// 支付宝交易号
+        /// </summary>
+        [JsonProperty("trade_no")]
+        public string TradeNo { get; set; }
+    }
+}

+ 22 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherRefundModel.cs

@@ -0,0 +1,22 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorVoucherRefundModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorVoucherRefundModel : AlipayObject
+    {
+        /// <summary>
+        /// 城市编码请参考查询:http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html;  已支持城市:广州 440100,深圳 440300,杭州330100。
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// 支付宝交易号
+        /// </summary>
+        [JsonProperty("trade_no")]
+        public string TradeNo { get; set; }
+    }
+}

+ 46 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceCityfacilitatorVoucherUploadModel.cs

@@ -0,0 +1,46 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceCityfacilitatorVoucherUploadModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceCityfacilitatorVoucherUploadModel : AlipayObject
+    {
+        /// <summary>
+        /// 渠道商提供的其它信息
+        /// </summary>
+        [JsonProperty("biz_info_ext")]
+        public string BizInfoExt { get; set; }
+
+        /// <summary>
+        /// 城市标准码
+        /// </summary>
+        [JsonProperty("city_code")]
+        public string CityCode { get; set; }
+
+        /// <summary>
+        /// JSON字符串,包含出票的序列号,票号,出票时间,出票流水号
+        /// </summary>
+        [JsonProperty("exchange_ids")]
+        public string ExchangeIds { get; set; }
+
+        /// <summary>
+        /// 操作时间
+        /// </summary>
+        [JsonProperty("operate_time")]
+        public string OperateTime { get; set; }
+
+        /// <summary>
+        /// 核销码
+        /// </summary>
+        [JsonProperty("ticket_no")]
+        public string TicketNo { get; set; }
+
+        /// <summary>
+        /// 支付宝交易号
+        /// </summary>
+        [JsonProperty("trade_no")]
+        public string TradeNo { get; set; }
+    }
+}

+ 29 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceDataMonitordataSyncModel.cs

@@ -0,0 +1,29 @@
+using Newtonsoft.Json;
+using System.Collections.Generic;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceDataMonitordataSyncModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceDataMonitordataSyncModel : AlipayObject
+    {
+        /// <summary>
+        /// 传入的批量打包数据,dataEntry和dataDim的组合数据,详见dataEntry和dataDim的说明
+        /// </summary>
+        [JsonProperty("datas")]
+        public List<Datas> Datas { get; set; }
+
+        /// <summary>
+        /// 接口的版本,当前版本是v1.0.0
+        /// </summary>
+        [JsonProperty("interface_version")]
+        public string InterfaceVersion { get; set; }
+
+        /// <summary>
+        /// 监控产品码,用来区分当前接口调用传递数据属于哪种类型的产品.  商户可自定义.
+        /// </summary>
+        [JsonProperty("product_code")]
+        public string ProductCode { get; set; }
+    }
+}

+ 58 - 0
src/Essensoft.AspNetCore.Alipay/Domain/AlipayCommerceDataResultSendModel.cs

@@ -0,0 +1,58 @@
+using Newtonsoft.Json;
+
+namespace Essensoft.AspNetCore.Alipay.Domain
+{
+    /// <summary>
+    /// AlipayCommerceDataResultSendModel Data Structure.
+    /// </summary>
+    public class AlipayCommerceDataResultSendModel : AlipayObject
+    {
+        /// <summary>
+        /// 请求来源
+        /// </summary>
+        [JsonProperty("channel")]
+        public string Channel { get; set; }
+
+        /// <summary>
+        /// 版本号,由支付宝分配
+        /// </summary>
+        [JsonProperty("interface_version")]
+        public string InterfaceVersion { get; set; }
+
+        /// <summary>
+        /// 操作code,由支付宝分配
+        /// </summary>
+        [JsonProperty("op_code")]
+        public string OpCode { get; set; }
+
+        /// <summary>
+        /// 结果码,由支付宝分配,该结果码将对应不同的页面展示
+        /// </summary>
+        [JsonProperty("result_code")]
+        public string ResultCode { get; set; }
+
+        /// <summary>
+        /// 场景code,由支付宝分配
+        /// </summary>
+        [JsonProperty("scene_code")]
+        public string SceneCode { get; set; }
+
+        /// <summary>
+        /// 场景的数据表示. json 数组格式,  根据不同的scene_code,op_code,  channel,version共同确定参数是否  可以为空,接入时由支付宝确定  参数格式。
+        /// </summary>
+        [JsonProperty("scene_data")]
+        public string SceneData { get; set; }
+
+        /// <summary>
+        /// 通知的目标用户
+        /// </summary>
+        [JsonProperty("target_id")]
+        public string TargetId { get; set; }
+
+        /// <summary>
+        /// 取值范围:  IDENTITY_CARD_NO :身份证  ALIPAY_LOGON_ID:支付宝登录账号  BINDING_MOBILE_NO:支付宝账号绑定的手机号   ALIPAY_USER_ID:支付宝user_id  标明target_id对应的类型,此参数为空时,  默认为支付宝账号的user_id。  注意:类型为身份证、支付宝绑定的手机号时,  可能对应多个支付宝账号,此时只会选择列表  第一个支付宝账号的userId作为targetId使用。
+        /// </summary>
+        [JsonProperty("target_id_type")]
+        public string TargetIdType { get; set; }
+    }
+}

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است