lib/helpers/controller_helpers.rb in wepay-rails-0.1.22 vs lib/helpers/controller_helpers.rb in wepay-rails-0.1.23
- old
+ new
@@ -13,10 +13,12 @@
query = params.map do |k, v|
"#{k.to_s}=#{v}"
end.join('&')
- "#{@base_uri}/v2/oauth2/authorize?#{query}"
+ auth_base_uri = Rails.env.production? ? "https://api.wepay.com" : "https://stage.wepay.com"
+
+ "#{auth_base_uri}/v2/oauth2/authorize?#{query}"
end
def redirect_to_wepay_for_auth(redirect_uri, scope)
redirect_to gateway.auth_code_url(redirect_uri, scope)
end
\ No newline at end of file