Sha256: 0425ba47beb6adb553862dd06cadf868679bd4bf4aff602d7f28170af0d26139
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib" require 'spec' require 'lib/exact4r' 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://localhost:3000/" 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
exact4r-0.6 | ./spec/spec_helper.rb |