Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ldy
/
payment
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0eff903c
authored
May 15, 2023
by
郑建康(PHP)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复慧收钱退费模块返回数据
1 parent
b5654469
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
12 deletions
src/Common/Hsq/HsqBaseStrategy.php
src/Refund/HsqRefund.php
src/Common/Hsq/HsqBaseStrategy.php
View file @
0eff903
...
...
@@ -51,12 +51,9 @@ abstract class HsqBaseStrategy implements BaseStrategy
}
$body
=
http_build_query
(
$body
);
if
(
empty
(
$body
))
throw
new
PayException
(
'支付数据异常'
);
$response
=
$this
->
curlPost
(
$body
,
$url
);
if
(
$response
[
'error'
])
throw
new
PayException
(
'网络发生错误,请稍后再试curl返回码:'
.
$response
[
'message'
]);
$retData
=
json_decode
(
$response
[
'body'
],
true
);
$result
=
json_decode
(
$retData
[
'result'
],
true
);
if
(
$result
[
'orderStatus'
]
==
'FAIL'
)
throw
new
PayException
(
'支付平台返回错误提示:'
.
$result
[
'respMsg'
]);
...
...
src/Refund/HsqRefund.php
View file @
0eff903
...
...
@@ -46,15 +46,7 @@ class HsqRefund extends HsqBaseStrategy
*/
protected
function
retData
(
array
$data
)
{
$backData
=
[
'order_type'
=>
$data
[
'order_type'
]
??
''
,
//订单类型
'order_no'
=>
$data
[
'mchnt_order_no'
]
??
''
,
//原交易商户订单号
'refund_no'
=>
$data
[
'refund_order_no'
]
??
''
,
//商户退款单号
'out_trade_no'
=>
$data
[
'transaction_id'
]
??
''
,
//渠道交易流水号
'out_refund_no'
=>
$data
[
'refund_id'
]
??
''
,
//渠道撤销流水号
'refund_fee'
=>
$data
[
'reserved_refund_amt'
]
??
0
,
//退款金额
'other'
=>
$data
];
$backData
=
json_decode
(
$data
[
'result'
]
,
true
);
return
$backData
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment