def handle_query_result(payment_transaction, response)
      call_handler HANDLER_SAVE_CHANGES, payment_transaction, response

      case true
      when response.redirect_needed?
          call_handler HANDLER_REDIRECT, response, payment_transaction
      when response.show_html_needed?
          call_handler HANDLER_SHOW_HTML, response, payment_transaction
      when response.status_update_needed?
          call_handler HANDLER_STATUS_UPDATE, response, payment_transaction
      else
          call_handler HANDLER_FINISH_PROCESSING, payment_transaction, response
      end
    end
def handle_query_result(payment_transaction, response)
      call_handler HANDLER_SAVE_CHANGES, payment_transaction, response

      case true
      when response.redirect_needed?
          call_handler HANDLER_REDIRECT, response, payment_transaction
      when response.show_html_needed?
          call_handler HANDLER_SHOW_HTML, response, payment_transaction
      when response.status_update_needed?
          call_handler HANDLER_STATUS_UPDATE, response, payment_transaction
      else
          call_handler HANDLER_FINISH_PROCESSING, payment_transaction, response
      end
    end
Handle query result.
 Method calls handlers for:
  - HANDLER_SAVE_CHANGES            always
  - HANDLER_STATUS_UPDATE           if needed payment transaction status update
  - HANDLER_SHOW_HTML               if needed to show response html
  - HANDLER_REDIRECT                if needed to redirect to response URL
  - HANDLER_FINISH_PROCESSING       if not additional action needed

 @param    payment_transaction   [PaymentTransaction]    Payment transaction
 @param    response              [Response]              Query result