Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
81ae802d
ShopXO
项目概览
jamesyang1999
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
81ae802d
编写于
5月 29, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wx pay debug
上级
3ec19cfc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
5 deletion
+16
-5
extend/payment/Weixin.php
extend/payment/Weixin.php
+16
-5
未找到文件。
extend/payment/Weixin.php
浏览文件 @
81ae802d
...
@@ -180,7 +180,7 @@ class Weixin
...
@@ -180,7 +180,7 @@ class Weixin
{
{
return
$this
->
PayHandleReturn
(
$ret
[
'data'
],
$result
,
$params
);
return
$this
->
PayHandleReturn
(
$ret
[
'data'
],
$result
,
$params
);
}
}
$msg
=
empty
(
$result
[
'return_msg'
])
?
'支付异常'
:
$result
[
'return_msg'
]
;
$msg
=
is_string
(
$result
)
?
$result
:
(
empty
(
$result
[
'return_msg'
])
?
'退款异常'
:
$result
[
'return_msg'
])
;
if
(
!
empty
(
$result
[
'err_code_des'
]))
if
(
!
empty
(
$result
[
'err_code_des'
]))
{
{
$msg
.
=
'-'
.
$result
[
'err_code_des'
];
$msg
.
=
'-'
.
$result
[
'err_code_des'
];
...
@@ -522,7 +522,7 @@ class Weixin
...
@@ -522,7 +522,7 @@ class Weixin
];
];
return
DataReturn
(
'退款成功'
,
0
,
$data
);
return
DataReturn
(
'退款成功'
,
0
,
$data
);
}
}
$msg
=
empty
(
$result
[
'return_msg'
])
?
'退款异常'
:
$result
[
'return_msg'
]
;
$msg
=
is_string
(
$result
)
?
$result
:
(
empty
(
$result
[
'return_msg'
])
?
'退款异常'
:
$result
[
'return_msg'
])
;
if
(
!
empty
(
$result
[
'err_code_des'
]))
if
(
!
empty
(
$result
[
'err_code_des'
]))
{
{
$msg
.
=
'-'
.
$result
[
'err_code_des'
];
$msg
.
=
'-'
.
$result
[
'err_code_des'
];
...
@@ -584,7 +584,10 @@ class Weixin
...
@@ -584,7 +584,10 @@ class Weixin
*/
*/
private
function
XmlToArray
(
$xml
)
private
function
XmlToArray
(
$xml
)
{
{
if
(
!
$this
->
XmlParser
(
$xml
))
return
''
;
if
(
!
$this
->
XmlParser
(
$xml
))
{
return
is_string
(
$xml
)
?
$xml
:
'接口返回数据有误'
;
}
return
json_decode
(
json_encode
(
simplexml_load_string
(
$xml
,
'SimpleXMLElement'
,
LIBXML_NOCDATA
)),
true
);
return
json_decode
(
json_encode
(
simplexml_load_string
(
$xml
,
'SimpleXMLElement'
,
LIBXML_NOCDATA
)),
true
);
}
}
...
@@ -656,8 +659,16 @@ class Weixin
...
@@ -656,8 +659,16 @@ class Weixin
$ch
=
curl_init
(
$url
);
$ch
=
curl_init
(
$url
);
curl_setopt_array
(
$ch
,
$options
);
curl_setopt_array
(
$ch
,
$options
);
$result
=
curl_exec
(
$ch
);
$result
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
//返回结果
return
$result
;
if
(
$result
)
{
curl_close
(
$ch
);
return
$result
;
}
else
{
$error
=
curl_errno
(
$ch
);
curl_close
(
$ch
);
return
"curl出错,错误码:
$error
"
;
}
}
}
}
}
?>
?>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录