Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
19781c4e
Commit
19781c4e
authored
May 13, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
4610f6d4
341670f7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
199 additions
and
175 deletions
+199
-175
FinanceConfigTypeEnum.cs
Edu.Common/Enum/Course/FinanceConfigTypeEnum.cs
+6
-1
WxPayCallbackRespModel.cs
...hatPayAPIv3.Model/WxPayCallback/WxPayCallbackRespModel.cs
+1
-1
WxPayConst.cs
Edu.Common/WeChatPayAPIv3.Model/WxPayConst.cs
+1
-1
WxPayHelper.cs
Edu.Common/WeChatPayAPIv3/WxPayHelper.cs
+4
-0
RB_Finance_Config.cs
Edu.Model/Entity/Course/RB_Finance_Config.cs
+5
-0
EducationContractModule.cs
Edu.Module.Course/EducationContractModule.cs
+17
-1
WeChatPayController.cs
Edu.WebApi/Controllers/WeChatPay/WeChatPayController.cs
+165
-171
No files found.
Edu.Common/Enum/Course/FinanceConfigTypeEnum.cs
View file @
19781c4e
...
@@ -47,6 +47,11 @@ namespace Edu.Common.Enum.Course
...
@@ -47,6 +47,11 @@ namespace Edu.Common.Enum.Course
/// 耗材出库
/// 耗材出库
/// </summary>
/// </summary>
[
EnumField
(
"耗材出库"
)]
[
EnumField
(
"耗材出库"
)]
SuppliesStockOut
=
7
SuppliesStockOut
=
7
,
/// <summary>
/// 学费收入
/// </summary>
[
EnumField
(
"学费收入"
)]
Tuition
=
8
}
}
}
}
Edu.Common/WeChatPayAPIv3.Model/WxPayCallback/WxPayCallbackRespModel.cs
View file @
19781c4e
...
@@ -9,7 +9,7 @@ namespace Edu.Common.WeChatPayAPIv3.Model.WxPayCallback
...
@@ -9,7 +9,7 @@ namespace Edu.Common.WeChatPayAPIv3.Model.WxPayCallback
/// <summary>
/// <summary>
/// 返回状态码,错误码,SUCCESS为清算机构接收成功,其他错误码为失败。
/// 返回状态码,错误码,SUCCESS为清算机构接收成功,其他错误码为失败。
/// </summary>
/// </summary>
public
string
code
{
set
;
get
;
}
=
"SUCCESS"
;
public
string
code
{
set
;
get
;
}
=
"
FAIL"
;
//"
SUCCESS";
/// <summary>
/// <summary>
/// 返回信息,如非空,为错误原因。
/// 返回信息,如非空,为错误原因。
...
...
Edu.Common/WeChatPayAPIv3.Model/WxPayConst.cs
View file @
19781c4e
...
@@ -20,7 +20,7 @@ namespace Edu.Common.WeChatPayAPIv3.Model
...
@@ -20,7 +20,7 @@ namespace Edu.Common.WeChatPayAPIv3.Model
/// 密钥,用商户平台上设置的APIv3密钥【微信商户平台—>账户设置—>API安全—>设置APIv3密钥】,记为key;
/// 密钥,用商户平台上设置的APIv3密钥【微信商户平台—>账户设置—>API安全—>设置APIv3密钥】,记为key;
/// 官方资料:https://kf.qq.com/faq/180830E36vyQ180830AZFZvu.html
/// 官方资料:https://kf.qq.com/faq/180830E36vyQ180830AZFZvu.html
/// </summary>
/// </summary>
public
static
string
APIV3Key
=>
"
WECHATPAY2-SHA256-RSA2048
"
;
public
static
string
APIV3Key
=>
"
8A6453965FB561BC90CC4CB290F26469
"
;
/// <summary>
/// <summary>
/// 直连商户的商户号,由微信支付生成并下发。
/// 直连商户的商户号,由微信支付生成并下发。
...
...
Edu.Common/WeChatPayAPIv3/WxPayHelper.cs
View file @
19781c4e
...
@@ -79,12 +79,14 @@ namespace Edu.Common.WeChatPayAPIv3
...
@@ -79,12 +79,14 @@ namespace Edu.Common.WeChatPayAPIv3
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
// var bodyJson = new StringContent(req.ToJson(), Encoding.UTF8, "application/json");
// var bodyJson = new StringContent(req.ToJson(), Encoding.UTF8, "application/json");
var
bodyJson
=
new
StringContent
(
Common
.
Plugin
.
JsonHelper
.
Serialize
(
req
),
Encoding
.
UTF8
,
"application/json"
);
var
bodyJson
=
new
StringContent
(
Common
.
Plugin
.
JsonHelper
.
Serialize
(
req
),
Encoding
.
UTF8
,
"application/json"
);
var
resp
=
await
client
.
PostAsync
(
url
,
bodyJson
);
var
resp
=
await
client
.
PostAsync
(
url
,
bodyJson
);
// 注意!!! 这个resp只是http的结果,需要把接口具体返回的值读取出来,如果接口报错的话,这地方可以看到具体的错误信息,我就是在这里入坑的。
// 注意!!! 这个resp只是http的结果,需要把接口具体返回的值读取出来,如果接口报错的话,这地方可以看到具体的错误信息,我就是在这里入坑的。
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
// 如果下单成功,就解析返回的结果,把prepay_id解析出来
// 如果下单成功,就解析返回的结果,把prepay_id解析出来
// var viewModel = respStr.ToObject<WxPayRespModel>();
// var viewModel = respStr.ToObject<WxPayRespModel>();
Plugin
.
LogHelper
.
WriteInfo
(
respStr
);
var
viewModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
WxPayRespModel
>(
respStr
);
var
viewModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
WxPayRespModel
>(
respStr
);
return
viewModel
;
return
viewModel
;
}
}
...
@@ -99,6 +101,7 @@ namespace Edu.Common.WeChatPayAPIv3
...
@@ -99,6 +101,7 @@ namespace Edu.Common.WeChatPayAPIv3
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
resp
=
await
client
.
GetAsync
(
url
);
var
resp
=
await
client
.
GetAsync
(
url
);
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
Plugin
.
LogHelper
.
WriteInfo
(
"查询订单的支付结果信息:"
+
respStr
);
var
payModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
WxPayStatusRespModel
>(
respStr
);
// respStr.ToObject<WxPayStatusRespModel>();
var
payModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
WxPayStatusRespModel
>(
respStr
);
// respStr.ToObject<WxPayStatusRespModel>();
return
payModel
;
return
payModel
;
}
}
...
@@ -170,6 +173,7 @@ namespace Edu.Common.WeChatPayAPIv3
...
@@ -170,6 +173,7 @@ namespace Edu.Common.WeChatPayAPIv3
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
client
=
new
HttpClient
(
new
WxPayRequestHandler
(
_mchid
,
_serialNo
,
_privateKey
));
var
resp
=
await
client
.
GetAsync
(
url
);
var
resp
=
await
client
.
GetAsync
(
url
);
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
var
respStr
=
await
resp
.
Content
.
ReadAsStringAsync
();
Plugin
.
LogHelper
.
WriteInfo
(
"查询订单的退款结果信息:"
+
respStr
);
var
payModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
QueryRefundsOrderRespModel
>(
respStr
);
//respStr.ToObject<QueryRefundsOrderRespModel>();
var
payModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
QueryRefundsOrderRespModel
>(
respStr
);
//respStr.ToObject<QueryRefundsOrderRespModel>();
return
payModel
;
return
payModel
;
}
}
...
...
Edu.Model/Entity/Course/RB_Finance_Config.cs
View file @
19781c4e
...
@@ -71,5 +71,10 @@ namespace Edu.Model.Entity.Course
...
@@ -71,5 +71,10 @@ namespace Edu.Model.Entity.Course
/// 币种id
/// 币种id
/// </summary>
/// </summary>
public
int
CurrencyId
{
get
;
set
;
}
public
int
CurrencyId
{
get
;
set
;
}
/// <summary>
/// ClientID=74 的时候是学费收款账户id
/// </summary>
public
int
ClientID
{
get
;
set
;
}
}
}
}
}
Edu.Module.Course/EducationContractModule.cs
View file @
19781c4e
...
@@ -71,7 +71,10 @@ namespace Edu.Module.Course
...
@@ -71,7 +71,10 @@ namespace Edu.Module.Course
/// </summary>
/// </summary>
private
readonly
RB_Online_Trade_DetailRepository
OnlineTradeDetailRepository
=
new
RB_Online_Trade_DetailRepository
();
private
readonly
RB_Online_Trade_DetailRepository
OnlineTradeDetailRepository
=
new
RB_Online_Trade_DetailRepository
();
/// <summary>
/// 财务配置
/// </summary>
private
readonly
RB_Finance_ConfigRepository
finance_ConfigRepository
=
new
RB_Finance_ConfigRepository
();
/// <summary>
/// <summary>
/// 获取学员信息
/// 获取学员信息
...
@@ -324,6 +327,19 @@ namespace Edu.Module.Course
...
@@ -324,6 +327,19 @@ namespace Edu.Module.Course
#
region
合同订单信息
#
region
合同订单信息
/// <summary>
/// 获取财务配置列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Finance_Config_ViewModel
>
GetFinanceConfigList
(
RB_Finance_Config_ViewModel
dmodel
)
{
return
finance_ConfigRepository
.
GetList
(
dmodel
);
}
/// <summary>
/// <summary>
/// 新增合同的付款记录
/// 新增合同的付款记录
/// </summary>
/// </summary>
...
...
Edu.WebApi/Controllers/WeChatPay/WeChatPayController.cs
View file @
19781c4e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment