on method

void on(
  1. String event,
  2. Function handler
)

Registers event listeners for payment events

Implementation

void on(String event, Function handler) {
  cb(event, cont) {
    handler(event.eventData);
  }

  _eventEmitter.on(event, null, cb);
  _resync();
}