Sha256: 7079b154e2d0a675ddebdddd596e66f4d9ab59499a8b225a22f3c6aed1531b18
Contents?: true
Size: 1.38 KB
Versions: 2
Compression:
Stored size: 1.38 KB
Contents
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" require 'spec' require 'lib/exact4r' require 'ruby-debug' REPLICATION_TIME = 20 # address & authentication for testing against api.e-xact.com LOCATION = "https://api.e-xact.com/" BASIC_AUTH = {:gateway_id => "A00049-01", :password => "test1"} # address & authentication for local testing # LOCATION = "http://ws.local/" # I am a Passenger... # LOCATION = "http://localhost:3000/" # old skool # BASIC_AUTH = {:gateway_id => "AD0008-01", :password => "7nfcpc7n"} Spec::Runner.configure do |config| include EWS::Transaction config.mock_with :mocha end def basic_params(options = {}) { :transaction_type => :purchase, :amount => "10.13", :cardholder_name => "Simon Brown", :cc_number => "4111111111111111", :cc_expiry => "1012", :gateway_id => "someone", :password => "somehow" }.merge(options) end def basic_find_transaction(options = {}) params = { :transaction_type => :transaction_details, }.merge(options) ::EWS::Transaction::Request.new(params.merge(BASIC_AUTH)) end def basic_new_transaction(options = {}) params = { :transaction_type => :purchase, :amount => "10.13", :cardholder_name => "Simon Brown", :cc_number => "4111111111111111", :cc_expiry => "1012", :reference_no => "987987", }.merge(options) ::EWS::Transaction::Request.new(params.merge(BASIC_AUTH)) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
exact4r-0.7 | ./spec/spec_helper.rb |
exact4r-0.8 | ./spec/spec_helper.rb |