def parse(self, raw_response, response_time):

        debug_string = " paython.gateways.plugnpay.parse() -- Raw response: "
        logger.debug(debug_string.center(80, '='))
        debug_string = "\n %s" % raw_response
        logger.debug(debug_string)

        #splitting up response into a list so we can map it to Paython generic response
        raw_response = raw_response.split(self.DELIMITER)

        # map key/value keys to `response` dict
        response = {}
        for field in raw_response:
            t = field.split('=')
            response[urllib.unquote(t[0])] = urllib.unquote(t[1]).strip('|').strip()

        # map AVS code to string based on `card-type`
        if response.has_key('avs-code'):
            if (response.get('card-type') in self.AVS_RESPONSE_KEYS and
                response['avs-code'] in self.AVS_RESPONSE_KEYS[response['card-type']]
            ):
                response['avs-code-msg'] = self.AVS_RESPONSE_KEYS[response['card-type']][response['avs-code']]
            elif response['avs-code'] in self.AVS_RESPONSE_KEYS['VISA']:  # default to VISA AVS description
                response['avs-code-msg'] = self.AVS_RESPONSE_KEYS['VISA'][response['avs-code']]

        # simple response code description
        if response.get('sresp') in self.SIMPLE_STATUS_RESPONSE_KEYS:
            response['sresp-msg'] = self.SIMPLE_STATUS_RESPONSE_KEYS[response['sresp']]

        # exact response code description by Merchant Processors
        if response.has_key('resp-code') and response['resp-code'] in self.STATUS_RESPONSE_KEYS:
            response['resp-code-msg'] = self.STATUS_RESPONSE_KEYS[response['resp-code']]

        # parse Transaction status
        # FinalStatus is The Right Way to parse the transaction status
        # valid FinalStatus values:
        # success
        # badcard = transaction declined
        # problem = transaction could not be processed at this time
        # fraud = authorization flagged as fraudulent
        # Unapproved values have an accompanying MErrMsg field saying why
        approved = response['FinalStatus'] == 'success'

        debug_string = " paython.gateways.plugnpay.parse() -- Response as list: "
        logger.debug(debug_string.center(80, '='))
        debug_string = '\n%s' % response
        logger.debug(debug_string)

        return super(PlugnPay, self).standardize(response, self.RESPONSE_KEYS, response_time, approved)
On Specific Gateway due differences in response from gateway
dataset/ETHPy150Open abunsen/Paython/paython/gateways/plugnpay.py/PlugnPay.parse