当前位置:网站首页>Laravel pay payment access process
Laravel pay payment access process
2022-06-26 04:21:00 【Scholar and】
Related extensions :
Payment extension : Use laravel-pay(php7 Above version )
Document address :laravel-pay
Generating QR code extensions :simple-qrcode
technological process :
1: Apply for Alipay , Wechat payment function has been appid And public key , Private key
2:composer download laravel-pay Pay for expansion packs
php -d memory_limit=-1 `which composer` require yansongda/pay -vvv
notes : because php There's a memory limit , It will affect composer download , So the above is to remove the memory limit , At the same time, download the payment extension ( My local environment has been modified php Invalid configuration , So in this way )
3:composer download simplesoftwareio/simple-qrcode QR code expansion package
php -d memory_limit=-1 `which composer` require simplesoftwareio/simple-qrcode 1.3.0
notes : Because the payment expansion package , Only QR code content will be generated ( Computer scanning code for payment ), The QR code image will not be returned directly , So you need to download the expansion package for generating QR code images
4: Configure payment related information
5: Generate QR code content with payment code order , Use the QR code extension package to generate QR code for content and return to , Then, the payment callback is processed asynchronously and synchronously
Alipay scan code payment , example :
public function index()
{
// Order information
$order = [
'out_trade_no' => time(),
'total_amount' => '1',
'subject' => 'test subject - test ',
];
// Generate QR code content
$result = Pay::alipay($this->config)->scan($order);
// Generate a QR code picture from the content by extension
$generator = new Generator;
$img = $generator->format('svg')
->size(190)->errorCorrection("L")
->generate($result->qr_code);
return $img;
}
The above is Alipay code scanning payment , Combined with QR code expansion , Example of generated payment QR code , For details, please refer to laravel-pay file
边栏推荐
- Clickhouse stand alone installation
- Knowledge of functions
- Report on the "fourteenth five year plan" and future development direction of global and Chinese indoor vertical farms from 2022 to 2028
- Which is the best embedded visual programming software? (introduction, evaluation and selection of visual programming platform) [scratch, mind+, mixly]
- Zhubo Huangyu: all the precious metals you want to know are here
- What are the advantages and risks of paper gold investment
- Go SQL parsing time Time type
- Add, delete, modify and query curd in PHP native SQL
- Knowledge of SQL - database design, backup and restore
- What should I do if I don't understand the precious metal indicators
猜你喜欢
![Alipay failed to verify the signature (sandbox test indicates fishing risk?) [original]](/img/64/c3bb27a3711a6f0cc7b281d1a961af.jpg)
Alipay failed to verify the signature (sandbox test indicates fishing risk?) [original]

Swagger
![Which is the best embedded visual programming software? (introduction, evaluation and selection of visual programming platform) [scratch, mind+, mixly]](/img/9c/7af92e6ef907b443d974275614e51a.jpg)
Which is the best embedded visual programming software? (introduction, evaluation and selection of visual programming platform) [scratch, mind+, mixly]

Getting started with flask

一幅脑图总结一下需求分析(工作上实际遇到的情况的补充)

The open software of win10 system is too small. How to make it larger (effective through personal test)

Clickhouse stand alone installation

Gateway can not connect to tcp://127.0.0.1: Connection refused
![[QT] resource file import](/img/0f/6eff57a09edda284b833947dab16af.png)
[QT] resource file import

Capture packets (Wireshark)
随机推荐
Spark - understand parquet
C generic
Detailed explanation of widget construction process of fluent
钉钉开放平台-小程序开发实战(钉钉小程序服务器端)
Oracle data pump table
Understand CGI and fastcgi
Go SQL parsing time Time type
Report on operation mode and future development trend of China's refining and chemical market 2022-2028
【QT】对话框dialog
CDN with OSS acceleration
Zhubo Huangyu: you can try these non-agricultural operation skills
BSC 及HT 等链的NFT 创造及绑定图片教程
Syntax error of go language generic in IDE
redis集群的方式
Ubuntu installs PostgreSQL and uses omnidb to view
08_SpingBoot 集成Redis
mysql自帶的性能測試工具mysqlslap執行壓力測試
线程同步之条件变量
Question brushing record day01
Detailed explanation of globalkey of flutter