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
330bf178
Commit
330bf178
authored
Aug 25, 2023
by
wangp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拉卡拉
parent
92b92866
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
pay.go
repository/pay/pay.go
+11
-7
No files found.
repository/pay/pay.go
View file @
330bf178
...
...
@@ -111,9 +111,11 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
//source_code 1: 微信 Native 2:微信小程序 3:微信内支付 4:h5 跳微信
//5:支付宝(web)-扫码或登录支付宝账户 6:alipay(mobile) 7:alipay(app)
//9: B2C 10:bk支付宝web 11:bk 支付宝手机 15:快捷支付(银行卡)
if
input
.
SourceCode
==
4
||
input
.
SourceCode
==
6
||
input
.
SourceCode
==
1
||
input
.
SourceCode
==
5
||
input
.
SourceCode
==
15
{
//9: B2C 10:bk支付宝web 11:bk 支付宝手机 15:快捷支付(银行卡) 16:微信小程序-必康自营
if
input
.
SourceCode
==
4
||
input
.
SourceCode
==
6
||
input
.
SourceCode
==
1
||
input
.
SourceCode
==
5
||
input
.
SourceCode
==
15
||
input
.
SourceCode
==
16
{
//聚合收银台(微信H5、支付宝H5、微信扫码、支付宝扫码)
//聚合收银台(微信小程序-必康自营)
//url = "https://test.wsmsd.cn/sit/api/v3/ccss/counter/order/create" //聚合收银台
url
=
setting
.
Conf
.
Lakala
.
UrlCreate
//聚合收银台
...
...
@@ -134,7 +136,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
if
input
.
SourceCode
==
15
{
//快捷支付
data2
[
"counter_param"
]
=
"{
\"
pay_mode
\"
:
\"
QUICK_PAY
\"
}"
}
else
if
input
.
SourceCode
<
5
{
}
else
if
input
.
SourceCode
<
5
||
input
.
SourceCode
==
16
{
//微信
data2
[
"counter_param"
]
=
"{
\"
pay_mode
\"
:
\"
WECHAT
\"
}"
}
else
{
...
...
@@ -228,7 +230,7 @@ func UnifiedOrder(input *models.PlaceAnOrderParamInput, ip string) (interface{},
data
[
"req_data"
]
=
data2
}
else
{
return
nil
,
errors
.
New
(
"输入参数「source_code」错误,有效值为[1-6,9,15]"
)
return
nil
,
errors
.
New
(
"输入参数「source_code」错误,有效值为[1-6,9,15
,16
]"
)
}
//数据重组 - end
fmt
.
Println
(
"拉卡拉输入参数"
)
...
...
@@ -319,14 +321,16 @@ func lakala_post(input *models.PlaceAnOrderParamInput, url string, data_json []b
//return nil, temp["resp_data"]["counter_url"]
response
:=
make
(
map
[
string
]
string
)
if
source_code
==
4
||
source_code
==
6
||
source_code
==
1
||
source_code
==
5
||
source_code
==
15
{
if
source_code
==
4
||
source_code
==
6
||
source_code
==
1
||
source_code
==
5
||
source_code
==
15
||
input
.
SourceCode
==
16
{
//聚合收银台(微信H5、支付宝H5、微信扫码、支付宝扫码、快捷支付(银行卡))
//聚合收银台(微信小程序-必康自营)
temp2
,
_
:=
temp
[
"resp_data"
]
.
(
map
[
string
]
interface
{})
if
temp2
[
"counter_url"
]
==
""
{
return
errors
.
New
(
"拉卡拉返回值「counter_url」为空错误"
),
""
,
temp
}
if
source_code
==
4
||
source_code
==
6
||
source_code
==
15
{
if
source_code
==
4
||
source_code
==
6
||
source_code
==
15
||
input
.
SourceCode
==
16
{
//微信H5、支付宝H5、快捷支付(银行卡)
//聚合收银台(微信小程序-必康自营)
response
[
"m_web_url"
]
=
temp2
[
"counter_url"
]
.
(
string
)
}
else
{
//微信扫码、支付宝扫码
...
...
@@ -764,7 +768,7 @@ func selectRefundBill(tx *sql.Tx, input *models.RefundParamInput) (string, strin
}
if
source_code
==
0
{
return
""
,
""
,
0
,
0
,
errors
.
New
(
"「source_code」错误,有效值为[1-6,9,15]"
)
return
""
,
""
,
0
,
0
,
errors
.
New
(
"「source_code」错误,有效值为[1-6,9,15
,16
]"
)
}
// 获取「对账单流水号」和「交易终端号」,退款用
...
...
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