# EventHandlerInterface

Extends

Implement this interface to set triggers for transaction event on Rave.

An event can be triggered when a Rave initializes a transaction, When a transaction is successful, failed, requeried and when a requery fails.

author | Olufemi Olanipekun iolufemi@ymail.com
version | 1.0
package | Default

### Methods

## This is called when a transaction is canceled by the user

    onCancel(string $transactionReference)

### Arguments

#### $transactionReference

`string`

This is the transaction reference as returned from the Rave payment gateway

## This is called only when a transaction failed

    onFailure(object $transactionData)

### Arguments

#### $transactionData

`object`

This is the transaction data as returned from the Rave payment gateway

## This is called when the a transaction is initialized

    onInit(object $initializationData)

### Arguments

#### $initializationData

`object`

This is the initial transaction data as passed

## This is called when a transaction is requeryed from the payment gateway

    onRequery(string $transactionReference)

### Arguments

#### $transactionReference

`string`

This is the transaction reference as returned from the Rave payment gateway

## This is called a transaction requery returns with an error

    onRequeryError(string $requeryResponse)

### Arguments

#### $requeryResponse

`string`

This is the error response gotten from the Rave payment gateway requery call

## This is called only when a transaction is successful

    onSuccessful(object $transactionData)

### Arguments

#### $transactionData

`object`

This is the transaction data as returned from the Rave payment gateway

## This is called when a transaction doesn't return with a success or a failure response.

    onTimeout(string $transactionReference,  $data)

data | object $data This is the data returned from the requery call.

### Arguments

#### $transactionReference

`string`

This is the transaction reference as returned from the Rave payment gateway

#### $data

``