<commit_before>module CatarseBraintree
  class Gateway
    def initialize(configuration = PaymentEngines.configuration)
      @configuration = configuration
    end

    def self.instance
      new.setup_gateway
    rescue Exception => e
      puts e.message
      Rails.logger.warn e.message
    end

    def setup_gateway
      check_default_configurations!
      Rails.logger.debug @configuration[:braintree_merchant_id]
      Braintree::Configuration.environment = !!@configuration[:braintree_test] ? :sandbox : :production
      Braintree::Configuration.merchant_id = @configuration[:braintree_merchant_id]
      Braintree::Configuration.public_key  = @configuration[:braintree_public_key]
      Braintree::Configuration.private_key = @configuration[:braintree_private_key]
      self
    end


    def generate_client_token
      Braintree::ClientToken.generate
    end

    private
<commit_msg>hardcode merchant id temporarly<commit_after>module CatarseBraintree
  class Gateway
    def initialize(configuration = PaymentEngines.configuration)
      @configuration = configuration
    end

    def self.instance
      new.setup_gateway
    rescue Exception => e
      puts e.message
      Rails.logger.warn e.message
    end

    def setup_gateway
      check_default_configurations!
      Rails.logger.debug @configuration[:braintree_merchant_id]
      Braintree::Configuration.environment = !!@configuration[:braintree_test] ? :sandbox : :production
      Braintree::Configuration.merchant_id = "5thmz3853jfktm9s"
      Braintree::Configuration.public_key  = @configuration[:braintree_public_key]
      Braintree::Configuration.private_key = @configuration[:braintree_private_key]
      self
    end


    def generate_client_token
      Braintree::ClientToken.generate
    end

    private

{'fraction_non_alphanumeric': 0.07111111111111111, 'fraction_numerical': 0.0033333333333333335, 'mean_word_length': 3.7898936170212765, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5713595', 'n_tokens_mistral': 515, 'n_tokens_neox': 502, 'n_words': 89}