Skip to content

Commit

Permalink
修复内置商城无法微信支付的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamn committed May 9, 2020
1 parent 504ce95 commit add9c2d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
**普通更新,直接删除install目录直接覆盖安装即可,注意修改config.php的相关配置文件**

#### Ver. 2.4(2020.05.09)

1、[BUG]修复内置商城无法使用微信支付的问题

#### Ver. 2.3(2020.05.09)

1、[更新]修复因为文件写入权限问题导致二维码识别失败的情况
Expand All @@ -8,6 +12,7 @@
**重要更新**

1、[BUG]修复核心框架组件导致的客户端无法访问的问题

2、[BUG]修复添加应用失败的问题

#### Ver. 2.1(2020.05.04)
Expand Down
2 changes: 1 addition & 1 deletion install/config.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
define('APP_NAME','Vpay');
define('APP_VER','2.3');
define('APP_VER','2.4');
define('APP_UPDATE','2020.05.09');
define('APP_AUTHOR','Dreamn');
define('APP_TITLE','V免签安装向导');
Expand Down
2 changes: 1 addition & 1 deletion protected/controller/admin/BaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class BaseController extends Controller
{
public $layout = "layout";
public $version='2.3';
public $version='2.4';

function init()
{
Expand Down
3 changes: 2 additions & 1 deletion protected/controller/index/BuyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public function actionCreate(){

$payId=$vpay->getPayId($price,$param);

$type=intval(arg('type'))===1?1:2;

$type=intval(arg('type'));

$html=1;//是否使用自带的支付页面,为0表示不使用自带的支付页面

Expand Down
2 changes: 0 additions & 2 deletions protected/model/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ public function createOrder($arg)
$timeout=intval($time)*60+$createDate;
//获得真实的支付金额
if (!$this->getPayMoney($arg["price"], $arg["type"],$timeout))return false;
//对参数进行解码,进行url编码防止传输过程中中断
$json=json_decode(urldecode($arg["param"]));

//取得支付二维码
if (!$this->getPayPic())return false;
Expand Down
4 changes: 2 additions & 2 deletions protected/view/index/buy_return.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ <h2>优雅的个人自动化收款解决方案</h2>
form = layui.form;
form.on('submit(alipay)',function () {
var arr=form.val('Tsetform');
arr.type=1;
arr.type=2;
post('<{url c="buy" a="create"}>',arr);
return false;
});
form.on('submit(wechat)',function () {
var arr=form.val('Tsetform');
arr.type=2;
arr.type=1;
post('<{url c="buy" a="create"}>',arr);
return false;
});
Expand Down
6 changes: 3 additions & 3 deletions protected/view/index/shop_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h2>优雅的个人自动化收款解决方案</h2>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
<legend>支付测试</legend>
</fieldset>
<form class="layui-form layui-form-pane" style="max-width: 500px;margin: 0 auto" lay-filter="Tsetform">
<form class="layui-form layui-form-pane" style="max-width: 500px;margin: 0 auto" lay-filter="Testform">
<div class="layui-form-item">
<label class="layui-form-label">商品选择</label>
<div class="layui-input-block">
Expand Down Expand Up @@ -85,13 +85,13 @@ <h2>优雅的个人自动化收款解决方案</h2>
element = layui.element,
form = layui.form;
form.on('submit(alipay)',function () {
var arr=form.val('Tsetform');
var arr=form.val('Testform');
arr.type=1;
post('<{url c="buy" a="create"}>',arr);
return false;
});
form.on('submit(wechat)',function () {
var arr=form.val('Tsetform');
var arr=form.val('Testform');
arr.type=2;
post('<{url c="buy" a="create"}>',arr);
return false;
Expand Down

0 comments on commit add9c2d

Please sign in to comment.