巴格卡码支付系统安装教程

巴格卡码支付系统安装教程

正题

1.安装宝塔

此处不过多介绍,详情参考

https://bt.cn

QQ20260411-175247.png

2.添加网站

添加网站,数据库选择mysql,php版本选择8.1,php版本错误可能导致系统崩溃!

QQ20260411-175558.png

3.开启ssl,选择伪静态

ssl的开启不过多介绍

伪静态需要选择thinkphp,否则全部后端接口将无法调用!

QQ20260411-180125.png

3.上传网站文件

进入网站文件页面,删除默认创建的文件,上传qq群内的最新版安装包并解压

3.1权限

解压时权限一定要给777!!!!!!!!

QQ20260411-183542.png

完成!

4.安装sg加密拓展,检查函数禁用情况

4.1 在群文件下载加密函数!

QQ20260411-183842.png

在宝塔文件管理进入:

/www/server/php/81/lib/php/extensions目录

QQ20260411-184119.png

💡进入下一级目录,每个人的目录名称不一样,正如图片中以no-开头的文件

将刚刚下载的加密函数文件放在以no-开头的文件中

QQ20260411-184702.png

进入宝塔-软件管理,找到php81的设置页面,进入-配置文件,滑到最下面,在文件末尾加入以下内容:

点击复制

extension=ixed.8.1.lin
QQ20260411-185144.png

返回-服务页面,选择重启

QQ20260411-185238.png

最后返回禁用函数,查看是否禁用go函数,如果已经被禁用删除即可

QQ20260411-185407.png

完成!

5.进入网站配置定时任务!

进入网站会自动进入安装页面,在这个页面输入您的授权码,进行安装,安装时还需配置数据库信息和管理员账户信息真实填写即可!

QQ20260411-190239.png

配置完成后进入后台管理控制台-定时任务管理-配置说明

复制系统给出的执行代码!

QQ20260411-190926.png

回到宝塔,进入宝塔-计划任务-添加任务

计划类型选择shell脚本,时间选择15秒,(时间越短回调越快,但是速度太快等于cc自己)

QQ20260411-191548.png

配置完成点击执行,如果能显示下方内容说明配置完成

QQ20260411-192702.png

完整安装!!!

系统使用教程

1.系统配置

由于本系统自由度较高,1.0.0版本需要手动配置支付模板和支付通道方可使用,后续版本将统一配置

1.1支付模板配置

1.1.1.进入怎么模板管理页面
1.1.2 编辑或删除默认模板

QQ20260411-200409.png

我们为您提供了一个完整的可用的实例

HTML部分:

    <div class="pay-header">
        <h1>{{ typeName }}支付</h1>
                    <div class="pay-amount">¥{{ order.truemoney }}</div>
    </div>
    
    <div class="pay-content">
        <div class="order-info">
            <div class="order-info-item">
                <span class="order-info-label">商品名称</span>
                <span class="order-info-value">{{ order.name }}</span>
            </div>
            <div class="order-info-item">
                <span class="order-info-label">订单号</span>
                <span class="order-info-value">{{ order.trade_no }}</span>
            </div>
            <div class="order-info-item">
                <span class="order-info-label">商户订单号</span>
                <span class="order-info-value">{{ order.out_trade_no }}</span>
            </div>
        </div>
        
        <div class="qrcode-container" v-if="!orderPaid">
            <div v-if="qrcodeUrl">
                <img :src="qrcodeUrl" class="qrcode-img" alt="支付二维码" />
            </div>
            <div v-else>
                <el-alert title="未配置二维码" type="warning" :closable="false" />
            </div>
            
            <div class="countdown">
                支付剩余时间0000000:<span class="time">{{ countdown }}</span>
            </div>
        </div>
        
        <div v-else>
            <el-result icon="success" title="支付成功">
                <template #sub-title>
                    订单已支付成功!
                </template>
                <template #extra>
                    <el-button type="primary" @click="redirectToReturn">返回商户</el-button>
                </template>
            </el-result>
        </div>
        
        <div class="tips" v-if="!orderPaid">
            <p>1. 请使用{{ typeName }}扫描上方二维码完成支付</p>
            <p>2. 支付成功后会自动跳转到商户页面</p>
            <p>3. 如遇问题请联系商户客服</p>
        </div>
        
        <el-button type="primary" class="paid-btn" @click="checkStatus" v-if="!orderPaid">
            我已支付
        </el-button>
    </div>
</div>

css部分:

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa; 
    margin: 0;
    padding: 30px 15px;
    min-height: 100vh;
    box-sizing: border-box;
}

.pay-container {
    max-width: 520px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.pay-header {
    background-color: #409eff; 
    color: #ffffff;
    padding: 35px 20px;
    text-align: center;
}

.pay-header h1 {
    margin: 0 0 12px 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
}

.pay-amount {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
}


.pay-content {
    padding: 35px 30px;
}

.order-info {
    margin-bottom: 30px;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 24px;
    background-color: #fafafa;
}

.order-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px dashed #e4e7ed;
}

.order-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.order-info-label {
    font-weight: 500;
    color: #606266; 
    font-size: 15px;
}

.order-info-value {
    color: #303133; 
    font-weight: 500;
    font-size: 15px;
    max-width: 60%;
    word-break: break-all;
}


.qrcode-container {
    text-align: center;
    margin-bottom: 30px;
}

.qrcode-img {
    width: 220px;
    height: 220px;
    margin: 0 auto 24px auto;
    display: block;
    border: 2px solid #e4e7ed;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    transition: transform 0.2s ease;
}

.qrcode-img:hover {
    transform: scale(1.02);
}


.countdown {
    font-size: 16px;
    color: #606266;
    margin-top: 10px;
}

.countdown .time {
    color: #f56c6c; 
    font-weight: 600;
    font-size: 18px;
}


.tips {
    margin-bottom: 30px;
    padding: 20px 24px;
    background-color: #ecf5ff; 
    border-left: 4px solid #409eff;
    border-radius: 4px;
    color: #606266;
    line-height: 1.6;
}

.tips p {
    margin: 8px 0;
    font-size: 14px;
}


.paid-btn {
    width: 100%;
    height: 50px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
}


.el-alert {
    margin-bottom: 20px;
}

vue组件(当前版本不生效)

    "data": function() {
        return {
            customMessage: "当前版本vue组件不生效"
        };
    },
    "methods": {
        customCheckStatus() {
            this.$message.info("不生效");
            this.checkStatus();
        }
    }
}

2.支付通道配置

进入支付通道配置页面

配置如下

QQ20260411-201511.png

自挂的通道标识:微信自挂:wxpay-zg,支付宝自挂alipay-zg,qq自挂:qqpay-zg

© 版权声明
THE END
喜欢就支持一下吧
点赞1.4W+ 分享