当前位置:网站首页>When PHP initiates Alipay payment, the order information is garbled and solved
When PHP initiates Alipay payment, the order information is garbled and solved
2022-08-02 03:52:00 【auspi12341】
$encode = mb_detect_encoding($body, array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'));$result = $pay->apply(['out_trade_no' => $order_num, // Merchant order number'total_amount' => $money, // payment amount'subject' =>urlencode(mb_convert_encoding($body, 'GB2312', $encode ))// payment order description]);On the code directly, the order information needs to be converted to GB2312 encoding, and then urlencode encoding
边栏推荐
猜你喜欢
随机推荐
简单黑马头条项目
L1-043 阅览室 (20分)
Dom实现input的焦点触发
vue3 访问数据库中的数据
多线程(实现多线程、线程同步、生产者消费者)
[league/climate]一个功能健全的命令行功能操作库
网址URL
IO流、 编码表、 字符流、 字符缓冲流
IP门禁:手把手教你用PHP实现一个IP防火墙
PHP的几个有趣的打开方式:从基本到变态
DOM manipulation---magnifying glass case
解决5+APP真机测试无法访问后台(同局域网)
uniapp | 使用npm update更新后编译报错问题
C语言中关于2的n次方求值问题(移位运算)
1.13 学习JS
__dirname
---静态页面---
Small program van-cell line wrapping can be left-aligned
微信小程序云开发-证件照的实现
STM32 map文件解析


![微信小程序开发视频加载:[渲染层网络层错误] Failed to load media](/img/24/e12a1312aee28a43428b2ae0bfbe00.png)






