lib/pesapal/merchant.rb in pesapal-1.2.2 vs lib/pesapal/merchant.rb in pesapal-1.3.0

- old
+ new

@@ -39,11 +39,11 @@ end public # constructor - def initialize(mode = :development, path_to_file = nil) + def initialize(mode = Rails.env, path_to_file = nil) # initialize @params = nil @post_xml = nil @token_secret = nil @@ -137,13 +137,13 @@ # return the string result of what we want response["pesapal_response_data"][0] end # set mode when called - def set_mode(mode = :development) + def set_mode(mode = Rails.env) # convert symbol to string and downcase - @mode = "#{mode.to_s.downcase}" + @mode = mode.to_s.downcase # set api endpoints depending on the mode set_endpoints end