LitleOnline 8.13.0 → 8.13.1

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.13.1 (May 22, 2012)
4
+
5
+ * Feature: Echeck Void now supported
6
+
3
7
  == Version 8.13.0 (May 18, 2012)
4
8
 
5
9
  * Feature: Authorizations and Sales can accept an optional fraudFilterOverride parameter
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.13.0"
37
+ s.version = "8.13.1"
38
38
  s.author = "Litle & Co"
39
39
  s.email = "sdksupport@litle.com"
40
40
  s.homepage = "http://www.litle.com/developers"
@@ -552,6 +552,36 @@ module LitleOnline
552
552
  xml = request.save_to_xml.to_s
553
553
  LitleXmlMapper.request(xml, @config_hash)
554
554
  end
555
+
556
+ def echeck_void(hash_in)
557
+ @config_hash['proxy_addr'] = hash_in['proxy_addr'].nil? ? @config_hash['proxy_addr'] : hash_in['proxy_addr']
558
+ @config_hash['proxy_port'] = hash_in['proxy_port'].nil? ? @config_hash['proxy_port'] : hash_in['proxy_port']
559
+ @config_hash['url'] = hash_in['url'].nil? ? @config_hash['url'] : hash_in['url']
560
+
561
+ request = OnlineRequest.new
562
+ void = EcheckVoid.new
563
+ void.reportGroup = get_report_group(hash_in)
564
+ void.transactionId = hash_in['id']
565
+ void.customerId = hash_in['customerId']
566
+
567
+ void.litleTxnId = hash_in['litleTxnId']
568
+
569
+ request.echeckVoid = void
570
+
571
+ authentication = Authentication.new
572
+ authentication.user = 'PHXMLTEST'
573
+ authentication.password = 'password'
574
+ request.authentication = authentication
575
+
576
+ request.merchantId = get_merchant_id(hash_in)
577
+ request.version = get_version(hash_in)
578
+ request.xmlns = "http://www.litle.com/schema"
579
+ request.merchantSdk = get_merchant_sdk(hash_in)
580
+
581
+ xml = request.save_to_xml.to_s
582
+ LitleXmlMapper.request(xml, @config_hash)
583
+ end
584
+
555
585
 
556
586
  private
557
587
 
@@ -573,7 +603,7 @@ module LitleOnline
573
603
 
574
604
  def get_merchant_sdk(hash_in)
575
605
  if(!hash_in['merchantSdk'])
576
- return 'Ruby;8.13.0'
606
+ return 'Ruby;8.13.1'
577
607
  else
578
608
  return hash_in['merchantSdk']
579
609
  end
@@ -0,0 +1,41 @@
1
+ =begin
2
+ Copyright (c) 2012 Litle & Co.
3
+
4
+ Permission is hereby granted, free of charge, to any person
5
+ obtaining a copy of this software and associated documentation
6
+ files (the "Software"), to deal in the Software without
7
+ restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
+ OTHER DEALINGS IN THE SOFTWARE.
24
+ =end
25
+ require 'lib/LitleOnline'
26
+ require 'test/unit'
27
+
28
+ module LitleOnline
29
+ class TestAuthReversal < Test::Unit::TestCase
30
+ def test_simple_echeck_void
31
+ hash = {
32
+ 'merchantId' => '101',
33
+ 'version'=>'8.8',
34
+ 'reportGroup'=>'Planets',
35
+ 'litleTxnId'=>'12345678000',
36
+ }
37
+ response= LitleOnlineRequest.new.echeck_void(hash)
38
+ assert_equal('Approved', response.echeckVoidResponse.message)
39
+ end
40
+ end
41
+ end
@@ -39,3 +39,4 @@ require_relative 'test_echeckRedeposit'
39
39
  require_relative 'test_echeckSale'
40
40
  require_relative 'test_echeckCredit'
41
41
  require_relative 'test_echeckVerification'
42
+ require_relative 'test_echeckVoid'
@@ -244,7 +244,7 @@ module LitleOnline
244
244
  #Explicit - used for integrations
245
245
  assert_equal 'ActiveMerchant;3.2', litle.send(:get_merchant_sdk, {'merchantSdk'=>'ActiveMerchant;3.2'})
246
246
  #Implicit - used raw when nothing is specified
247
- assert_equal 'Ruby;8.13.0', litle.send(:get_merchant_sdk, {'NotMerchantSdk'=>'ActiveMerchant;3.2'})
247
+ assert_equal 'Ruby;8.13.1', litle.send(:get_merchant_sdk, {'NotMerchantSdk'=>'ActiveMerchant;3.2'})
248
248
  end
249
249
 
250
250
 
@@ -0,0 +1,41 @@
1
+ =begin
2
+ Copyright (c) 2012 Litle & Co.
3
+
4
+ Permission is hereby granted, free of charge, to any person
5
+ obtaining a copy of this software and associated documentation
6
+ files (the "Software"), to deal in the Software without
7
+ restriction, including without limitation the rights to use,
8
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the
10
+ Software is furnished to do so, subject to the following
11
+ conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
+ OTHER DEALINGS IN THE SOFTWARE.
24
+ =end
25
+ require 'lib/LitleOnline'
26
+ require 'test/unit'
27
+
28
+ module LitleOnline
29
+ class Test_echeckVoid < Test::Unit::TestCase
30
+ def test_echeck_void
31
+ hash = {
32
+ 'merchantId' => '101',
33
+ 'version'=>'8.8',
34
+ 'reportGroup'=>'Planets',
35
+ 'litleTxnId'=>'123456',
36
+ }
37
+ LitleXmlMapper.expects(:request).with(regexp_matches(/.*<echeckVoid.*<litleTxnId>123456<\/litleTxnId>.*/m), is_a(Hash))
38
+ LitleOnlineRequest.new.echeck_void(hash)
39
+ end
40
+ end
41
+ end
data/test/unit/ts_unit.rb CHANGED
@@ -38,4 +38,5 @@ require_relative 'test_captureGivenAuth'
38
38
  require_relative 'test_echeckRedeposit'
39
39
  require_relative 'test_echeckSale'
40
40
  require_relative 'test_echeckCredit'
41
- require_relative 'test_echeckVerification'
41
+ require_relative 'test_echeckVerification'
42
+ require_relative 'test_echeckVoid'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: LitleOnline
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.13.0
4
+ version: 8.13.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-18 00:00:00.000000000Z
12
+ date: 2012-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: xml-object
16
- requirement: &11290160 !ruby/object:Gem::Requirement
16
+ requirement: &175847040 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *11290160
24
+ version_requirements: *175847040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: xml-mapping
27
- requirement: &11288320 !ruby/object:Gem::Requirement
27
+ requirement: &175846620 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *11288320
35
+ version_requirements: *175846620
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mocha
38
- requirement: &11287580 !ruby/object:Gem::Requirement
38
+ requirement: &175846200 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *11287580
46
+ version_requirements: *175846200
47
47
  description: ! 'Litle Online Ruby SDK created for version 8.13 of Litle XML online
48
48
  format, see the XSD schema for specific fields that are supported by this format.
49
49
 
@@ -76,6 +76,7 @@ files:
76
76
  - DESCRIPTION
77
77
  - CHANGELOG
78
78
  - test/unit/test_echeckVerification.rb
79
+ - test/unit/test_echeckVoid.rb
79
80
  - test/unit/test_token.rb
80
81
  - test/unit/test_capture.rb
81
82
  - test/unit/test_xmlfields.rb
@@ -91,6 +92,7 @@ files:
91
92
  - test/unit/test_credit.rb
92
93
  - test/unit/test_echeckCredit.rb
93
94
  - test/functional/test_echeckVerification.rb
95
+ - test/functional/test_echeckVoid.rb
94
96
  - test/functional/test_token.rb
95
97
  - test/functional/test_capture.rb
96
98
  - test/functional/ts_all.rb
@@ -132,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
134
  requirements:
133
135
  - Contact sdksupport@litle.com for more information
134
136
  rubyforge_project:
135
- rubygems_version: 1.8.17
137
+ rubygems_version: 1.8.15
136
138
  signing_key:
137
139
  specification_version: 3
138
140
  summary: Ruby SDK produced by Litle & Co. for online transaction processing using