当前位置:网站首页>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编码
边栏推荐
猜你喜欢

URL URL

如何计算地球上两点的距离(附公式推导)

微信小程序自定义swiper轮播图面板指示点|小圆点|进度条

Advanced gradient of skeleton effect, suitable for waiting for pictures

npm--package.json---require

js __proto__、prototype、constructor的关系

npm --package.json---require

Deveco studio Hongmeng app access network detailed process (js)

Phospholipid-polyethylene glycol-targeted neovascularization targeting peptide APRPG, DSPE-PEG-APRPG

DOM操作---放大镜案例
随机推荐
Living to detect the Adaptive Normalized Representation Learning for GeneralizableFace Anti - Spoofing reading notes
【 application 】 life many years of operations, what turned scored 12 k + annual bonus salary?
正则笔记(2)- 正则表达式位置匹配攻略
我的小笔记 =》其他东东
js __proto__、prototype、constructor的关系
每日五道面试题总结 22/7/26
【手把手带你学nRF52832/nRF52840 · (1)开发环境搭建】
js 正则中 replace() 使用
v-on基本使用、参数传递、修饰词
IO流、 编码表、 字符流、 字符缓冲流
vue3 访问数据库中的数据
3 minutes to take you to understand WeChat applet development
解决5+APP真机测试无法访问后台(同局域网)
SQL:DDL、DML、DQL、DCL相应介绍以及演示
微信小程序自定义swiper轮播图面板指示点|小圆点|进度条
js预编译 GO 和AO
由中序遍历和前序遍历得到后序遍历(树的遍历)
require模块化语法
[Mianjing] Mihayou data development on one side and two sides
uniapp | 官方提供的map组件使用问题