mirror of
https://gitee.com/technical-laohu/mpay.git
synced 2025-09-17 17:26:40 +08:00
修复一些小问题
This commit is contained in:
parent
cd38b4cc04
commit
4b5e8bb763
@ -21,9 +21,7 @@ class IndexController
|
||||
}
|
||||
public function test()
|
||||
{
|
||||
$pay = new \payclient\PayClass(['username'=>1531,'password'=>15646]);
|
||||
|
||||
|
||||
return '123';
|
||||
$web = \request()->domain();
|
||||
return $web;
|
||||
}
|
||||
}
|
||||
|
@ -195,11 +195,11 @@ class PayController
|
||||
foreach ($new_orders as $new_order) {
|
||||
foreach ($activeOrders as $order) {
|
||||
// 支付方式核对
|
||||
$is_payway = $order->type === $new_order['payway'];
|
||||
$is_payway = $order->type == $new_order['payway'];
|
||||
// 支付渠道核对
|
||||
$is_channel = $cids[$order->cid] === $new_order['channel'];
|
||||
$is_channel = $cids[$order->cid] == $new_order['channel'];
|
||||
// 金额核对
|
||||
$is_money = $order->money === $new_order['price'];
|
||||
$is_money = $order->money == $new_order['price'];
|
||||
// 订单核对
|
||||
if ($is_payway && $is_channel && $is_money) {
|
||||
$res = $this->updateOrderState($order, $new_order['order_no']);
|
||||
|
@ -13,6 +13,8 @@ class PayManageController extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$domain = $this->request->domain();
|
||||
View::assign('domain', $domain);
|
||||
return View::fetch();
|
||||
}
|
||||
// 编辑账号
|
||||
|
@ -5,8 +5,6 @@ declare(strict_types=1);
|
||||
namespace app\controller\api;
|
||||
|
||||
use app\BaseController;
|
||||
use app\model\Platform;
|
||||
use think\facade\View;
|
||||
|
||||
class PluginController extends BaseController
|
||||
{
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
class MpayClass
|
||||
{
|
||||
private $pid;
|
||||
|
@ -1,3 +1,14 @@
|
||||
<?php
|
||||
|
||||
echo '测试用例';
|
||||
function encrypt($string, $key) {
|
||||
$method = "AES-256-CBC";
|
||||
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($method));
|
||||
$encrypted = openssl_encrypt($string, $method, $key, 0, $iv);
|
||||
// 将iv和加密字符串拼接起来
|
||||
return base64_encode($iv . $encrypted);
|
||||
}
|
||||
|
||||
$key = "your-encryption-key"; // 这里应该是一个安全的密钥
|
||||
$string = "Hello, World!";
|
||||
$encryptedString = encrypt($string, $key);
|
||||
|
||||
echo $encryptedString; // 输出加密字符串
|
@ -110,7 +110,7 @@
|
||||
{ title: '密 码', field: 'password', align: 'center' },
|
||||
{ title: '启用状态', field: 'state', align: 'center', templet: '#account-state' },
|
||||
{ title: '监听模式', field: 'pattern', align: 'center' },
|
||||
{ title: '监听地址', field: 'payurl', align: 'center', templet: `<div>{{# return window.location.origin + '/checkPayResult?pid='+d.pid+'&aid='+d.id }}</div>` },
|
||||
{ title: '监听地址', field: 'payurl', align: 'center', templet: `<div>{{# return '<?php echo $domain ?>/checkPayResult?pid='+d.pid+'&aid='+d.id }}</div>` },
|
||||
{ title: '终端数量', field: 'channel', align: 'center', templet: '<div><a href="javascript:;" lay-event="channelList"><span class="layui-badge layui-bg-green">{{= d.channel }}</span></a></div>' },
|
||||
{ title: '操作', align: 'center', fixed: 'right', templet: '<div><a href="javascript:;" class="layui-font-green" lay-event="edit"><strong>编辑</strong></a></div>' }
|
||||
]]
|
||||
|
Loading…
Reference in New Issue
Block a user