public function getResponseId($response){
        $isError = $this->isError($response);

        if($isError){
            $result = array (
                'message' => $response->getMessage(),
                'eventId' => $response->getEventId()
            );

            return $result;

        } else {
            $result = array (
                'responseMessage' => $response->getResponseMessage(),
                'id' => $response->getId()
            );

            return $result;
        }
    }
public function getResponseId($response){
        $isError = $this->isError($response);

        if($isError){
            $result = array (
                'message' => $response->getMessage(),
                'eventId' => $response->getEventId()
            );

            return $result;

        } else {
            $result = array (
                'responseMessage' => $response->getResponseMessage(),
                'id' => $response->getId()
            );

            return $result;
        }
    }
public function getResponseId ( $ response ) { $ isError = $ this -> isError ( $ response ) ; if ( $ isError ) { $ result = array ( 'message' => $ response -> getMessage ( ) , 'eventId' => $ response -> getEventId ( ) ) ; return $ result ; } else { $ result = array ( 'responseMessage' => $ response -> getResponseMessage ( ) , 'id' => $ response -> getId ( ) ) ; return $ result ; } }
return eventId if charge has error.
return chargeID if charge is decline
return eventId if charge has error . return chargeID if charge is decline