johnideal-activemerchant 1.4.6 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.6
1
+ 1.4.7
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{activemerchant}
5
- s.version = "1.4.6"
5
+ s.version = "1.4.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Tobias Luetke"]
9
- s.date = %q{2009-08-31}
9
+ s.date = %q{2009-09-03}
10
10
  s.email = %q{tobi@leetsoft.com}
11
11
  s.extra_rdoc_files = [
12
12
  "README"
@@ -59,6 +59,14 @@ class PaymentechOrbitalResponse
59
59
  @cvv_result ||= CVVResult.new({:code => cvv2_result_code})
60
60
  end
61
61
 
62
+ def to_xml
63
+ unless @_xml
64
+ @_xml = ""
65
+ doc.write(@_xml, 2)
66
+ end
67
+ @_xml
68
+ end
69
+
62
70
  private
63
71
  def tagify(s)
64
72
  s.to_s.gsub(/\/(.?)/) {
@@ -55,7 +55,9 @@ module ActiveMerchant #:nodoc:
55
55
  "Request-number" => "1",
56
56
  "Document-type" => "Request"
57
57
  }
58
-
58
+
59
+ attr_reader :request, :response
60
+
59
61
  def initialize(options = {})
60
62
  requires!(options, :login, :password, :merchant_id, :bin, :terminal_id)
61
63
  @options = options.merge({
@@ -66,39 +68,39 @@ module ActiveMerchant #:nodoc:
66
68
  end
67
69
 
68
70
  def authorize(money, credit_card=nil, options = {})
69
- request = NewOrderRequest.new("A", money, credit_card, options.merge(@options))
71
+ @request = NewOrderRequest.new("A", money, credit_card, options.merge(@options))
70
72
 
71
- commit('authonly', request)
73
+ commit('authonly', @request)
72
74
  end
73
75
 
74
76
  def purchase(money, credit_card=nil, options = {})
75
- request = NewOrderRequest.new("AC", money, credit_card, options.merge(@options))
77
+ @request = NewOrderRequest.new("AC", money, credit_card, options.merge(@options))
76
78
 
77
- commit('sale', request)
79
+ commit('sale', @request)
78
80
  end
79
-
81
+
80
82
  def refund(money, credit_card=nil, options={})
81
- request = NewOrderRequest.new("R", money, credit_card, options.merge(@options))
83
+ @request = NewOrderRequest.new("R", money, credit_card, options.merge(@options))
82
84
 
83
- commit('refund', request)
85
+ commit('refund', @request)
84
86
  end
85
87
 
86
88
  def profile(action, credit_card=nil, options={})
87
- request = ProfileManagementRequest.new(action, credit_card, options.merge(@options))
89
+ @request = ProfileManagementRequest.new(action, credit_card, options.merge(@options))
88
90
 
89
- commit("profile-#{action}", request)
91
+ commit("profile-#{action}", @request)
90
92
  end
91
-
93
+
92
94
  def void(tx_ref_num, tx_ref_idx, money=nil, options={})
93
- request = VoidRequest.new(tx_ref_num, tx_ref_idx, money, options.merge(@options))
95
+ @request = VoidRequest.new(tx_ref_num, tx_ref_idx, money, options.merge(@options))
94
96
 
95
- commit('void', request)
97
+ commit('void', @request)
96
98
  end
97
99
 
98
100
  def end_of_day(options={})
99
- request = EndOfDayRequest.new(options.merge(@options))
101
+ @request = EndOfDayRequest.new(options.merge(@options))
100
102
 
101
- commit('end of day', request)
103
+ commit('end of day', @request)
102
104
  end
103
105
 
104
106
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: johnideal-activemerchant
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-31 00:00:00 -07:00
12
+ date: 2009-09-03 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -328,6 +328,7 @@ files:
328
328
  - test/unit/validateable_test.rb
329
329
  has_rdoc: false
330
330
  homepage: http://activemerchant.org/
331
+ licenses:
331
332
  post_install_message:
332
333
  rdoc_options:
333
334
  - --charset=UTF-8
@@ -348,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
348
349
  requirements: []
349
350
 
350
351
  rubyforge_project:
351
- rubygems_version: 1.2.0
352
+ rubygems_version: 1.3.5
352
353
  signing_key:
353
354
  specification_version: 3
354
355
  summary: Framework and tools for dealing with credit card transactions.