LitleOnline 8.12.2 → 8.12.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  = LitleOnline CHANGELOG
2
2
 
3
+ == Version 8.12.3 (May 17, 2012)
4
+
5
+ * Bugfix: Allow use without the configuration file
6
+
3
7
  == Version 8.12.2 (May 16, 2012)
4
8
 
5
9
  * Bugfix: Fix bug where rails "capture" method was interfering with Litle's "capture"
data/Rakefile CHANGED
@@ -34,7 +34,7 @@ spec = Gem::Specification.new do |s|
34
34
  s.description = File.read(File.join(File.dirname(__FILE__), 'DESCRIPTION'))
35
35
  s.requirements =
36
36
  [ 'Contact sdksupport@litle.com for more information' ]
37
- s.version = "8.12.2"
37
+ s.version = "8.12.3"
38
38
  s.author = "Litle & Co"
39
39
  s.email = "sdksupport@litle.com"
40
40
  s.homepage = "http://www.litle.com/developers"
@@ -36,6 +36,10 @@ class LitleOnlineRequest
36
36
  end
37
37
 
38
38
  def authorization(hash_in)
39
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
40
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
41
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
42
+
39
43
  request = OnlineRequest.new
40
44
  authorization = Authorization.new
41
45
  authorization.reportGroup = get_report_group(hash_in)
@@ -84,6 +88,10 @@ class LitleOnlineRequest
84
88
  end
85
89
 
86
90
  def sale(hash_in)
91
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
92
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
93
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
94
+
87
95
  request = OnlineRequest.new
88
96
  sale = Sale.new
89
97
  sale.reportGroup = get_report_group(hash_in)
@@ -135,6 +143,10 @@ class LitleOnlineRequest
135
143
  end
136
144
 
137
145
  def auth_reversal(hash_in)
146
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
147
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
148
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
149
+
138
150
  request = OnlineRequest.new
139
151
  auth_reversal = AuthReversal.new
140
152
  auth_reversal.reportGroup = get_report_group(hash_in)
@@ -163,6 +175,10 @@ class LitleOnlineRequest
163
175
  end
164
176
 
165
177
  def credit(hash_in)
178
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
179
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
180
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
181
+
166
182
  request = OnlineRequest.new
167
183
  credit = Credit.new
168
184
  credit.reportGroup = get_report_group(hash_in)
@@ -205,6 +221,10 @@ class LitleOnlineRequest
205
221
  end
206
222
 
207
223
  def register_token_request(hash_in)
224
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
225
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
226
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
227
+
208
228
  request = OnlineRequest.new
209
229
  token_request = RegisterTokenRequest.new
210
230
  token_request.reportGroup = get_report_group(hash_in)
@@ -233,6 +253,10 @@ class LitleOnlineRequest
233
253
  end
234
254
 
235
255
  def force_capture(hash_in)
256
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
257
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
258
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
259
+
236
260
  request = OnlineRequest.new
237
261
  force_capture = ForceCapture.new
238
262
  force_capture.reportGroup = get_report_group(hash_in)
@@ -270,6 +294,10 @@ class LitleOnlineRequest
270
294
  end
271
295
 
272
296
  def capture(hash_in)
297
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
298
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
299
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
300
+
273
301
  request = OnlineRequest.new
274
302
  capture = Capture.new
275
303
  capture.reportGroup = get_report_group(hash_in)
@@ -301,6 +329,10 @@ class LitleOnlineRequest
301
329
  end
302
330
 
303
331
  def capture_given_auth(hash_in)
332
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
333
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
334
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
335
+
304
336
  request = OnlineRequest.new
305
337
  capture_given_auth = CaptureGivenAuth.new
306
338
  capture_given_auth.reportGroup = get_report_group(hash_in)
@@ -341,6 +373,10 @@ class LitleOnlineRequest
341
373
  end
342
374
 
343
375
  def echeck_redeposit(hash_in)
376
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
377
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
378
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
379
+
344
380
  request = OnlineRequest.new
345
381
  echeck_redeposit = EcheckRedeposit.new
346
382
  echeck_redeposit.reportGroup = get_report_group(hash_in)
@@ -368,6 +404,10 @@ class LitleOnlineRequest
368
404
  end
369
405
 
370
406
  def echeck_sale(hash_in)
407
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
408
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
409
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
410
+
371
411
  request = OnlineRequest.new
372
412
  echeck_sale = EcheckSale.new
373
413
  echeck_sale.reportGroup = get_report_group(hash_in)
@@ -402,6 +442,10 @@ class LitleOnlineRequest
402
442
  end
403
443
 
404
444
  def echeck_credit(hash_in)
445
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
446
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
447
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
448
+
405
449
  request = OnlineRequest.new
406
450
  echeck_credit = EcheckCredit.new
407
451
  echeck_credit.reportGroup = get_report_group(hash_in)
@@ -441,6 +485,10 @@ class LitleOnlineRequest
441
485
  end
442
486
 
443
487
  def echeck_verification(hash_in)
488
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
489
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
490
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
491
+
444
492
  request = OnlineRequest.new
445
493
  echeck_verification = EcheckVerification.new
446
494
  echeck_verification.reportGroup = get_report_group(hash_in)
@@ -472,6 +520,10 @@ class LitleOnlineRequest
472
520
  end
473
521
 
474
522
  def void(hash_in)
523
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
524
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
525
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
526
+
475
527
  request = OnlineRequest.new
476
528
  void = Void.new
477
529
  void.reportGroup = get_report_group(hash_in)
@@ -517,7 +569,7 @@ class LitleOnlineRequest
517
569
 
518
570
  def get_merchant_sdk(hash_in)
519
571
  if(!hash_in['merchantSdk'])
520
- return 'Ruby;8.12.2'
572
+ return 'Ruby;8.12.3'
521
573
  else
522
574
  return hash_in['merchantSdk']
523
575
  end
@@ -530,62 +582,4 @@ class LitleOnlineRequest
530
582
  return hash_in['reportGroup']
531
583
  end
532
584
  end
533
-
534
- def authentication(hash_in)
535
- if(!hash_in['user'])
536
- user = @config_hash['user']
537
- else
538
- user = hash_in['user']
539
- end
540
-
541
- if(!hash_in['password'])
542
- password = @config_hash['password']
543
- else
544
- password = hash_in['password']
545
- end
546
-
547
- hash_out = {
548
- :user =>required_field(user),
549
- :password =>required_field(password)
550
- }
551
- Checker.required_missing(hash_out)
552
- end
553
-
554
- def required_field(value)
555
- return (value or 'REQUIRED')
556
- end
557
-
558
- def optional_field(value)
559
- return (value or ' ')
560
- end
561
-
562
- def build_full_hash(hash_in, merge_hash)
563
- if(hash_in['version'] == nil)
564
- version = @config_hash['version']
565
- else
566
- version = hash_in['version']
567
- end
568
-
569
- litle_online_hash = {
570
- "@version"=> required_field(version),
571
- "@xmlns"=> "http://www.litle.com/schema",
572
- "@merchantId"=> get_merchant_id(hash_in),
573
- "@merchantSdk"=> get_merchant_sdk(hash_in),
574
- :authentication => authentication(hash_in)
575
- }
576
- return litle_online_hash.merge(merge_hash)
577
- end
578
-
579
- def get_common_attributes(hash_in)
580
- @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
581
- @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
582
- @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
583
-
584
- return {
585
- '@id' => hash_in['id'],
586
- '@customerId' => hash_in['customerId'],
587
- '@reportGroup' => get_report_group(hash_in)
588
- }
589
- end
590
-
591
585
  end
@@ -242,7 +242,7 @@ end
242
242
  #Explicit - used for integrations
243
243
  assert_equal 'ActiveMerchant;3.2', litle.send(:get_merchant_sdk, {'merchantSdk'=>'ActiveMerchant;3.2'})
244
244
  #Implicit - used raw when nothing is specified
245
- assert_equal 'Ruby;8.12.2', litle.send(:get_merchant_sdk, {'NotMerchantSdk'=>'ActiveMerchant;3.2'})
245
+ assert_equal 'Ruby;8.12.3', litle.send(:get_merchant_sdk, {'NotMerchantSdk'=>'ActiveMerchant;3.2'})
246
246
  end
247
247
 
248
248
 
metadata CHANGED
@@ -1,66 +1,76 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: LitleOnline
3
- version: !ruby/object:Gem::Version
4
- version: 8.12.2
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 8
7
+ - 12
8
+ - 3
9
+ version: 8.12.3
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Litle & Co
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-05-16 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2012-05-17 00:00:00 -04:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: xml-object
16
- requirement: &216214020 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ version: "0"
22
31
  type: :runtime
23
- prerelease: false
24
- version_requirements: *216214020
25
- - !ruby/object:Gem::Dependency
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
26
34
  name: xml-mapping
27
- requirement: &216213600 !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
28
37
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
33
44
  type: :runtime
34
- prerelease: false
35
- version_requirements: *216213600
36
- - !ruby/object:Gem::Dependency
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
37
47
  name: mocha
38
- requirement: &216213180 !ruby/object:Gem::Requirement
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
39
50
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ segments:
55
+ - 0
56
+ version: "0"
44
57
  type: :development
45
- prerelease: false
46
- version_requirements: *216213180
47
- description: ! 'Litle Online Ruby SDK created for version 8.12 of Litle XML online
48
- format, see the XSD schema for specific fields that are supported by this format.
49
-
50
-
51
- This gem contains an application interface in the Ruby programming language created
52
- by Litle & Co.
53
-
54
-
55
-
56
- '
58
+ version_requirements: *id003
59
+ description: |+
60
+ Litle Online Ruby SDK created for version 8.12 of Litle XML online format, see the XSD schema for specific fields that are supported by this format.
61
+
62
+ This gem contains an application interface in the Ruby programming language created by Litle & Co.
63
+
64
+
57
65
  email: sdksupport@litle.com
58
- executables:
66
+ executables:
59
67
  - sample_driver.rb
60
68
  - Setup.rb
61
69
  extensions: []
70
+
62
71
  extra_rdoc_files: []
63
- files:
72
+
73
+ files:
64
74
  - README.md
65
75
  - Rakefile
66
76
  - lib/LitleOnlineRequest.rb
@@ -112,31 +122,39 @@ files:
112
122
  - test/certification/certTest2_authenhanced.rb
113
123
  - test/certification/certTest5_token.rb
114
124
  - LICENSE
125
+ has_rdoc: true
115
126
  homepage: http://www.litle.com/developers
116
127
  licenses: []
128
+
117
129
  post_install_message:
118
130
  rdoc_options: []
119
- require_paths:
131
+
132
+ require_paths:
120
133
  - lib
121
- required_ruby_version: !ruby/object:Gem::Requirement
134
+ required_ruby_version: !ruby/object:Gem::Requirement
122
135
  none: false
123
- requirements:
124
- - - ! '>='
125
- - !ruby/object:Gem::Version
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ segments:
140
+ - 1
141
+ - 8
142
+ - 6
126
143
  version: 1.8.6
127
- required_rubygems_version: !ruby/object:Gem::Requirement
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
145
  none: false
129
- requirements:
130
- - - ! '>='
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
- requirements:
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ segments:
150
+ - 0
151
+ version: "0"
152
+ requirements:
134
153
  - Contact sdksupport@litle.com for more information
135
154
  rubyforge_project:
136
- rubygems_version: 1.8.15
155
+ rubygems_version: 1.3.7
137
156
  signing_key:
138
157
  specification_version: 3
139
- summary: Ruby SDK produced by Litle & Co. for online transaction processing using
140
- Litle XML format v8.12
141
- test_files:
158
+ summary: Ruby SDK produced by Litle & Co. for online transaction processing using Litle XML format v8.12
159
+ test_files:
142
160
  - test/unit/ts_unit.rb