切换导航条
此项目
正在载入...
登录
anyv
/
xkeasy
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
anyv
6 years ago
提交
9af30b89f459dc981c73f1b0adc5eced70c8c3a3
1 个父辈
cca514ef
1 个管道 的构建
通过
耗费 0 秒
支付
变更
2
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
12 行增加
和
4 行删除
app/portal/controller/PayController.php
public/themes/simpleboot3/portal/pay/index.html
app/portal/controller/PayController.php
查看文件 @
9af30b8
...
...
@@ -49,7 +49,7 @@ class PayController extends HomeBaseController
'body'
=>
'百荣科技'
,
'detail'
=>
'以客户为中心 以奋斗者文本'
,
'out_trade_no'
=>
$data
[
'order_number'
],
'total_fee'
=>
$data
[
'money'
]
*
100
,
// 单位:分
'total_fee'
=>
1
,
//
$data['money']*100, // 单位:分
'notify_url'
=>
url
(
'portal/pay/notify'
,
''
,
''
,
true
),
// 支付结果通知网址,如果不设置则会使用配置里的默认地址
'openid'
=>
$openid
,
// trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识,
];
...
...
@@ -62,6 +62,9 @@ class PayController extends HomeBaseController
if
(
$result
->
return_code
==
'SUCCESS'
&&
$result
->
result_code
==
'SUCCESS'
){
$prepayId
=
$result
->
prepay_id
;
$jsApiParameters
=
$payment
->
configForJSSDKPayment
(
$prepayId
);
$this
->
assign
(
'name'
,
'北京煊坤博文图书有限公司'
);
$this
->
assign
(
'price'
,
$data
[
'money'
]);
$this
->
assign
(
'order_number'
,
$data
[
'order_number'
]);
$this
->
assign
(
'jsApiParameters'
,
json_encode
(
$jsApiParameters
));
return
$this
->
fetch
();
}
else
{
...
...
public/themes/simpleboot3/portal/pay/index.html
查看文件 @
9af30b8
...
...
@@ -19,6 +19,7 @@
//支付取消逻辑
}
else
if
(
res
.
err_msg
==
'get_brand_wcpay_request:ok'
){
//支付成功逻辑
window
.
location
.
href
=
"{:url('index/index')}"
;
}
else
{
//支付失败逻辑
}
...
...
@@ -43,11 +44,15 @@
<body>
<div
class=
"wenx_xx"
>
<div
class=
"mz"
>
DEF0000000001
</div>
<div
class=
"wxzf_price"
>
¥0.01
</div>
<div
class=
"mz"
>
{$order_number}
</div>
<div
class=
"wxzf_price"
>
¥{$price}
</div>
</div>
<div
class=
"skf_xinf"
>
<div
class=
"all_w"
>
<span
class=
"bt"
>
收款方
</span>
<span
class=
"fr"
>
{$site_info.site_name}
</span>
</div>
<div
class=
"all_w"
>
<span
class=
"bt"
>
收款方
</span>
<span
class=
"fr"
>
{$name}
</span>
</div>
</div>
<a
onclick=
"callpay()"
class=
"ljzf_but all_w"
>
立即支付
</a>
<script
type=
"text/javascript"
>
...
...
请
注册
或
登录
后发表评论