当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
多线程(实现多线程、线程同步、生产者消费者)
canvas--pie chart
The querystring module
PHP基金会三月新闻公告发布
解决5+APP真机测试无法访问后台(同局域网)
微信小程序云开发-证件照的实现
微信小程序怎么批量生成带参数的小程序码?
微信小程序全局组件的定义
meime module
三月底啦啦
微信小程序实现文本安全监测
一分种一起来了解Vite的基础
1.13 学习JS
js eventLoop 事件循环机制
每日五道面试题总结 22/7/21
Questions about your resume
阿里云服务器如何使用admin账户登录
SQL分类、DQL(数据查询语言)、以及相应SQL查询语句演示
PHP8.2的版本发布管理员和发布计划
js基础知识









