当前位置:网站首页>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
边栏推荐
- 一幅脑图总结一下需求分析(工作上实际遇到的情况的补充)
- MySQL est livré avec l'outil de test de performance MySQL lap pour effectuer des tests de résistance
- 1064 (42000) error occurred when installing MySQL and modifying root password
- Performance test comparison between PHP framework jsnpp and thinkphp6
- 线程同步之条件变量
- 35 year old programmer fired Luna millions of assets and returned to zero in three days. Netizen: it's the same as gambling
- MySQL enable logbin in Qunhui docker
- CTF serialization and deserialization
- Upload script file (one sentence back door) WAF bypass (PHP)
- Which is the best embedded visual programming software? (introduction, evaluation and selection of visual programming platform) [scratch, mind+, mixly]
猜你喜欢

修改Oracle连接数
![Simple personal summary of tp6 multi application deployment -- Part I [original]](/img/7b/65fab1973423081483dacc9bed9594.jpg)
Simple personal summary of tp6 multi application deployment -- Part I [original]

Mutex of thread synchronization (mutex)

CDN with OSS acceleration

MySQL index details
![PHP design function getmaxstr to find the longest symmetric string in a string - [original]](/img/45/d8dae9e605a2f411683db7a2d40d0b.jpg)
PHP design function getmaxstr to find the longest symmetric string in a string - [original]

Minecraft 1.16.5 生化8 模组 1.9版本 1.18版本同步
![[Qunhui] no port access (reverse proxy + intranet penetration)](/img/bc/b1e0c5c382e30fbcea28fbc68c1151.jpg)
[Qunhui] no port access (reverse proxy + intranet penetration)

OSS CDN alicloud configuration method

Resolve PHP is not an internal or external command
随机推荐
Analysis report on development trend and market demand of global and Chinese molecular diagnostics industry from 2022 to 2028
Oracle data pump table
Tp6 is easy to tread [original]
Conditional variables for thread synchronization
C generic
TP5 distinct method paging problem
What should I do if the 51 SCM board cannot find the device in keil
NFT creation and binding of BSC and HT chains
mysql自帶的性能測試工具mysqlslap執行壓力測試
Wechat applet is bound to a dynamic array to implement a custom radio box (after clicking the button, disable the button and enable other buttons)
Install cenos in the virtual machine
Mobile terminal pull-down loading pull-down loading data
Modify the number of Oracle connections
6、 Project practice --- identifying cats and dogs
OSS CDN alicloud configuration method
Analysis of the principle of obxwidget
Mutex of thread synchronization (mutex)
Question brushing record day01
35 year old programmer fired Luna millions of assets and returned to zero in three days. Netizen: it's the same as gambling
VHDL设计