Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
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
黄奎
mall.oytour.com
Commits
6c6f3d4a
Commit
6c6f3d4a
authored
Dec 18, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
33cb5928
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
PayUtil.cs
Mall.WebApi/App_Code/PayUtil.cs
+2
-1
WeChatNotifyController.cs
...WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
+3
-1
No files found.
Mall.WebApi/App_Code/PayUtil.cs
View file @
6c6f3d4a
...
...
@@ -210,13 +210,14 @@ namespace Mall.WebApi.App_Code
var
res
=
new
ResponseHandler
(
accessor
);
var
tradeType
=
res
.
GetParameter
(
"trade_type"
);
LogHelper
.
WriteInfo
(
"Notify支付回调:res-"
+
res
.
ToString
());
LogHelper
.
WriteInfo
(
"Notify
ZhouTian
支付回调:res-"
+
res
.
ToString
());
RB_MiniProgram_Extend
model
=
new
RB_MiniProgram_Extend
();
model
=
programModule
.
GetMiniProgramModule
(
new
RB_MiniProgram_Extend
{
MallBaseId
=
6
,
TenantId
=
16
});
res
.
SetKey
(
model
.
WeChatApiSecret
);
//判断签名
if
(
res
.
IsWXsign
(
out
string
error
))
{
LogHelper
.
WriteInfo
(
"NotifyZhouTian支付回调成功"
);
#
region
参数
var
returnCode
=
res
.
GetParameter
(
"return_code"
);
//返回信息,如非空,为错误原因签名失败参数格式校验错误
...
...
Mall.WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
View file @
6c6f3d4a
...
...
@@ -105,8 +105,10 @@ namespace Mall.WebApi.Controllers.AppletWeChat
var
req
=
new
RequestHandler
();
App_Code
.
PayUtil
PayUtil
=
new
App_Code
.
PayUtil
();
var
result
=
PayUtil
.
NotifyZhouTian
(
_accessor
);
LogHelper
.
Write
(
null
,
"NotifyZhouTian返回信息进来了"
);
if
(
result
.
IsSuccess
)
{
LogHelper
.
Write
(
null
,
"NotifyZhouTian回调成功:"
+
result
.
ToString
());
var
dic
=
((
Dictionary
<
string
,
string
>)
result
.
Data
);
//开始回写订单状态
lock
(
_lock
)
...
...
@@ -122,7 +124,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
DateTime
PayDate
=
DateTime
.
ParseExact
(
dic
[
"PayDate"
],
"yyyyMMddHHmmss"
,
System
.
Globalization
.
CultureInfo
.
CurrentCulture
);
//转换时间// Convert.ToDateTime(dic["PayDate"]);
#
region
新增订单支付信息
LogHelper
.
Write
(
null
,
"NotifyZhouTian订单信息"
);
userCommonModule
.
InsertOrderPayInfo
(
UserId
,
OrderId
,
sOrderNo
,
TransactionId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
PayType
,
dPaid
,
PayDate
,
0
);
...
...
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