Top Menu

升级到PHP7.4导致的支付宝回调失败

环境

  • laravel
  • Omnipay\Omnipay
  • lokielse/omnipay-alipay

今天把系统php版本升级至7.4后,有用户反馈充值后未到账,遂进行了漫长的debug。

首先看了系统日志,发现一个定时审计订单状态的任务一直出错,研究了很久,发现是一个很久之前用的有赞云的接口,其实这个定时任务已经没有用了,因为后来改为支付宝后,订单状态都是主动推送的,遂停用之。。。

之后又去看了一便订单支付,也没什么问题,本来想算了干脆改成yansongda/pay好了,但是似乎依赖有冲突,一直装不上,遂放弃。。。

后来想了想,又去日志里搜了搜订单状态推送的关键词,发现了问题所在

[2021-01-26 19:48:24] local.ERROR: ErrorException: Function get_magic_quotes_gpc() is deprecated in /var/www/vendor/riverslei/payment/src/Utils/ArrayUtil.php:108 Stack trace: #0 /var/www/vendor/riverslei/payment/src/Utils/ArrayUtil.php(108): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 /var/www/vendor/riverslei/payment/src/Common/BaseData.php(113): Payment\Utils\ArrayUtil::createLinkstring() #2 /var/www/vendor/riverslei/payment/src/Common/Ali/AliBaseStrategy.php(70): Payment\Common\BaseData->setSign() #3 /var/www/vendor/riverslei/payment/src/QueryContext.php(99): Payment\Common\Ali\AliBaseStrategy->handle()

Continue Reading 0

在Debian中使用composer全局程序

编辑文件

nano /etc/profile

$HOME/.config/composer/vendor/bin 添加至PATH中

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "`id -u`" -eq 0 ]; then PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$HOME/.config/composer/vendor/bin" else PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" fi export PATH

运行Laravel

composer global require laravel/installer laravel new example-app php artisan serve

Continue Reading 0

Powered by WordPress. Designed by WooThemes