Sha256: 5f82efa91203847970b59fe83683d1b236d58bd4adef1cd0bd223f04b5ac220d

Contents?: true

Size: 988 Bytes

Versions: 1

Compression:

Stored size: 988 Bytes

Contents

$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"

require 'spec'
require 'lib/exact4r'

REPLICATION_TIME = 20

def basic_params(options = {})
  {
    :transaction_type => :purchase,
    :amount => "10.13",
    :cardholder_name => "Simon Brown",
    :cc_number => "4111111111111111",
    :cc_expiry => "1005",
    :gateway_id => "someone",
    :password => "somehow"
  }.merge(options)
end

def basic_find_transaction(options = {})
  params = {
    :transaction_type => :transaction_details,
    :gateway_id => "A00049-01", :password => "test1"
  }.merge(options)
  
  ::EWS::Transaction::Request.new(params)  
end

def basic_new_transaction(options = {})
  params = {
    :transaction_type => :purchase,
    :amount => "10.13",
    :cardholder_name => "Simon Brown",
    :cc_number => "4111111111111111",
    :cc_expiry => "1005",
    :reference_no => "987987",
    :gateway_id => "A00049-01", :password => "test1"
  }.merge(options)
  
  ::EWS::Transaction::Request.new(params)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
exact4r-0.5.2 ./spec/spec_helper.rb