Permalink
Browse files

Added redirect url with less complexity

  • Loading branch information...
1 parent c02bf11 commit 2c43815a3ad660bcd105c28110fcbc91749f9020 @janjiss janjiss committed Jan 8, 2013
Showing with 3 additions and 6 deletions.
  1. +3 −6 lib/active_merchant/billing/first_data_gateway.rb
@@ -281,12 +281,9 @@ def endpoint_url
end
def redirect_url(trans_id = nil)
- trans_id_param = "?trans_id=#{CGI.escape trans_id}" if trans_id
- if test?
- trans_id ? test_redirect_url + trans_id_param : test_redirect_url
- else
- trans_id ? live_redirect_url + trans_id_param : live_redirect_url
- end
+ url = test? ? test_redirect_url : live_redirect_url
+ url += "?trans_id=#{CGI.escape trans_id}" if trans_id
+ url
end
private

0 comments on commit 2c43815

Please sign in to comment.