def validate_signature(payment_transaction, callback_response)
      expected_control_code = Digest::SHA1.hexdigest(
        callback_response.status +
        callback_response.payment_paynet_id.to_s +
        callback_response.payment_client_id.to_s +
        payment_transaction.query_config.signing_key
      )

      if expected_control_code != callback_response.control_code
        raise ValidationError, "Actual control code '#{callback_response.control_code}' does " +
                               "not equal expected '#{expected_control_code}'"
      end
    end
def validate_signature(payment_transaction, callback_response)
      expected_control_code = Digest::SHA1.hexdigest(
        callback_response.status +
        callback_response.payment_paynet_id.to_s +
        callback_response.payment_client_id.to_s +
        payment_transaction.query_config.signing_key
      )

      if expected_control_code != callback_response.control_code
        raise ValidationError, "Actual control code '#{callback_response.control_code}' does " +
                               "not equal expected '#{expected_control_code}'"
      end
    end
Validate callback response control code

 @param    payment_transaction   [PaymentTransaction]    Payment transaction for control code checking
 @param    callback_response     [CallbackResponse]      Callback for control code checking