This example is only available for c# or vb.net.
You can use this functionality is like to SQL Trigger. Do soothing when a record is Created or Updated. So you can perform an integration with other system, send custom email, etc… Runs in asynchronous.
- After download SDK from ZBilling Portal open project EventExample with Visual Studio;
- Open ClientEventExample.cs;
- Add to References the dll inside bin folder;
- Method Execute is the where you need to put your custom code. ZBilling sends you the ZContext that include:
- Item (Context object);
- Config (ZBilling config object);
- HTTPRequest and HTTResponse (just available for Payment Plugins)
- After add you custom code, build project.
Never use in the same project, Action Plugins and Event Plugins.
You can have more classes that implements IEventPlugin in the same assembly
Go to System Config > Events > Upload Extension > Upload EventExample.dll. ZBilling will import you assembly if found a class that implements IEventPlugin;
Label: Can be empty;
Active: Activate or Deactivate Action;
Configuration: To avoid “Hard Code” you can use this field to import values to _configuration (string) variable inside you class. You can use this variable inside the Execute method.
To update assembly go to System Config > Assembly List > Select Assembly and upload new DLL