parameters: (self, data)
docstring: Override of payment to process the transaction based on Authorize data.
  
          Note: self.ensure_one()
  
          :param dict data: The feedback data sent by the provider
          :return: None
docstring_summary: Override of payment to process the transaction based on Authorize data.
docstring_tokens: Override of payment to process the transaction based on Authorize data .
function: def _process_feedback_data(self, data):
          """ Override of payment to process the transaction based on Authorize data.
  
          Note: self.ensure_one()
  
          :param dict data: The feedback data sent by the provider
          :return: None
          """
          super()._process_feedback_data(data)
          if self.provider != 'authorize':
              return
  
          response_content = data.get('response')
  
          self.acquirer_reference = response_content.get('x_trans_id')
          status_code = response_content.get('x_response_code', '3')
          if status_code == '1':  # Approved
              status_type = response_content.get('x_type').lower()
              if status_type in ('auth_capture', 'prior_auth_capture'):
                  self._set_done()
                  if self.tokenize and not self.token_id:
                      self._authorize_tokenize()
              elif status_type == 'auth_only':
                  self._set_authorized()
                  if self.tokenize and not self.token_id:
                      self._authorize_tokenize()
                  if self.operation == 'validation':
                      # Void the transaction. In last step because it calls _handle_feedback_data()
                      self._send_refund_request(create_refund_transaction=False)
              elif status_type == 'void':
                  if self.operation == 'validation':  # Validation txs are authorized and then voided
                      self._set_done()  # If the refund went through, the validation tx is confirmed
                  else:
                      self._set_canceled()
          elif status_code == '2':  # Declined
              self._set_canceled()
          elif status_code == '4':  # Held for Review
              self._set_pending()
          else:  # Error / Unknown code
              error_code = response_content.get('x_response_reason_text')
              _logger.info(
                  "received data with invalid status code %s and error code %s",
                  status_code, error_code
              )
              self._set_error(
                  "Authorize.Net: " + _(
                      "Received data with status code \"%(status)s\" and error code \"%(error)s\"",
                      status=status_code, error=error_code
                  )
              )
function_tokens: def _process_feedback_data ( self , data ) : super ( ) . _process_feedback_data ( data ) if self . provider != 'authorize' : return response_content = data . get ( 'response' ) self . acquirer_reference = response_content . get ( 'x_trans_id' ) status_code = response_content . get ( 'x_response_code' , '3' ) if status_code == '1' : # Approved status_type = response_content . get ( 'x_type' ) . lower ( ) if status_type in ( 'auth_capture' , 'prior_auth_capture' ) : self . _set_done ( ) if self . tokenize and not self . token_id : self . _authorize_tokenize ( ) elif status_type == 'auth_only' : self . _set_authorized ( ) if self . tokenize and not self . token_id : self . _authorize_tokenize ( ) if self . operation == 'validation' : # Void the transaction. In last step because it calls _handle_feedback_data() self . _send_refund_request ( create_refund_transaction = False ) elif status_type == 'void' : if self . operation == 'validation' : # Validation txs are authorized and then voided self . _set_done ( ) # If the refund went through, the validation tx is confirmed else : self . _set_canceled ( ) elif status_code == '2' : # Declined self . _set_canceled ( ) elif status_code == '4' : # Held for Review self . _set_pending ( ) else : # Error / Unknown code error_code = response_content . get ( 'x_response_reason_text' ) _logger . info ( "received data with invalid status code %s and error code %s" , status_code , error_code ) self . _set_error ( "Authorize.Net: " + _ ( "Received data with status code \"%(status)s\" and error code \"%(error)s\"" , status = status_code , error = error_code ) )