Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
92f3f5d4
ShopXO
项目概览
starsw001
/
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,发现更多精彩内容 >>
提交
92f3f5d4
编写于
5月 25, 2019
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wx pay
上级
8bcf1841
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
5 deletion
+19
-5
application/admin/view/default/payment/save_info.html
application/admin/view/default/payment/save_info.html
+4
-4
extend/payment/Weixin.php
extend/payment/Weixin.php
+15
-1
未找到文件。
application/admin/view/default/payment/save_info.html
浏览文件 @
92f3f5d4
...
...
@@ -89,7 +89,7 @@
{{
if
isset
($
element
['
message
'])}}
data-validation-message=
"{{$element.message}}"
{{/
if
}}
{{
if
isset
($
element
['
placeholder
'])}}
data-placeholder=
"{{$element.placeholder}}"
{{
else
/}}
可选择...
{{/
if
}}
{{
if
!
empty
($
element
['
placeholder
'])}}
data-placeholder=
"{{$element.placeholder}}"
{{/
if
}}
{{
if
isset
($
element
['
is_multiple
'])
and
$
element
['
is_multiple
']
eq
1}}
multiple
...
...
@@ -100,9 +100,9 @@
{{
if
isset
($
element
['
is_required
'])
and
$
element
['
is_required
']
eq
1}}
required
{{/
if
}}
>
{{if !isset($element['is_multiple']) or $element['is_multiple'] neq 1}}
<option
value=
""
>
{{if isset($element['placeholder'])}}{{$element.placeholder}}{{else /}}可选择...{{/if}}
</option>
{{if !empty($element['placeholder'])}}
<option
value=
""
>
{{$element.placeholder}}
</option>
{{/if}}
{{/if}}
{{foreach $element.element_data as $element_data_key=>$element_data}}
<option
...
...
extend/payment/Weixin.php
浏览文件 @
92f3f5d4
...
...
@@ -100,6 +100,17 @@ class Weixin
'is_required'
=>
0
,
'message'
=>
'请填写密钥'
,
],
[
'element'
=>
'select'
,
'title'
=>
'异步通知协议'
,
'message'
=>
'请选择协议类型'
,
'name'
=>
'agreement'
,
'is_multiple'
=>
0
,
'element_data'
=>
[
[
'value'
=>
1
,
'name'
=>
'默认当前http协议'
],
[
'value'
=>
2
,
'name'
=>
'强制https转http协议'
],
],
],
];
return
[
...
...
@@ -313,13 +324,16 @@ class Weixin
// appid
$appid
=
(
APPLICATION
==
'app'
)
?
$this
->
config
[
'mini_appid'
]
:
$this
->
config
[
'appid'
];
// 异步地址处理
$notify_url
=
(
__MY_HTTP__
==
'https'
&&
isset
(
$this
->
config
[
'agreement'
])
&&
$this
->
config
[
'agreement'
]
==
1
)
?
'http'
.
mb_substr
(
$params
[
'notify_url'
],
5
,
null
,
'utf-8'
)
:
$params
[
'notify_url'
];
// 请求参数
$data
=
[
'appid'
=>
$appid
,
'mch_id'
=>
$this
->
config
[
'mch_id'
],
'body'
=>
$params
[
'site_name'
]
.
'-'
.
$params
[
'name'
],
'nonce_str'
=>
md5
(
time
()
.
rand
()
.
$params
[
'order_no'
]),
'notify_url'
=>
(
__MY_HTTP__
==
'https'
)
?
'http'
.
mb_substr
(
$params
[
'notify_url'
],
5
,
null
,
'utf-8'
)
:
$params
[
'notify_url'
]
,
'notify_url'
=>
$notify_url
,
'openid'
=>
(
$trade_type
==
'JSAPI'
)
?
$openid
:
''
,
'out_trade_no'
=>
$params
[
'order_no'
]
.
GetNumberCode
(
6
),
'spbill_create_ip'
=>
GetClientIP
(),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录