Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
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
chenchuanwen
my-yaf-project
Commits
103d36bd
Commit
103d36bd
authored
Jan 04, 2019
by
chenchuanwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp
parent
8f13c1fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
TencentPay.php
application/library/Payment/TencentPay.php
+5
-1
WxLitePay.php
application/library/Payment/WxLitePay.php
+0
-1
RefundReturn.php
application/models/DAO/Order/RefundReturn.php
+2
-2
No files found.
application/library/Payment/TencentPay.php
View file @
103d36bd
...
@@ -158,6 +158,7 @@ class TencentPay {
...
@@ -158,6 +158,7 @@ class TencentPay {
{
{
if
(
$signType
==
'MD5'
){
if
(
$signType
==
'MD5'
){
//echo '加签参数:'.json_encode($this->parameters)."\n";
//echo '加签参数:'.json_encode($this->parameters)."\n";
$this
->
parameters
[
"sign"
]
=
$this
->
getSign
(
$this
->
parameters
);
//签名
$this
->
parameters
[
"sign"
]
=
$this
->
getSign
(
$this
->
parameters
);
//签名
}
else
{
}
else
{
$this
->
parameters
[
"sign"
]
=
$this
->
getHMACSHA1Sign
(
$this
->
parameters
,
'sha256'
);
$this
->
parameters
[
"sign"
]
=
$this
->
getHMACSHA1Sign
(
$this
->
parameters
,
'sha256'
);
...
@@ -280,6 +281,9 @@ class TencentPay {
...
@@ -280,6 +281,9 @@ class TencentPay {
*/
*/
public
function
getSign
(
$Obj
)
public
function
getSign
(
$Obj
)
{
{
if
(
empty
(
$Obj
)){
var_dump
(
$this
->
parameters
);
exit
;
}
foreach
(
$Obj
as
$k
=>
$v
)
foreach
(
$Obj
as
$k
=>
$v
)
{
{
$Parameters
[
$k
]
=
$v
;
$Parameters
[
$k
]
=
$v
;
...
@@ -287,11 +291,11 @@ class TencentPay {
...
@@ -287,11 +291,11 @@ class TencentPay {
//签名步骤一:按字典序排序参数
//签名步骤一:按字典序排序参数
ksort
(
$Parameters
);
ksort
(
$Parameters
);
$String
=
$this
->
formatBizQueryParaMap
(
$Parameters
,
false
);
$String
=
$this
->
formatBizQueryParaMap
(
$Parameters
,
false
);
$String
=
$String
.
"&key="
.
$this
->
key
;
$String
=
$String
.
"&key="
.
$this
->
key
;
$String
=
str_replace
(
array
(
"
\r\n
"
,
"
\r
"
,
"
\n
"
,
" "
),
""
,
$String
);
$String
=
str_replace
(
array
(
"
\r\n
"
,
"
\r
"
,
"
\n
"
,
" "
),
""
,
$String
);
$String
=
md5
(
$String
);
$String
=
md5
(
$String
);
$result_
=
strtoupper
(
$String
);
$result_
=
strtoupper
(
$String
);
//echo "\r\n sign:"."$result_";
return
$result_
;
return
$result_
;
}
}
...
...
application/library/Payment/WxLitePay.php
View file @
103d36bd
...
@@ -91,7 +91,6 @@ class WxLitePay extends \Payment\TencentPay{
...
@@ -91,7 +91,6 @@ class WxLitePay extends \Payment\TencentPay{
$this
->
parameters
[
'out_trade_no'
]
=
$param
[
'outTradeNo'
];
$this
->
parameters
[
'out_trade_no'
]
=
$param
[
'outTradeNo'
];
$this
->
parameters
[
'out_refund_no'
]
=
$param
[
'refundOrderNo'
];
$this
->
parameters
[
'out_refund_no'
]
=
$param
[
'refundOrderNo'
];
$xml
=
$this
->
createXml
();
$xml
=
$this
->
createXml
();
$response
=
$this
->
postXmlSSLCurl
(
$xml
,
$this
->
refundUrl
,
6
);
$response
=
$this
->
postXmlSSLCurl
(
$xml
,
$this
->
refundUrl
,
6
);
$values
=
$this
->
xmlToArray
(
$response
);
$values
=
$this
->
xmlToArray
(
$response
);
...
...
application/models/DAO/Order/RefundReturn.php
View file @
103d36bd
...
@@ -466,8 +466,7 @@ class RefundReturnModel extends \DAO\AbstractModel
...
@@ -466,8 +466,7 @@ class RefundReturnModel extends \DAO\AbstractModel
*/
*/
public
function
refundMoney
(
$orderInfo
)
public
function
refundMoney
(
$orderInfo
)
{
{
echo
json_encode
(
$orderInfo
)
.
"
\r\n
"
;
return
false
;
$param
[
'refundOrderNo'
]
=
!
empty
(
$orderInfo
[
'refundOrderNo'
])
?
$orderInfo
[
'refundOrderNo'
]
:
$this
->
getRefundsn
(
$orderInfo
[
'storeId'
]);
$param
[
'refundOrderNo'
]
=
!
empty
(
$orderInfo
[
'refundOrderNo'
])
?
$orderInfo
[
'refundOrderNo'
]
:
$this
->
getRefundsn
(
$orderInfo
[
'storeId'
]);
//这个有可能多次退款的时候要变
//这个有可能多次退款的时候要变
$param
[
'outTradeNo'
]
=
$orderInfo
[
'paySn'
];
$param
[
'outTradeNo'
]
=
$orderInfo
[
'paySn'
];
...
@@ -513,6 +512,7 @@ class RefundReturnModel extends \DAO\AbstractModel
...
@@ -513,6 +512,7 @@ class RefundReturnModel extends \DAO\AbstractModel
$refund_return
=
$wxpay
->
refund
(
$param
);
$refund_return
=
$wxpay
->
refund
(
$param
);
$this
->
errorMessage
=
"微信返回:"
.
json_encode
(
$refund_return
)
.
"
\r\n
"
;
$this
->
errorMessage
=
"微信返回:"
.
json_encode
(
$refund_return
)
.
"
\r\n
"
;
echo
json_encode
(
$param
)
.
"
\r\n
"
;
echo
json_encode
(
$param
)
.
"
\r\n
"
;
return
false
;
if
(
!
(
$refund_return
[
'return_code'
]
==
'SUCCESS'
&&
$refund_return
[
'result_code'
]
==
'SUCCESS'
))
{
if
(
!
(
$refund_return
[
'return_code'
]
==
'SUCCESS'
&&
$refund_return
[
'result_code'
]
==
'SUCCESS'
))
{
if
(
$refund_return
[
'err_code_des'
]
==
'订单已全额退款'
||
$refund_return
[
'err_code_des'
]
==
'订单已Q68额退款'
){
if
(
$refund_return
[
'err_code_des'
]
==
'订单已全额退款'
||
$refund_return
[
'err_code_des'
]
==
'订单已Q68额退款'
){
$this
->
errorMessage
=
date
(
'Y-m-d'
)
.
$refund_return
[
'err_code_des'
]
.
$orderInfo
[
'orderId'
]
.
"
\r\n
"
;
$this
->
errorMessage
=
date
(
'Y-m-d'
)
.
$refund_return
[
'err_code_des'
]
.
$orderInfo
[
'orderId'
]
.
"
\r\n
"
;
...
...
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