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
9fd31c84
Commit
9fd31c84
authored
Dec 18, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
1d129701
33cb5928
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
WeChatNotifyController.cs
...WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
+56
-0
No files found.
Mall.WebApi/Controllers/AppletWeChat/WeChatNotifyController.cs
View file @
9fd31c84
...
@@ -92,6 +92,62 @@ namespace Mall.WebApi.Controllers.AppletWeChat
...
@@ -92,6 +92,62 @@ namespace Mall.WebApi.Controllers.AppletWeChat
}
}
/// <summary>
/// 订单支付回调
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
public
string
NotifyZhouTian
()
{
var
req
=
new
RequestHandler
();
App_Code
.
PayUtil
PayUtil
=
new
App_Code
.
PayUtil
();
var
result
=
PayUtil
.
NotifyZhouTian
(
_accessor
);
if
(
result
.
IsSuccess
)
{
var
dic
=
((
Dictionary
<
string
,
string
>)
result
.
Data
);
//开始回写订单状态
lock
(
_lock
)
{
string
sOrderNo
=
dic
[
"sOrderNo"
];
//订单号 时间挫+OrderId
int
OrderId
=
Convert
.
ToInt32
(
sOrderNo
[
17.
.]);
decimal
dPaid
=
Convert
.
ToDecimal
(
dic
[
"dPrice"
])
/
100
;
string
sPayerOpenID
=
dic
[
"sPayerOpenID"
];
int
UserId
=
Convert
.
ToInt32
(
dic
[
"bIsRecharge"
]);
string
TransactionId
=
dic
[
"sTradeNo"
];
string
PayType
=
dic
[
"OrderPayType"
];
DateTime
PayDate
=
DateTime
.
ParseExact
(
dic
[
"PayDate"
],
"yyyyMMddHHmmss"
,
System
.
Globalization
.
CultureInfo
.
CurrentCulture
);
//转换时间// Convert.ToDateTime(dic["PayDate"]);
#
region
新增订单支付信息
userCommonModule
.
InsertOrderPayInfo
(
UserId
,
OrderId
,
sOrderNo
,
TransactionId
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
PayType
,
dPaid
,
PayDate
,
0
);
#
endregion
}
//告诉微信我们已经处理成功,不需要再调用我们的接口了
req
.
SetParameter
(
"return_code"
,
"SUCCESS"
);
req
.
SetParameter
(
"return_msg"
,
"OK"
);
var
reqXml
=
req
.
ParseXml
();
return
reqXml
;
// return ApiResult.Success("", reqXml);
}
else
{
req
.
SetParameter
(
"return_code"
,
"FAIL"
);
req
.
SetParameter
(
"return_msg"
,
"订单失败"
);
var
reqXmlFAIL
=
req
.
ParseXml
();
LogHelper
.
Write
(
null
,
"Notify返回信息:"
+
reqXmlFAIL
);
return
reqXmlFAIL
;
// return ApiResult.Failed("", reqXmlFAIL);
}
}
/// <summary>
/// <summary>
/// 会员充值支付回调
/// 会员充值支付回调
/// </summary>
/// </summary>
...
...
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