当前位置:网站首页>PHP 发起支付宝支付时 订单信息乱码解决
PHP 发起支付宝支付时 订单信息乱码解决
2022-08-02 03:24:00 【auspi12341】
$encode = mb_detect_encoding($body, array("ASCII",'UTF-8',"GB2312","GBK",'BIG5'));
$result = $pay->apply([
'out_trade_no' => $order_num, // 商户订单号
'total_amount' => $money, // 支付金额
'subject' =>urlencode(mb_convert_encoding($body, 'GB2312', $encode ))// 支付订单描述
]);
直接上代码,订单信息需要转换为GB2312的编码,然后进行urlencode编码
边栏推荐
猜你喜欢
js basics
js __proto__、prototype、constructor的关系
利用 nucleo stm32 f767zi 进行USART+DMA+PWM输入模式 CUBE配置
C语言的变长数组
Living to detect the Adaptive Normalized Representation Learning for GeneralizableFace Anti - Spoofing reading notes
SQL分类、DQL(数据查询语言)、以及相应SQL查询语句演示
Scientific research reagent DMPE-PEG-Mal dimyristoylphosphatidylethanolamine-polyethylene glycol-maleimide
js 原型和原型链
微信小程序自定义swiper轮播图面板指示点|小圆点|进度条
第一篇博客
随机推荐
微信小程序开发视频加载:[渲染层网络层错误] Failed to load media
npm --package.json---require
URL module
6.27面试集
4.14到新公司的一天
Deveco studio Hongmeng app access network detailed process (js)
面试总结 22/7/22 面试中的重点
docker中配置mysql 5.7
小程序 van-cell 换行能左对齐问题
C语言 内联函数
IO流、字节流、字节缓冲流
微信小程序云开发之模糊搜索
多线程(实现多线程、线程同步、生产者消费者)
暴力方法求解(leetcode14)查找字符串数组中的最大公共前缀
--fs模块--
【 application 】 life many years of operations, what turned scored 12 k + annual bonus salary?
js takes the value of a feature at a certain position in the string, such as Huawei=> Huawei
1.6一些今日学习
6.24今日学习
阿里云服务器如何使用admin账户登录