Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support live URL

  • Loading branch information...
commit 14ba8f6e15ec811970f4eadc82ecd09b91ec2d9a 1 parent fb699f5
@exviva authored
View
8 lib/active_merchant/billing/clickand_buy_gateway.rb
@@ -4,6 +4,12 @@
module ActiveMerchant
module Billing
class ClickandBuyGateway < Gateway
+ self.test_url = 'https://api.clickandbuy-s1.com/webservices/soap/pay_1_1_0'
+ self.live_url = 'https://api.clickandbuy.com/webservices/soap/pay_1_1_0'
+
+ self.homepage_url = 'http://www.clickandbuy.com'
+ self.display_name = 'ClickandBuy'
+
def initialize(auth)
requires!(auth, :project_id, :merchant_id, :secret_key)
@auth = auth
@@ -29,7 +35,7 @@ def headers
end
def endpoint_url
- 'https://api.clickandbuy-s1.com/webservices/soap/pay_1_1_0'
+ test? ? test_url : live_url
end
end
end
View
2  spec/spec_helper.rb
@@ -7,6 +7,8 @@
require 'money'
require 'active_support/core_ext/hash/except'
+ActiveMerchant::Billing::Base.mode = :test
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
Please sign in to comment.
Something went wrong with that request. Please try again.