Event plugin

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.

  1. After download SDK from ZBilling Portal open project EventExample with Visual Studio;
  2. Open ClientEventExample.cs;
  3. Add to References the dll inside bin folder;
  4. 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)
  5. After add you custom code, build project.

api_Event

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;

API_Event2

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

1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *