当前位置:网站首页>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
边栏推荐
- 【mysql学习笔记27】存储过程
- 漏刻有时API接口实战开发系列(14):身份证实名鉴权验证
- 【mysql学习笔记26】视图
- 2022危险化学品经营单位主要负责人试题及模拟考试
- Li Kou daily question - day 31 -1790 Can a string exchange be performed only once to make two strings equal
- Apple账号密码自动填充
- MATLAB之基础知识
- 关系数据库如何工作
- Redisson uses the full solution - redisson official documents + comments (Part 2)
- [MySQL learning notes 25] SQL statement optimization
猜你喜欢

How relational databases work

IMDB practice of emotion classification (simplernn, LSTM, Gru)

Atguigu---- scaffold --02- use scaffold (2)

Custom events of components ②

How to use layui to display the data in the database in the form of tables

2022电工(中级)复训题库及答案

组件的自定义事件①

Apple account password auto fill

2022危险化学品经营单位主要负责人试题及模拟考试

她就是那个「别人家的HR」|ONES 人物
随机推荐
下载Xshell和Xftp
凸印的印刷原理及工艺介绍
Is it safe and reliable for Huatai Securities to open an account? How to open Huatai Securities Account
I bet on performance and won the CTO of the company. I want to build Devops platform!
Caesar
【技能】创建.bat快速打开网页
[kv260] generate chip temperature curve with xadc
base64
Eigen矩阵运算库快速上手
Cadence OrCAD capture "network name" is the same, but it is not connected or connected incorrectly. The usage of nodeName of liberation scheme
Sorting out tcp/udp communication problems
window c盘满了
QT -- 1. QT connection database
Custom events of components ①
[programming compulsory training 3] find the longest consecutive number string in the string + the number that appears more than half of the times in the array
[microservice openfeign] feign's log record
Cyclic neural network
2022 test questions and mock examinations for main principals of hazardous chemicals business units
web254
浅谈CVPR2022的几个研究热点