exact4r 0.9 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -1
- data/VERSION +1 -1
- data/doc/classes/EWS/Transaction/Request.html +81 -54
- data/doc/classes/EWS/Transaction/Response.html +14 -182
- data/doc/classes/EWS/Transaction/Transporter.html +251 -0
- data/doc/created.rid +1 -1
- data/doc/files/README.html +24 -37
- data/doc/files/lib/ews/transaction/mapping_rb.html +1 -1
- data/doc/files/lib/ews/transaction/request_rb.html +1 -8
- data/doc/files/lib/ews/transaction/response_rb.html +1 -1
- data/doc/files/lib/ews/{transporter_rb.html → transaction/transporter_rb.html} +3 -3
- data/doc/files/lib/exact4r_rb.html +2 -4
- data/doc/fr_class_index.html +1 -3
- data/doc/fr_file_index.html +1 -6
- data/doc/fr_method_index.html +7 -18
- data/lib/ews/transaction/request.rb +33 -4
- data/pkg/exact4r-0.5.gem +0 -0
- data/spec/avs_spec.rb +94 -0
- data/spec/request_spec.rb +1 -4
- data/spec/spec_helper.rb +2 -2
- metadata +10 -29
- data/after.log +0 -6
- data/before.log +0 -17
- data/doc/classes/EWS/Transaction/FakeResponse.html +0 -451
- data/doc/classes/EWS/Transaction/Validator.html +0 -168
- data/doc/classes/EWS/Transporter.html +0 -269
- data/doc/files/CHANGELOG.html +0 -142
- data/doc/files/LICENCE.html +0 -109
- data/doc/files/VERSION.html +0 -107
- data/doc/files/lib/ews/transaction/fake_response_rb.html +0 -101
- data/doc/files/lib/ews/transaction/validator_rb.html +0 -101
- data/qa.log +0 -14
data/spec/avs_spec.rb
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
require File.dirname(__FILE__) + "/spec_helper"
|
2
|
+
|
3
|
+
describe "AVS Request" do
|
4
|
+
|
5
|
+
it "should pack AVS fields into cc_verification_str1" do
|
6
|
+
tx_params = basic_params.merge(:avs_test_flag => nil,
|
7
|
+
:avs_street_address => '1234567LOUGHEEDHIGHW',
|
8
|
+
:avs_unit_no => nil,
|
9
|
+
:avs_po_box => nil,
|
10
|
+
:avs_postal_code => '902101234')
|
11
|
+
r = EWS::Transaction::Request.new(tx_params)
|
12
|
+
r.cc_verification_str1.should == '1234567LOUGHEEDHIGHW|902101234'
|
13
|
+
|
14
|
+
tx_params = basic_params.merge(:avs_test_flag => 'W',
|
15
|
+
:avs_street_address => '1234567LOUGHEEDHIGHW',
|
16
|
+
:avs_unit_no => '12',
|
17
|
+
:avs_po_box => nil,
|
18
|
+
:avs_postal_code => '902101234')
|
19
|
+
r = EWS::Transaction::Request.new(tx_params)
|
20
|
+
r.cc_verification_str1.should == 'W1234567LOUGHEEDHIGHW12|902101234'
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should Prefer Street Address before P.O. Box" do
|
24
|
+
|
25
|
+
tx_params = basic_params.merge(:avs_test_flag => nil,
|
26
|
+
:avs_street_address => '1234567LOUGHEEDHIGHW',
|
27
|
+
:avs_unit_no => nil,
|
28
|
+
:avs_po_box => 'P.O.BOX24356',
|
29
|
+
:avs_postal_code => '902101234')
|
30
|
+
r = EWS::Transaction::Request.new(tx_params)
|
31
|
+
r.cc_verification_str1.should == '1234567LOUGHEEDHIGHW|902101234'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "Submitting AVS Requests" do
|
36
|
+
|
37
|
+
before :all do
|
38
|
+
@transporter = EWS::Transporter.new(LOCATION)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should be Paymentech AVS string" do
|
42
|
+
tx_params = basic_params.merge(:avs_test_flag => nil,
|
43
|
+
:avs_street_address => '1234567LOUGHEEDHIGHW',
|
44
|
+
:avs_unit_no => nil,
|
45
|
+
:avs_po_box => nil,
|
46
|
+
:avs_postal_code => '902101234',
|
47
|
+
:gateway_id => "AD0002-01",
|
48
|
+
:password => "63d9934x")
|
49
|
+
r = EWS::Transaction::Request.new(tx_params)
|
50
|
+
r.cc_verification_str1.should == '1234567LOUGHEEDHIGHW|902101234'
|
51
|
+
resp = @transporter.submit(r)
|
52
|
+
r.cc_verification_str1.should == resp.cc_verification_str1
|
53
|
+
end
|
54
|
+
|
55
|
+
it "should use default AVS string" do
|
56
|
+
tx_params = basic_params.merge(:avs_test_flag => nil,
|
57
|
+
:avs_street_address => '1234567LOUGHEEDHIGHW',
|
58
|
+
:avs_unit_no => nil,
|
59
|
+
:avs_po_box => nil,
|
60
|
+
:avs_postal_code => '902101234',
|
61
|
+
:gateway_id => "AD0007-01",
|
62
|
+
:password => "3uLi726f")
|
63
|
+
r = EWS::Transaction::Request.new(tx_params)
|
64
|
+
resp = @transporter.submit(r)
|
65
|
+
resp.cc_verification_str1.should == '1234567LOUGHEEDHIGHW902101234'
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should put space between numeral and zip code for Tsys" do
|
69
|
+
tx_params = basic_params.merge(:avs_test_flag => nil,
|
70
|
+
:avs_street_address => nil,
|
71
|
+
:avs_unit_no => nil,
|
72
|
+
:avs_po_box => 'P.O.BOX24356',
|
73
|
+
:avs_postal_code => '902101234',
|
74
|
+
:gateway_id => "AD0001-01",
|
75
|
+
:password => "8q53g4ef")
|
76
|
+
r = EWS::Transaction::Request.new(tx_params)
|
77
|
+
resp = @transporter.submit(r)
|
78
|
+
|
79
|
+
resp.cc_verification_str1.should == 'P.O.BOX24356 902101234'
|
80
|
+
end
|
81
|
+
it "should not put space if not numerals for Tsys" do
|
82
|
+
tx_params = basic_params.merge(:avs_test_flag => nil,
|
83
|
+
:avs_street_address => '1234567LOUGHEEDHIGHW',
|
84
|
+
:avs_unit_no => nil,
|
85
|
+
:avs_po_box => nil,
|
86
|
+
:avs_postal_code => '902101234',
|
87
|
+
:gateway_id => "AD0001-01",
|
88
|
+
:password => "8q53g4ef")
|
89
|
+
r = EWS::Transaction::Request.new(tx_params)
|
90
|
+
resp = @transporter.submit(r)
|
91
|
+
|
92
|
+
resp.cc_verification_str1.should == '1234567LOUGHEEDHIGHW902101234'
|
93
|
+
end
|
94
|
+
end
|
data/spec/request_spec.rb
CHANGED
@@ -97,9 +97,6 @@ describe "Submitting Find Requests" do
|
|
97
97
|
ct = basic_new_transaction
|
98
98
|
@transaction_tag = @transporter.submit(ct, :json).transaction_tag
|
99
99
|
@ft = basic_find_transaction(:transaction_tag => @transaction_tag)
|
100
|
-
putc '['
|
101
|
-
sleep(REPLICATION_TIME) # need time for replication to take place on the host
|
102
|
-
putc ']'
|
103
100
|
end
|
104
101
|
|
105
102
|
it "should work without a specified transport_type" do
|
@@ -154,4 +151,4 @@ describe "Fake requests" do
|
|
154
151
|
response.should be_approved
|
155
152
|
response.exact_message.should == "Transaction Normal"
|
156
153
|
end
|
157
|
-
end
|
154
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -11,8 +11,8 @@ REPLICATION_TIME = 20
|
|
11
11
|
# BASIC_AUTH = {:gateway_id => "A00049-01", :password => "test1"}
|
12
12
|
|
13
13
|
# address & authentication for local testing
|
14
|
-
LOCATION = "http://ws.local/" # I am a Passenger...
|
15
|
-
|
14
|
+
# LOCATION = "http://ws.local/" # I am a Passenger...
|
15
|
+
LOCATION = "http://localhost:3000/" # old skool
|
16
16
|
BASIC_AUTH = {:gateway_id => "AD0008-01", :password => "7nfcpc7n"}
|
17
17
|
|
18
18
|
Spec::Runner.configure do |config|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exact4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- E-xact Transactions Ltd.
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-21 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -44,45 +44,24 @@ extra_rdoc_files:
|
|
44
44
|
- README
|
45
45
|
- VERSION
|
46
46
|
files:
|
47
|
-
- ./after.log
|
48
|
-
- ./before.log
|
49
|
-
- ./certs
|
50
47
|
- ./certs/equifax_ca.cer
|
51
48
|
- ./certs/exact.cer
|
52
49
|
- ./CHANGELOG
|
53
|
-
- ./doc
|
54
|
-
- ./doc/classes
|
55
|
-
- ./doc/classes/EWS
|
56
|
-
- ./doc/classes/EWS/Transaction
|
57
|
-
- ./doc/classes/EWS/Transaction/FakeResponse.html
|
58
50
|
- ./doc/classes/EWS/Transaction/Request.html
|
59
51
|
- ./doc/classes/EWS/Transaction/Response.html
|
60
|
-
- ./doc/classes/EWS/Transaction/
|
61
|
-
- ./doc/classes/EWS/Transporter.html
|
52
|
+
- ./doc/classes/EWS/Transaction/Transporter.html
|
62
53
|
- ./doc/created.rid
|
63
|
-
- ./doc/files
|
64
|
-
- ./doc/files/CHANGELOG.html
|
65
|
-
- ./doc/files/lib
|
66
|
-
- ./doc/files/lib/ews
|
67
|
-
- ./doc/files/lib/ews/transaction
|
68
|
-
- ./doc/files/lib/ews/transaction/fake_response_rb.html
|
69
54
|
- ./doc/files/lib/ews/transaction/mapping_rb.html
|
70
55
|
- ./doc/files/lib/ews/transaction/request_rb.html
|
71
56
|
- ./doc/files/lib/ews/transaction/response_rb.html
|
72
|
-
- ./doc/files/lib/ews/transaction/
|
73
|
-
- ./doc/files/lib/ews/transporter_rb.html
|
57
|
+
- ./doc/files/lib/ews/transaction/transporter_rb.html
|
74
58
|
- ./doc/files/lib/exact4r_rb.html
|
75
|
-
- ./doc/files/LICENCE.html
|
76
59
|
- ./doc/files/README.html
|
77
|
-
- ./doc/files/VERSION.html
|
78
60
|
- ./doc/fr_class_index.html
|
79
61
|
- ./doc/fr_file_index.html
|
80
62
|
- ./doc/fr_method_index.html
|
81
63
|
- ./doc/index.html
|
82
64
|
- ./doc/rdoc-style.css
|
83
|
-
- ./lib
|
84
|
-
- ./lib/ews
|
85
|
-
- ./lib/ews/transaction
|
86
65
|
- ./lib/ews/transaction/fake_response.rb
|
87
66
|
- ./lib/ews/transaction/mapping.rb
|
88
67
|
- ./lib/ews/transaction/request.rb
|
@@ -91,10 +70,10 @@ files:
|
|
91
70
|
- ./lib/ews/transporter.rb
|
92
71
|
- ./lib/exact4r.rb
|
93
72
|
- ./LICENCE
|
94
|
-
- ./
|
73
|
+
- ./pkg/exact4r-0.5.gem
|
95
74
|
- ./Rakefile
|
96
75
|
- ./README
|
97
|
-
- ./spec
|
76
|
+
- ./spec/avs_spec.rb
|
98
77
|
- ./spec/mapping_spec.rb
|
99
78
|
- ./spec/request_spec.rb
|
100
79
|
- ./spec/spec_helper.rb
|
@@ -107,6 +86,8 @@ files:
|
|
107
86
|
- VERSION
|
108
87
|
has_rdoc: true
|
109
88
|
homepage: http://e-xact4r.rubyforge.org/
|
89
|
+
licenses: []
|
90
|
+
|
110
91
|
post_install_message:
|
111
92
|
rdoc_options:
|
112
93
|
- --main
|
@@ -130,9 +111,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
111
|
requirements: []
|
131
112
|
|
132
113
|
rubyforge_project: exact4r
|
133
|
-
rubygems_version: 1.3.
|
114
|
+
rubygems_version: 1.3.3
|
134
115
|
signing_key:
|
135
|
-
specification_version:
|
116
|
+
specification_version: 3
|
136
117
|
summary: E-xact Web Services Client Library.
|
137
118
|
test_files: []
|
138
119
|
|
data/after.log
DELETED
data/before.log
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
(in /Volumes/Exact/WebService/exact4r)
|
2
|
-
..............[].[].[].[]F....F....
|
3
|
-
|
4
|
-
1)
|
5
|
-
'Submitting Find Requests should support SOAP' FAILED
|
6
|
-
expected: "00",
|
7
|
-
got: nil (using ==)
|
8
|
-
./spec/request_spec.rb:138:
|
9
|
-
|
10
|
-
2)
|
11
|
-
'Transporter creating transactions should throw an exception when parsing a response to sending nonsense SOAP' FAILED
|
12
|
-
expected Exception but nothing was raised
|
13
|
-
./spec/transporter_spec.rb:38:
|
14
|
-
|
15
|
-
Finished in 82.424866 seconds
|
16
|
-
|
17
|
-
27 examples, 2 failures
|