Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
system_pay
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
王沛
system_pay
Commits
4bd5ae32
Commit
4bd5ae32
authored
Jul 13, 2023
by
wangp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lakala
parent
2067555f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
40 deletions
+44
-40
notice.go
controller/api/v1/pay/notice.go
+10
-10
pay.go
models/pay.go
+1
-1
pay.go
repository/pay/pay.go
+33
-29
No files found.
controller/api/v1/pay/notice.go
View file @
4bd5ae32
...
@@ -47,18 +47,18 @@ func (l *PayController) WxNotice(c *gin.Context) {
...
@@ -47,18 +47,18 @@ func (l *PayController) WxNotice(c *gin.Context) {
//fmt.Println(ph2)
//fmt.Println(ph2)
//验证签名
//验证签名
_
,
err
:=
verySignByPublicKey
(
c
)
//
_, err := verySignByPublicKey(c)
if
err
!=
nil
{
//
if err != nil {
fmt
.
Println
(
"verySignByPublicKey err: "
,
err
)
//
fmt.Println("verySignByPublicKey err: ", err)
response
:=
new
(
base
.
ResponseDataWxNotice
)
//
response := new(base.ResponseDataWxNotice)
response
.
Code
=
"FAIL"
//
response.Code = "FAIL"
response
.
Message
=
"验证签名失败"
//
response.Message = "验证签名失败"
base
.
ResponseWxNotice
(
c
,
response
)
//
base.ResponseWxNotice(c, response)
return
//
return
}
//
}
ph
:=
new
(
models
.
WxNoticeInput
)
ph
:=
new
(
models
.
WxNoticeInput
)
err
=
c
.
ShouldBindJSON
(
ph
)
err
:
=
c
.
ShouldBindJSON
(
ph
)
if
err
!=
nil
{
if
err
!=
nil
{
response
:=
new
(
base
.
ResponseDataWxNotice
)
response
:=
new
(
base
.
ResponseDataWxNotice
)
response
.
Code
=
"FAIL"
response
.
Code
=
"FAIL"
...
...
models/pay.go
View file @
4bd5ae32
...
@@ -10,7 +10,7 @@ type PlaceAnOrderParamInput struct {
...
@@ -10,7 +10,7 @@ type PlaceAnOrderParamInput struct {
GoodsPrice
float64
`json:"goods_price" description:"商品金额,个位为分"`
GoodsPrice
float64
`json:"goods_price" description:"商品金额,个位为分"`
NoticeURL
string
`json:"notice_url" description:"客户端回调的url"`
NoticeURL
string
`json:"notice_url" description:"客户端回调的url"`
PayType
int
`json:"pay_type" description:"1: 微信,2: 支付宝, 3: 拉卡拉 4: 收钱吧"`
PayType
int
`json:"pay_type" description:"1: 微信,2: 支付宝, 3: 拉卡拉 4: 收钱吧"`
SourceCode
uint8
`json:"source_code" description:"1: 微信 Native 2:微信小程序 3:微信内支付 4:h5 跳微信 5:支付宝(web)-扫码或登录支付宝账户 6:alipay(mobile) 7:alipay(app) 9: B2C 10:bk支付宝web 11:bk 支付宝手机"`
SourceCode
uint8
`json:"source_code" description:"1: 微信 Native 2:微信小程序 3:微信内支付 4:h5 跳微信 5:支付宝(web)-扫码或登录支付宝账户 6:alipay(mobile) 7:alipay(app) 9: B2C 10:bk支付宝web 11:bk 支付宝手机
15:快捷支付(银行卡)"
"`
OpenID
string
`json:"open_id" description:"此参数 支付类型是 JS API 的时候 必传"`
OpenID
string
`json:"open_id" description:"此参数 支付类型是 JS API 的时候 必传"`
WapURL
string
`json:"wap_url" description:"WAP网站URL地址, 支付方式为微信MWEB时 必传"`
WapURL
string
`json:"wap_url" description:"WAP网站URL地址, 支付方式为微信MWEB时 必传"`
WapName
string
`json:"wap_name" description:"WAP网站名称, 支付方式为微信MWEB时 必传"`
WapName
string
`json:"wap_name" description:"WAP网站名称, 支付方式为微信MWEB时 必传"`
...
...
repository/pay/pay.go
View file @
4bd5ae32
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