What is the call principle of mall development event ? Down here, Niu ger So Niushop Alipay payment plug-in (apipay) The principle of popular description of the event call principle :

How to call the event , example event(‘Pay’, [‘pay_type’ => ‘alipay’]);

The query can be implemented Pay List of plug-ins for the event :

By querying the plug-in configuration file event.php

return [

‘bind’ => [

],

‘listen’ => [
// Payment asynchronous callback 'PayNotify' => [ 'addon\alipay\event\PayNotify' ], // Payment method , Background query
'PayType' => [ 'addon\alipay\event\PayType' ], // payment , Foreground application 'Pay' => [
'addon\alipay\event\Pay' ], 'PayClose' => [ 'addon\alipay\event\PayClose' ],
'PayRefund' => [ 'addon\alipay\event\PayRefund' ], 'PayTransfer' => [
'addon\alipay\event\PayTransfer' ], 'TransferType' => [
'addon\alipay\event\TransferType' ]
],

‘subscribe’ => [

],

];

By instantiating the class file of the corresponding event , Establishing objects , Execute the corresponding method at the same time

for example : Event configuration file :‘addon\alipay\event\Pay’, Create the object first :

$class = new addon\alipay\event\Pay();

Next, call the corresponding handle($param):

$res = $class->handle([‘pay_type’ => ‘alipay’]);

Loop plug-in configuration file event.php Return the data in turn

A Niu ger Using Alipay payment plug-in configuration as an example , This paper introduces the principle of event call in open source mall system , I hope it can help you !

Technology
©2020 ioDraw All rights reserved
python gui Interface examples -Python GUI Programming complete example IO flow —— Classification of flow ,InputStream,OutputStream,Reader,Writer etc. Thread.setDaemon Set up the Daemons STM32 RS485 modbus Communication source program , The test is effective stay MATLAB 2018 Time series prediction with deep learning vue3 Write component library and publish to npm The process of Questions and answers for the interviewer : How did you get a project in the project team ??? In the applet form Multiple cycles input How to get each input Value of 2021 Front end high frequency interview questions ( You have to watch it !!!)js Array method