当前位置:网站首页>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
边栏推荐
- PWN attack and defense world int_ overflow
- Download xshell and xftp
- [programming training] delete public characters (hash mapping) + team competition (greedy)
- 如何让两融交易更极速
- QT -- 1. QT connection database
- 组件的自定义事件②
- SharePoint - how to quickly check whether SharePoint is standard or enterprise edition?
- 十大劵商如何开户?另外,手机开户安全么?
- Rk3399 platform development series explanation (network debugging) 7.30. What will affect the sending process of TCP packets?
- Kickback -- find the first palindrome character in a group of characters
猜你喜欢

Redisson uses the full solution - redisson official document + comments (Part 2)

2022 mobile crane driver test exercises and online simulation test

Apple account password auto fill

LSTM of RNN

Redisson uses the complete solution - redisson official documents + Notes (Part 1)

H5 页面设置了字体的粗细样式,但是在华为手机里微信打开访问样式不生效?

Array: question brushing record

Custom events of components ①

2022年茶艺师(中级)复训题库及答案

组件的自定义事件①
随机推荐
go通用动态重试机制解决方案的实现与封装
【批处理DOS-CMD-汇总】扩展变量-延迟变量cmd /v:on、cmd /v:off、setlocal enabledelayedexpansion、DisableDelayedExpansion
Access报表实现小计功能
【批处理DOS-CMD命令-汇总和小结】-Cmd窗口中常用操作符(<、<<、&<、>、>>、&>、&、&&、||、|、()、;、@)
论文学习——水文时间序列相似性查询的分析与研究
力扣每日一题-第31天-1790.仅执行一次字符串交换能否使两个字符串相等
如何让两融交易更极速
Minecraft 1.16.5模组开发(五十一) 方块实体 (Tile Entity)
Redisson uses the full solution - redisson official documents + comments (Part 2)
力扣每日一题-第31天-202.快乐数
Basic knowledge of MATLAB
SharePoint - modify web application authentication using PowerShell
How to make the two financial transactions faster
The triode is a great invention
【mysql学习笔记27】存储过程
【技能】创建.bat快速打开网页
weback5基础配置详解
2022 test question bank and simulation test of tea master (primary) operation certificate
How to get a SharePoint online site created using the office365 group template
IMDB practice of emotion classification (simplernn, LSTM, Gru)