authorizenet 1.9.4 → 1.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. data/lib/app/helpers/authorize_net_helper.rb +2 -3
  2. data/lib/authorize_net.rb +5 -5
  3. data/lib/authorize_net/addresses/address.rb +15 -19
  4. data/lib/authorize_net/addresses/shipping_address.rb +12 -16
  5. data/lib/authorize_net/aim/response.rb +27 -38
  6. data/lib/authorize_net/aim/transaction.rb +46 -65
  7. data/lib/authorize_net/api/api_transaction.rb +85 -90
  8. data/lib/authorize_net/api/constants.yml +1 -1
  9. data/lib/authorize_net/api/schema.rb +968 -936
  10. data/lib/authorize_net/api/transaction.rb +100 -102
  11. data/lib/authorize_net/arb/fields.rb +21 -21
  12. data/lib/authorize_net/arb/paging.rb +7 -11
  13. data/lib/authorize_net/arb/response.rb +7 -15
  14. data/lib/authorize_net/arb/sorting.rb +6 -10
  15. data/lib/authorize_net/arb/subscription.rb +27 -31
  16. data/lib/authorize_net/arb/subscription_detail.rb +1 -5
  17. data/lib/authorize_net/arb/subscription_list_response.rb +13 -20
  18. data/lib/authorize_net/arb/transaction.rb +50 -56
  19. data/lib/authorize_net/authorize_net.rb +20 -27
  20. data/lib/authorize_net/cim/customer_profile.rb +4 -8
  21. data/lib/authorize_net/cim/payment_profile.rb +10 -12
  22. data/lib/authorize_net/cim/response.rb +19 -24
  23. data/lib/authorize_net/cim/transaction.rb +168 -174
  24. data/lib/authorize_net/customer.rb +11 -14
  25. data/lib/authorize_net/email_receipt.rb +8 -12
  26. data/lib/authorize_net/fields.rb +483 -502
  27. data/lib/authorize_net/key_value_response.rb +54 -62
  28. data/lib/authorize_net/key_value_transaction.rb +87 -97
  29. data/lib/authorize_net/line_item.rb +10 -14
  30. data/lib/authorize_net/order.rb +21 -25
  31. data/lib/authorize_net/payment_methods/credit_card.rb +6 -7
  32. data/lib/authorize_net/payment_methods/echeck.rb +29 -31
  33. data/lib/authorize_net/reporting/batch.rb +4 -7
  34. data/lib/authorize_net/reporting/batch_statistics.rb +2 -6
  35. data/lib/authorize_net/reporting/fds_filter.rb +2 -5
  36. data/lib/authorize_net/reporting/response.rb +54 -60
  37. data/lib/authorize_net/reporting/returned_item.rb +11 -12
  38. data/lib/authorize_net/reporting/transaction.rb +27 -29
  39. data/lib/authorize_net/reporting/transaction_details.rb +3 -6
  40. data/lib/authorize_net/response.rb +6 -10
  41. data/lib/authorize_net/sim/hosted_payment_form.rb +16 -20
  42. data/lib/authorize_net/sim/hosted_receipt_page.rb +18 -23
  43. data/lib/authorize_net/sim/response.rb +24 -33
  44. data/lib/authorize_net/sim/transaction.rb +33 -43
  45. data/lib/authorize_net/transaction.rb +15 -21
  46. data/lib/authorize_net/xml_response.rb +36 -54
  47. data/lib/authorize_net/xml_transaction.rb +115 -134
  48. data/lib/generators/authorize_net/direct_post/direct_post_generator.rb +5 -6
  49. data/lib/generators/authorize_net/sim/sim_generator.rb +6 -7
  50. data/lib/generators/generator_extensions.rb +23 -25
  51. metadata +127 -81
  52. checksums.yaml +0 -7
@@ -1,25 +1,21 @@
1
1
  module AuthorizeNet
2
-
3
2
  # Models an line item.
4
3
  class LineItem
5
-
6
4
  include AuthorizeNet::Model
7
-
5
+
8
6
  attr_accessor :id, :name, :description, :quantity, :price, :taxable
9
-
7
+
10
8
  def to_hash
11
9
  hash = {
12
- :line_item_id => @id,
13
- :line_item_name => @name,
14
- :line_item_description => @description,
15
- :line_item_quantity => @quantity,
16
- :line_item_unit_price => @price,
17
- :line_item_taxable => @taxable
10
+ line_item_id: @id,
11
+ line_item_name: @name,
12
+ line_item_description: @description,
13
+ line_item_quantity: @quantity,
14
+ line_item_unit_price: @price,
15
+ line_item_taxable: @taxable
18
16
  }
19
- hash.delete_if {|k, v| v.nil?}
17
+ hash.delete_if { |_k, v| v.nil? }
20
18
  hash
21
19
  end
22
-
23
20
  end
24
-
25
- end
21
+ end
@@ -1,42 +1,38 @@
1
1
  module AuthorizeNet
2
-
3
2
  # Models an order.
4
3
  class Order
5
-
6
4
  include AuthorizeNet::Model
7
-
5
+
8
6
  attr_accessor :invoice_num, :description, :tax, :tax_name, :tax_description, :freight, :freight_name, :freight_description, :duty, :duty_name, :duty_description, :tax_exempt, :po_num, :line_items
9
-
7
+
10
8
  def add_line_item(id = nil, name = nil, description = nil, quantity = nil, price = nil, taxable = nil)
11
- if id.kind_of?(AuthorizeNet::LineItem)
9
+ if id.is_a?(AuthorizeNet::LineItem)
12
10
  line_item = id
13
11
  else
14
- line_item = AuthorizeNet::LineItem.new({:id => id, :name => name, :description => description, :quantity => quantity, :price => price, :taxable => taxable})
12
+ line_item = AuthorizeNet::LineItem.new(id: id, name: name, description: description, quantity: quantity, price: price, taxable: taxable)
15
13
  end
16
14
  @line_items = @line_items.to_a << line_item
17
15
  end
18
-
16
+
19
17
  def to_hash
20
18
  hash = {
21
- :invoice_num => @invoice_num,
22
- :description => @description,
23
- :tax => @tax,
24
- :tax_name => @tax_name,
25
- :tax_description => @tax_description,
26
- :freight => @freight,
27
- :freight_name => @freight_name,
28
- :freight_description => @freight_description,
29
- :duty => @duty,
30
- :duty_name => @duty_name,
31
- :duty_description => @duty_description,
32
- :tax_exempt => @tax_exempt,
33
- :po_num => @po_num,
34
- :line_items => handle_multivalue_hashing(@line_items)
19
+ invoice_num: @invoice_num,
20
+ description: @description,
21
+ tax: @tax,
22
+ tax_name: @tax_name,
23
+ tax_description: @tax_description,
24
+ freight: @freight,
25
+ freight_name: @freight_name,
26
+ freight_description: @freight_description,
27
+ duty: @duty,
28
+ duty_name: @duty_name,
29
+ duty_description: @duty_description,
30
+ tax_exempt: @tax_exempt,
31
+ po_num: @po_num,
32
+ line_items: handle_multivalue_hashing(@line_items)
35
33
  }
36
- hash.delete_if {|k, v| v.nil?}
34
+ hash.delete_if { |_k, v| v.nil? }
37
35
  hash
38
36
  end
39
-
40
37
  end
41
-
42
- end
38
+ end
@@ -1,8 +1,7 @@
1
1
  module AuthorizeNet
2
-
3
2
  # Defines constants for each payment method type.
4
3
  module PaymentMethodType
5
- CREDIT_CARD = 'CC'
4
+ CREDIT_CARD = 'CC'.freeze
6
5
  end
7
6
 
8
7
  # Models a credit card.
@@ -11,8 +10,8 @@ module AuthorizeNet
11
10
 
12
11
  # The option defaults for the constructor.
13
12
  @@option_defaults = {
14
- :card_code => nil,
15
- :card_type => nil
13
+ card_code: nil,
14
+ card_type: nil
16
15
  }
17
16
 
18
17
  attr_accessor :card_number, :expiration, :card_code, :card_type, :track_1, :track_2
@@ -47,15 +46,15 @@ module AuthorizeNet
47
46
  end
48
47
 
49
48
  def to_hash
50
- Hash.new.tap do |ch|
49
+ {}.tap do |ch|
51
50
  ch[:method] = PAYMENT_METHOD_CODE
52
51
  ch[:card_num] = @card_number
53
52
  ch[:exp_date] = @expiration
54
53
  ch[:card_code] = @card_code if @card_code
55
54
  ch[:track1] = @track_1.match(/(%|^)(.*?)(\?|$)/)[2] if @track_1
56
55
  ch[:track2] = @track_2.match(/(;|^)(.*?)(\?|$)/)[2] if @track_2
57
- #ch[:track1] = @track_1.match(/^%(?<fc>.)(?<p>[\d]{1,19}+)\^(?<n>.{2,26})\^(?<e>[\d]{0,4}|\^)(?<sc>[\d]{0,3}|\^)(?<dd>.*)\?\Z/) if @track_1
58
- #ch[:track2] = @track_2.match(/\A;(?<pan>[\d]{1,19}+)=(?<expiration>[\d]{0,4}|=)(?<service_code>[\d]{0,3}|=)(?<discretionary_data>.*)\?\Z/) if @track_2
56
+ # ch[:track1] = @track_1.match(/^%(?<fc>.)(?<p>[\d]{1,19}+)\^(?<n>.{2,26})\^(?<e>[\d]{0,4}|\^)(?<sc>[\d]{0,3}|\^)(?<dd>.*)\?\Z/) if @track_1
57
+ # ch[:track2] = @track_2.match(/\A;(?<pan>[\d]{1,19}+)=(?<expiration>[\d]{0,4}|=)(?<service_code>[\d]{0,3}|=)(?<discretionary_data>.*)\?\Z/) if @track_2
59
58
  end
60
59
  end
61
60
  end
@@ -1,42 +1,41 @@
1
1
  module AuthorizeNet
2
-
3
2
  # Defines constants for each payment method type.
4
3
  module PaymentMethodType
5
- ECHECK = 'ECHECK'
4
+ ECHECK = 'ECHECK'.freeze
6
5
  end
7
-
6
+
8
7
  # Models an eCheck.
9
8
  class ECheck
10
9
  PAYMENT_METHOD_CODE = AuthorizeNet::PaymentMethodType::ECHECK
11
-
10
+
12
11
  # Defines constants for each bank account type.
13
12
  module AccountType
14
- CHECKING = 'CHECKING'
15
- SAVINGS = 'SAVINGS'
16
- BUSINESS_CHECKING = 'BUSINESSCHECKING'
13
+ CHECKING = 'CHECKING'.freeze
14
+ SAVINGS = 'SAVINGS'.freeze
15
+ BUSINESS_CHECKING = 'BUSINESSCHECKING'.freeze
17
16
  end
18
-
17
+
19
18
  # Defines constants for each check type.
20
19
  module CheckType
21
- ACCOUNTS_RECEIVABLE_CONVERSION = 'ARC'
22
- BACK_OFFICE_CONVERSION = 'BOC'
23
- CASH_CONCENTRATION_DISBURSEMENT = 'CCD'
24
- PREARRANGED_PAYMENT_DEPOSIT = 'PPD'
25
- TELEPHONE_INITIATED = 'TEL'
26
- INTERNET_INITIATED = 'WEB'
20
+ ACCOUNTS_RECEIVABLE_CONVERSION = 'ARC'.freeze
21
+ BACK_OFFICE_CONVERSION = 'BOC'.freeze
22
+ CASH_CONCENTRATION_DISBURSEMENT = 'CCD'.freeze
23
+ PREARRANGED_PAYMENT_DEPOSIT = 'PPD'.freeze
24
+ TELEPHONE_INITIATED = 'TEL'.freeze
25
+ INTERNET_INITIATED = 'WEB'.freeze
27
26
  end
28
-
27
+
29
28
  # The option defaults for the constructor.
30
29
  @@option_defaults = {
31
- :echeck_type => CheckType::INTERNET_INITIATED,
32
- :check_number => nil,
33
- :account_type => AccountType::CHECKING
30
+ echeck_type: CheckType::INTERNET_INITIATED,
31
+ check_number: nil,
32
+ account_type: AccountType::CHECKING
34
33
  }
35
-
34
+
36
35
  attr_accessor :routing_number, :account_number, :bank_name, :account_holder_name, :echeck_type, :check_number, :account_type
37
-
36
+
38
37
  # Constructs a new eCheck object.
39
- #
38
+ #
40
39
  # +routing_number+:: The bank routing number as a string.
41
40
  # +account_number+:: The bank account number as a string.
42
41
  # +bank_name+:: The legal name of the bank. This should match the name associated with the +routing_number+.
@@ -53,20 +52,19 @@ module AuthorizeNet
53
52
  @check_number = options[:check_number]
54
53
  @account_type = options[:account_type]
55
54
  end
56
-
55
+
57
56
  def to_hash
58
57
  hash = {
59
- :method => PAYMENT_METHOD_CODE,
60
- :bank_aba_code => @routing_number,
61
- :bank_acct_num => @account_number,
62
- :bank_acct_type => @account_type,
63
- :bank_name => @bank_name,
64
- :bank_acct_name => @account_holder_name,
65
- :echeck_type => @echeck_type
58
+ method: PAYMENT_METHOD_CODE,
59
+ bank_aba_code: @routing_number,
60
+ bank_acct_num: @account_number,
61
+ bank_acct_type: @account_type,
62
+ bank_name: @bank_name,
63
+ bank_acct_name: @account_holder_name,
64
+ echeck_type: @echeck_type
66
65
  }
67
66
  hash[:bank_check_number] = @check_number unless @check_number.nil?
68
67
  hash
69
68
  end
70
69
  end
71
-
72
- end
70
+ end
@@ -1,19 +1,16 @@
1
1
  module AuthorizeNet::Reporting
2
-
3
2
  # Models a batch of credit cards.
4
3
  class Batch
5
-
6
4
  include AuthorizeNet::Model
7
-
5
+
8
6
  attr_accessor :id, :settled_at, :state, :statistics, :payment_method
9
-
7
+
10
8
  def settled_at=(time)
11
- if time.kind_of?(DateTime)
9
+ if time.is_a?(DateTime)
12
10
  @settled_at = time
13
11
  else
14
12
  @settled_at = DateTime.parse(time.to_s)
15
13
  end
16
14
  end
17
15
  end
18
-
19
- end
16
+ end
@@ -1,10 +1,8 @@
1
1
  module AuthorizeNet::Reporting
2
-
3
2
  # Models a batch of credit cards.
4
3
  class BatchStatistics
5
-
6
4
  include AuthorizeNet::Model
7
-
5
+
8
6
  attr_accessor :account_type, :charge_count, :charge_amount, :refund_count,
9
7
  :refund_amount, :void_count, :decline_count, :error_count,
10
8
  :returned_item_amount, :returned_item_count, :chargeback_count,
@@ -13,7 +11,5 @@ module AuthorizeNet::Reporting
13
11
  :refund_chargeback_count, :charge_returned_items_amount,
14
12
  :charge_returned_items_count, :refund_returned_items_amount,
15
13
  :refund_returned_items_count
16
-
17
14
  end
18
-
19
- end
15
+ end
@@ -1,11 +1,8 @@
1
1
  module AuthorizeNet::Reporting
2
-
3
2
  # Models a fraud detection filter.
4
3
  class FDSFilter
5
-
6
4
  include AuthorizeNet::Model
7
-
5
+
8
6
  attr_accessor :name, :action
9
7
  end
10
-
11
- end
8
+ end
@@ -1,10 +1,8 @@
1
1
  module AuthorizeNet::Reporting
2
-
3
2
  # The CIM response class.
4
3
  class Response < AuthorizeNet::XmlResponse
5
-
6
4
  include AuthorizeNet::CIM::Fields
7
-
5
+
8
6
  # Constructs a new response object from raw_response in the context of transaction.
9
7
  # You don‘t typically construct this object yourself, as AuthorizeNet::Reeporting::Transaction
10
8
  # will build one for you when it makes the request to the gateway.
@@ -15,13 +13,12 @@ module AuthorizeNet::Reporting
15
13
  @batch_list = @root.at_css('batchList')
16
14
  @transactions = @root.at_css('transactions')
17
15
  @transaction = @root.at_css('transaction')
18
- rescue
19
- @raw_response = $!
16
+ rescue StandardError
17
+ @raw_response = $ERROR_INFO
20
18
  end
21
19
  end
22
20
  end
23
-
24
-
21
+
25
22
  # Returns an Array of Batch objects built from the entities returned in the response. Returns nil if no batchList was returned.
26
23
  def batch_list
27
24
  unless @batch_list.nil?
@@ -29,104 +26,102 @@ module AuthorizeNet::Reporting
29
26
  @batch_list.element_children.each do |child|
30
27
  batches <<= build_entity(child, Fields::BATCH_ENTITY_DESCRIPTION) unless child.nil?
31
28
  end
32
- return batches unless batches.length == 0
29
+ return batches unless batches.empty?
33
30
  end
34
31
  end
35
-
32
+
36
33
  # Returns an Array of TransactionDetail objects built from the entities returned in the response. Returns nil if no transactions were returned.
37
34
  def transactions
38
35
  unless @transactions.nil?
39
36
  transactions = []
40
37
  @transactions.element_children.each do |child|
41
- unless child.nil?
42
- transaction = build_entity(child, Fields::TRANSACTION_DETAILS_ENTITY_DESCRIPTION)
43
-
44
- # handle some stuff thats too tricky for EntityDecription to handle
45
- first_name = node_content_unless_nil(child.at_css('firstName'))
46
- last_name = node_content_unless_nil(child.at_css('lastName'))
47
- unless first_name.nil? && last_name.nil?
48
- address = AuthorizeNet::Address.new(:first_name => first_name, :last_name => last_name)
49
- transaction.customer = AuthorizeNet::Customer.new(:address => address)
50
- end
51
- invoice_number = node_content_unless_nil(child.at_css('invoiceNumber'))
52
- unless invoice_number.nil?
53
- transaction.order = AuthorizeNet::Order.new(:invoice_num => invoice_number)
54
- end
55
- subscription = child.at_css('subscription')
56
- unless subscription.nil?
57
- subscription_id = node_content_unless_nil(child.at_css('subscription').at_css('id'))
58
- transaction.subscription_id = subscription_id unless subscription_id.nil?
59
-
60
- pay_num = node_content_unless_nil(child.at_css('subscription').at_css('payNum'))
61
- transaction.subscription_paynum = pay_num unless pay_num.nil?
62
- end
63
-
64
-
65
- transactions <<= transaction
38
+ next if child.nil?
39
+ transaction = build_entity(child, Fields::TRANSACTION_DETAILS_ENTITY_DESCRIPTION)
40
+
41
+ # handle some stuff thats too tricky for EntityDecription to handle
42
+ first_name = node_content_unless_nil(child.at_css('firstName'))
43
+ last_name = node_content_unless_nil(child.at_css('lastName'))
44
+ unless first_name.nil? && last_name.nil?
45
+ address = AuthorizeNet::Address.new(first_name: first_name, last_name: last_name)
46
+ transaction.customer = AuthorizeNet::Customer.new(address: address)
66
47
  end
48
+ invoice_number = node_content_unless_nil(child.at_css('invoiceNumber'))
49
+ unless invoice_number.nil?
50
+ transaction.order = AuthorizeNet::Order.new(invoice_num: invoice_number)
51
+ end
52
+ subscription = child.at_css('subscription')
53
+ unless subscription.nil?
54
+ subscription_id = node_content_unless_nil(child.at_css('subscription').at_css('id'))
55
+ transaction.subscription_id = subscription_id unless subscription_id.nil?
56
+
57
+ pay_num = node_content_unless_nil(child.at_css('subscription').at_css('payNum'))
58
+ transaction.subscription_paynum = pay_num unless pay_num.nil?
59
+ end
60
+
61
+ transactions <<= transaction
67
62
  end
68
- return transactions unless transactions.length == 0
63
+ return transactions unless transactions.empty?
69
64
  end
70
65
  end
71
-
66
+
72
67
  # Builds and returns a TransactionDetail entity built from the response. If no transaction was found, returns nil.
73
68
  def transaction
74
69
  unless @transaction.nil?
75
70
  transaction = build_entity(@transaction, Fields::TRANSACTION_DETAILS_ENTITY_DESCRIPTION)
76
-
71
+
77
72
  ip = node_content_unless_nil(@transaction.at_css('customerIP'))
78
73
  unless ip.nil?
79
- transaction.customer ||= AuthorizeNet::CIM::CustomerProfile.new()
74
+ transaction.customer ||= AuthorizeNet::CIM::CustomerProfile.new
80
75
  transaction.customer.ip = ip
81
76
  end
82
-
77
+
83
78
  tax_exempt = node_content_unless_nil(@transaction.at_css('taxExempt'))
84
79
  unless tax_exempt.nil?
85
- transaction.order ||= AuthorizeNet::Order.new()
80
+ transaction.order ||= AuthorizeNet::Order.new
86
81
  transaction.order.tax_exempt = value_to_boolean(tax_exempt)
87
82
  end
88
-
83
+
89
84
  tax = @transaction.at_css('tax')
90
85
  unless tax.nil?
91
- transaction.order ||= AuthorizeNet::Order.new()
86
+ transaction.order ||= AuthorizeNet::Order.new
92
87
  tax_amount = node_content_unless_nil(tax.at_css('amount'))
93
- transaction.order.tax_amount = value_to_decimal(tax_amount) unless tax_amount.nil?
88
+ transaction.order.tax = value_to_decimal(tax_amount) unless tax_amount.nil?
94
89
  transaction.order.tax_name = node_content_unless_nil(tax.at_css('name'))
95
90
  transaction.order.tax_description = node_content_unless_nil(tax.at_css('description'))
96
91
  end
97
-
92
+
98
93
  shipping = @transaction.at_css('shipping')
99
94
  unless shipping.nil?
100
- transaction.order ||= AuthorizeNet::Order.new()
95
+ transaction.order ||= AuthorizeNet::Order.new
101
96
  shipping_amount = node_content_unless_nil(shipping.at_css('amount'))
102
- transaction.order.shipping_amount = value_to_decimal(shipping_amount) unless shipping_amount.nil?
103
- transaction.order.shipping_name = node_content_unless_nil(shipping.at_css('name'))
104
- transaction.order.shipping_description = node_content_unless_nil(shipping.at_css('description'))
97
+ transaction.order.freight = value_to_decimal(shipping_amount) unless shipping_amount.nil?
98
+ transaction.order.freight_name = node_content_unless_nil(shipping.at_css('name'))
99
+ transaction.order.freight_description = node_content_unless_nil(shipping.at_css('description'))
105
100
  end
106
-
101
+
107
102
  duty = @transaction.at_css('duty')
108
103
  unless duty.nil?
109
- transaction.order ||= AuthorizeNet::Order.new()
104
+ transaction.order ||= AuthorizeNet::Order.new
110
105
  duty_amount = node_content_unless_nil(duty.at_css('amount'))
111
- transaction.order.duty_amount = value_to_decimal(duty_amount) unless duty_amount.nil?
106
+ transaction.order.duty = value_to_decimal(duty_amount) unless duty_amount.nil?
112
107
  transaction.order.duty_name = node_content_unless_nil(duty.at_css('name'))
113
108
  transaction.order.duty_description = node_content_unless_nil(duty.at_css('description'))
114
109
  end
115
-
110
+
116
111
  line_items = @transaction.at_css('lineItems')
117
112
  unless line_items.nil?
118
- transaction.order ||= AuthorizeNet::Order.new()
113
+ transaction.order ||= AuthorizeNet::Order.new
119
114
  line_items.element_children.each do |child|
120
115
  line_item = build_entity(child, Fields::LINE_ITEM_ENTITY_DESCRIPTION)
121
116
  transaction.order.add_line_item(line_item)
122
117
  end
123
118
  end
124
-
119
+
125
120
  # Really not sure what to do with customer type here. It should go on a payment
126
121
  customer_type = node_content_unless_nil(@transaction.at_css('customer type'))
127
122
  unless customer_type.nil?
128
- transaction.customer ||= AuthorizeNet::CIM::CustomerProfile.new()
129
- transaction.customer.payment_profiles = [AuthorizeNet::CIM::PaymentProfile.new(:cust_type => customer_type)]
123
+ transaction.customer ||= AuthorizeNet::CIM::CustomerProfile.new
124
+ transaction.customer.payment_profiles = [AuthorizeNet::CIM::PaymentProfile.new(cust_type: customer_type)]
130
125
  end
131
126
 
132
127
  subscription = @transaction.at_css('subscription')
@@ -141,7 +136,7 @@ module AuthorizeNet::Reporting
141
136
  solution = @transaction.at_css('solution')
142
137
  unless solution.nil?
143
138
  solution_id = node_content_unless_nil(@transaction.at_css('solution').at_css('id'))
144
- transaction.solution_id = value_to_decimal(solution_id) unless solution_id.nil?
139
+ transaction.solution_id = solution_id unless solution_id.nil?
145
140
 
146
141
  transaction.solution_name = node_content_unless_nil(@transaction.at_css('solution').at_css('name'))
147
142
  end
@@ -155,9 +150,8 @@ module AuthorizeNet::Reporting
155
150
  end
156
151
  end
157
152
 
158
- return transaction
153
+ transaction
159
154
  end
160
155
  end
161
-
162
156
  end
163
- end
157
+ end