当前位置:网站首页>PHP laravel wechat payment
PHP laravel wechat payment
2022-07-01 07:56:00 【Alas, it's hard to choose a name】
Installation package
composer require overtrue/laravel-wechat
To configure
php artisan vendor:publish --provider="Overtrue\LaravelWeChat\ServiceProvider"
Use ( Pay attention to the latest version of micro engine v6)
//app('easywechat.pay') perhaps EasyWeChat::pay()
use Overtrue\LaravelWeChat\EasyWeChat;
// For example, payment
$app = EasyWeChat::pay();
$config = $app->getConfig();
$data = [
'mchid' => $config['mch_id'],
'out_trade_no' => date('YmdHis'),
'appid' => $config['app_id'],
'description' => $remark,
'notify_url' => '',
'amount' => [
'total' => 1,
'currency' => 'CNY',
]
];
$app->getClient()->post('v3/pay/transactions/native, ['json' => $data])->toArray(false)
- be based on : Micro driver SDK
边栏推荐
- Sqlalchemy creating MySQL_ Table
- Download xshell and xftp
- 【mysql学习笔记25】sql语句优化
- Rk3399 platform development series explanation (network debugging) 7.30. What will affect the sending process of TCP packets?
- Li Kou daily question - day 31 -202 Happy number
- Lm08 mesh series mesh inversion (fine)
- Caesar
- Aardio - 自己构造的getIconHandle的方法
- 良心安利万向轮 SolidWorks模型素材网站
- MATLAB之基础知识
猜你喜欢

2022 operation of refrigeration and air conditioning equipment operation of national question bank simulated examination platform

Day5: scanner object, next() and nextline(), sequential structure, selection structure, circular structure

三极管是一项伟大的发明

Todolist classic case ①
![[MySQL learning notes 25] SQL statement optimization](/img/01/cf0556961670bb43512caab8d5f4e5.png)
[MySQL learning notes 25] SQL statement optimization

base64

组件的自定义事件①

关系数据库如何工作

华为ModelArts训练Alexnet模型

Aardio - 阴影渐变文字
随机推荐
软件测试方法和技术 - 基础知识概括
【mysql学习笔记28】存储函数
漏刻有时API接口实战开发系列(14):身份证实名鉴权验证
Autosar 学习记录(1) – EcuM_Init
Access报表实现小计功能
Scala语言学习-07-构造器
Download xshell and xftp
【批处理DOS-CMD命令-汇总和小结】-Cmd窗口中常用操作符(<、<<、&<、>、>>、&>、&、&&、||、|、()、;、@)
[MySQL learning notes 26] view
奥迪AUDI EDI 项目中供应商需要了解哪些信息?
Introduction to kubernetes resource objects and common commands (II)
Android screen adaptation (using constraintlayout), kotlin array sorting
038 network security JS
源代码加密的意义和措施
How to check ad user information?
redisson使用全解——redisson官方文档+注释(下篇)
TodoList经典案例①
Teach you how to apply for domestic trademark online step by step
Kickback -- find the first palindrome character in a group of characters
[chapter 72 of the flutter problem series] a solution to the problem that pictures taken in the flutter using the camera plug-in are stretched