public function setCallback($data = [])
    {
        if (is_array($data)) {

            if (array_key_exists('callbackOnFail', $data)) {
                $this->setSecondaryCallbackURL($data['callbackOnFail']);
            }

            if (array_key_exists('callbackOnSuccess', $data)) {
                $this->setPrimaryCallbackURL($data['callbackOnSuccess']);
            }

            if (array_key_exists('error', $data)) {
                $this->setSecondaryCallbackURL($data['error']);
            }

            if (array_key_exists('success', $data)) {
                $this->setPrimaryCallbackURL($data['success']);
            }

            if (array_key_exists('callback', $data)) {
                $this->setCallback($data['callback']);
            }
        }

        return $this->callback($data);
    }
public function setCallback($data = [])
    {
        if (is_array($data)) {

            if (array_key_exists('callbackOnFail', $data)) {
                $this->setSecondaryCallbackURL($data['callbackOnFail']);
            }

            if (array_key_exists('callbackOnSuccess', $data)) {
                $this->setPrimaryCallbackURL($data['callbackOnSuccess']);
            }

            if (array_key_exists('error', $data)) {
                $this->setSecondaryCallbackURL($data['error']);
            }

            if (array_key_exists('success', $data)) {
                $this->setPrimaryCallbackURL($data['success']);
            }

            if (array_key_exists('callback', $data)) {
                $this->setCallback($data['callback']);
            }
        }

        return $this->callback($data);
    }
public function setCallback ( $ data = [ ] ) { if ( is_array ( $ data ) ) { if ( array_key_exists ( 'callbackOnFail' , $ data ) ) { $ this -> setSecondaryCallbackURL ( $ data [ 'callbackOnFail' ] ) ; } if ( array_key_exists ( 'callbackOnSuccess' , $ data ) ) { $ this -> setPrimaryCallbackURL ( $ data [ 'callbackOnSuccess' ] ) ; } if ( array_key_exists ( 'error' , $ data ) ) { $ this -> setSecondaryCallbackURL ( $ data [ 'error' ] ) ; } if ( array_key_exists ( 'success' , $ data ) ) { $ this -> setPrimaryCallbackURL ( $ data [ 'success' ] ) ; } if ( array_key_exists ( 'callback' , $ data ) ) { $ this -> setCallback ( $ data [ 'callback' ] ) ; } } return $ this -> callback ( $ data ) ; }
This method sets the callbacks for the Hubtel Payments

@param  array|string $data
@return self
This method sets the callbacks for the Hubtel Payments