当前位置:网站首页>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
边栏推荐
- asp. Net web page, ASP connects to the database, and uses asp:panel and asp:dropdownlist controls
- Knowledge about SQL - DML
- Clean up photo SCR virus / iframekill injection removal /iframekill removal photo scr
- Development prospect and investment strategic planning report of global and Chinese PVC hose industry from 2022 to 2028
- Getter actual combat geTx tool class encapsulation -getutils
- SixTool-多功能多合一代挂助手源码
- Go SQL parsing time Time type
- Oracle 數據泵導錶
- PHP has the problem of using strtotime to obtain time in months and months [original]
- Chrome page recording and playback function
猜你喜欢

2021-01-31
![[geek challenge 2019] rce me](/img/92/978c54fb42391198300c76ae92893d.jpg)
[geek challenge 2019] rce me

Gateway can not connect to tcp://127.0.0.1: Connection refused

Nailing open platform - applet development practice (nailing applet server side)

What should I do if the 51 SCM board cannot find the device in keil

钉钉开放平台-小程序开发实战(钉钉小程序服务器端)

How does virtual box virtual machine software accelerate the network speed in the virtual system?

Etcd watch principle

Modify the number of Oracle connections

線程同步之讀寫鎖
随机推荐
Video label forbids downloading. The test is valid. Hide button. The test is valid at three points
2021-01-31
Review of number theory
Oracle 数据泵导表
ctf [RoarCTF 2019]easy_ calc
Implementation of seven classes of BlockingQueue interface
【QT】对话框dialog
Tp6 controller does not exist: app\index\controller\index
SQL related knowledge - DQL
[Qunhui] Internet access + custom port
Capture packets (Wireshark)
China air compressor manufacturing market demand analysis and investment prospect research report 2022-2028
Parse JSON interface and insert it into the database in batch
BSC 及HT 等链的NFT 创造及绑定图片教程
Computer network high frequency interview questions
SQL related knowledge - constraints
pip 批量完全卸载包
Conditional variables for thread synchronization
Lua语法讲解
35 year old programmer fired Luna millions of assets and returned to zero in three days. Netizen: it's the same as gambling