Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2 from janjiss/master

Added request_id for redirect_url
  • Loading branch information...
commit a814ac61013aaca8c34976e11fefa92556853f73 2 parents 2edd9df + 2c43815
@ebeigarts authored
View
6 lib/active_merchant/billing/first_data_gateway.rb
@@ -280,8 +280,10 @@ def endpoint_url
test? ? test_url : live_url
end
- def redirect_url
- test? ? test_redirect_url : live_redirect_url
+ def redirect_url(trans_id = nil)
+ url = test? ? test_redirect_url : live_redirect_url
+ url += "?trans_id=#{CGI.escape trans_id}" if trans_id
+ url
end
private
View
7 spec/active_merchant/billing/first_data_gateway_spec.rb
@@ -685,6 +685,13 @@
end
end
+ it "26) return correct redirect url with transaction id" do
+ @gateway.redirect_url.should == @gateway.test_redirect_url
+ end
+
+ it "27) return correct redirect url without transaction id" do
+ @gateway.redirect_url("2SGip+TK/dVYe+XMSeQuECMs//S=").should == @gateway.test_redirect_url + "?trans_id=2SGip%2BTK%2FdVYe%2BXMSeQuECMs%2F%2FS%3D"
+ end
end
def submit_form(url, params, cassette_prefix)
Please sign in to comment.
Something went wrong with that request. Please try again.