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 fe1a50cd
authored
Apr 15, 2019
by
yeran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
1 parent
64b2fd5e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
src/Common/MiPay/Data/Cancel/RefundData.php
src/Common/Sw/SwBaseStrategy.php
src/Common/SwConfig.php
src/Common/MiPay/Data/Cancel/RefundData.php
View file @
fe1a50c
...
@@ -58,7 +58,7 @@ class RefundData extends MiBaseData
...
@@ -58,7 +58,7 @@ class RefundData extends MiBaseData
// 二者不能同时为空
// 二者不能同时为空
if
(
empty
(
$oldreqsn
)
&&
empty
(
$oldtrxid
))
{
if
(
empty
(
$oldreqsn
)
&&
empty
(
$oldtrxid
))
{
throw
new
PayException
(
'必须提供
米付
支付交易号或平台唯一订单号。'
);
throw
new
PayException
(
'必须提供
02m
支付交易号或平台唯一订单号。'
);
}
}
// if ($trxamt<1) {
// if ($trxamt<1) {
...
...
src/Common/Sw/SwBaseStrategy.php
View file @
fe1a50c
...
@@ -61,11 +61,11 @@ abstract class SwBaseStrategy implements BaseStrategy
...
@@ -61,11 +61,11 @@ abstract class SwBaseStrategy implements BaseStrategy
$retData
=
(
json_decode
(
$responseTxt
[
'body'
],
true
));
$retData
=
(
json_decode
(
$responseTxt
[
'body'
],
true
));
if
(
$retData
[
'return_code'
]
!=
'01'
)
{
if
(
$retData
[
'return_code'
]
!=
'01'
)
{
throw
new
PayException
(
'
扫呗
平台返回错误提示:'
.
$retData
[
'return_msg'
]);
throw
new
PayException
(
'
SW
平台返回错误提示:'
.
$retData
[
'return_msg'
]);
}
}
if
(
$retData
[
'result_code'
]
==
'02'
)
{
if
(
$retData
[
'result_code'
]
==
'02'
)
{
$msg
=
$retData
[
'result_code'
]
.
' : '
.
$retData
[
'return_msg'
];
$msg
=
$retData
[
'result_code'
]
.
' : '
.
$retData
[
'return_msg'
];
throw
new
PayException
(
'
扫呗
返回错误提示:'
.
$msg
);
throw
new
PayException
(
'
SW
返回错误提示:'
.
$msg
);
}
}
return
$retData
;
return
$retData
;
...
...
src/Common/SwConfig.php
View file @
fe1a50c
...
@@ -107,13 +107,13 @@ final class SwConfig extends ConfigInterface
...
@@ -107,13 +107,13 @@ final class SwConfig extends ConfigInterface
if
(
key_exists
(
'merchant_no'
,
$config
)
&&
!
empty
(
$config
[
'merchant_no'
]))
{
if
(
key_exists
(
'merchant_no'
,
$config
)
&&
!
empty
(
$config
[
'merchant_no'
]))
{
$this
->
merchant_no
=
$config
[
'merchant_no'
];
$this
->
merchant_no
=
$config
[
'merchant_no'
];
}
else
{
}
else
{
throw
new
PayException
(
'必须提供
扫呗
商户号'
);
throw
new
PayException
(
'必须提供
SW
商户号'
);
}
}
if
(
key_exists
(
'terminal_id'
,
$config
)
&&
!
empty
(
$config
[
'terminal_id'
]))
{
if
(
key_exists
(
'terminal_id'
,
$config
)
&&
!
empty
(
$config
[
'terminal_id'
]))
{
$this
->
terminal_id
=
$config
[
'terminal_id'
];
$this
->
terminal_id
=
$config
[
'terminal_id'
];
}
else
{
}
else
{
throw
new
PayException
(
'必须提供
扫呗
终端号'
);
throw
new
PayException
(
'必须提供
SW
终端号'
);
}
}
...
...
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