app/services/transaction_service/api/settings.rb
def provision(settings)
      existing_settings = PaymentSettingsStore.get(settings.slice(:community_id, :payment_gateway, :payment_process))
      unless existing_settings.nil?
        return Result::Error.new("gateway / process already provisioned. cid: #{settings[:community_id]}, gateway: #{settings[:payment_gateway]}, process: #{settings[:payment_process]}")
      end

      Result::Success.new(PaymentSettingsStore.create(settings))
    end
# Provision new settings (= new gateway and/or process) for a community
Provision new settings (= new gateway and/or process) for a community
Provision new settings ( = new gateway and / or process ) for a community
def provision(settings)
      existing_settings = PaymentSettingsStore.get(settings.slice(:community_id, :payment_gateway, :payment_process))
      unless existing_settings.nil?
        return Result::Error.new("gateway / process already provisioned. cid: #{settings[:community_id]}, gateway: #{settings[:payment_gateway]}, process: #{settings[:payment_process]}")
      end
      Result::Success.new(PaymentSettingsStore.create(settings))
    end
def provision ( settings ) existing_settings = PaymentSettingsStore . get ( settings . slice ( :community_id , :payment_gateway , :payment_process ) ) unless existing_settings . nil? return Result :: Error . new ( "gateway / process already provisioned. cid: #{settings[:community_id]}, gateway: #{settings[:payment_gateway]}, process: #{settings[:payment_process]}" ) end Result :: Success . new ( PaymentSettingsStore . create ( settings ) ) end
Provision new settings (= new gateway and/or process) for a community
Provision new settings ( = new gateway and / or process ) for a community
settings