当前位置:网站首页>php laravel微信支付
php laravel微信支付
2022-07-01 07:55:00 【唉,取個名字真難】
安裝包
composer require overtrue/laravel-wechat
配置
php artisan vendor:publish --provider="Overtrue\LaravelWeChat\ServiceProvider"
使用(注意微擎版本最新v6)
//app('easywechat.pay') 或者 EasyWeChat::pay()
use Overtrue\LaravelWeChat\EasyWeChat;
//例如支付
$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)
- 基於: 微擎SDK
边栏推荐
- Li Kou daily question - day 31 -1790 Can a string exchange be performed only once to make two strings equal
- AUTOSAR learning record (1) – ECUM_ Init
- Lm08 mesh series mesh inversion (fine)
- 凸印的印刷原理及工艺介绍
- Caesar
- How do the top ten securities firms open accounts? In addition, is it safe to open a mobile account?
- 【mysql学习笔记27】存储过程
- 2022 test questions and mock examinations for main principals of hazardous chemicals business units
- Basic knowledge of MATLAB
- Eigen矩阵运算库快速上手
猜你喜欢

Minecraft 1.16.5 module development (51) tile entity

window c盘满了

How to check ad user information?

Gui Gui programming (XV) - use scale to control font size changes
![[programming training] delete public characters (hash mapping) + team competition (greedy)](/img/cd/63eb9da1e8956df0763797f079b67f.png)
[programming training] delete public characters (hash mapping) + team competition (greedy)

Apple账号密码自动填充

STM32 uses esp01s to go to the cloud, mqtt FX debugging

Significance and measures of source code encryption

良心安利万向轮 SolidWorks模型素材网站

PWN攻防世界int_overflow
随机推荐
Redisson uses the full solution - redisson official document + comments (Part 2)
Two expressions of string
weback5基础配置详解
kubernetes资源对象介绍及常用命令(二)
Minecraft 1.16.5 module development (51) tile entity
【批处理DOS-CMD-汇总】扩展变量-延迟变量cmd /v:on、cmd /v:off、setlocal enabledelayedexpansion、DisableDelayedExpansion
【R语言】年龄性别频数匹配 挑选样本 病例对照研究,对年龄性别进行频数匹配
Download xshell and xftp
Eigen matrix operation Library
TodoList经典案例①
SharePoint - how to quickly check whether SharePoint is standard or enterprise edition?
Access报表实现小计功能
组件的自定义事件②
038 network security JS
关系数据库如何工作
2022 tea master (intermediate) recurrent training question bank and answers
【mysql学习笔记28】存储函数
2022年茶艺师(中级)复训题库及答案
vscode 根据 ESLint 规范自动格式化代码
Implementation and encapsulation of go universal dynamic retry mechanism