def validate_response_on_error(payment_transaction, response)
      unless [success_response_type, 'error', 'validation-error'].include? response.type
        raise ValidationError, "Unknown response type '#{response.type}'"
      end

      validate_client_id payment_transaction, response
    end
def validate_response_on_error(payment_transaction, response)
      unless [success_response_type, 'error', 'validation-error'].include? response.type
        raise ValidationError, "Unknown response type '#{response.type}'"
      end

      validate_client_id payment_transaction, response
    end
Validates response before payment transaction updating
 if payment transaction is not processing or approved

 @param    payment_transaction   [PaymentTransaction]    Payment transaction
 @param    response              [Response]              Response for validating