打造一款属于自己的发卡站/小卖铺。
发卡系统
环境配置:
web服务器:
1 | sudo apt install nginx |
数据库依赖:
1 | sudo apt install mariadb-server redis-server |
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-debian-10
php依赖:
1 | sudo apt install php-cli php-redis |
fileinfo检查:https://my.oschina.net/HeAlvin/blog/3075963
opcache扩展:https://learnku.com/articles/18782
composer安装:https://www.runoob.com/w3cnote/composer-install-and-usage.html
下载发卡源码
注意点:
- 更改网站拥有者为www-data
- 要自己先创建好数据库再配置
.env
支付宝当面付对接
申请当面付
https://openhome.alipay.com/platform/appManage.htm
自研开发
网页&移动应用(会有一个默认的应用2.0)
默认的应用2.0中添加公钥(接口加签)(验证手机号,下载工具,生成密钥对)
在发卡支付网关管理界面,填入
商户id:appid
商户key:支付宝公钥(注意不是自己生成的公钥)
商户密钥:自己生成的密钥
添加进程守护
https://learnku.com/laravel/t/3592/using-supervisor-to-manage-laravel-queue-processes
1 | [program:laravel-worker] |
1 | mkdir -p /var/log/supervisor/ |
1 | # zsh报错的话,请写成bash脚本 |
1 | # 重启服务 |
常见错误: