activemerchant 1.85.0 → 1.86.0

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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +15 -3
  3. data/lib/active_merchant/billing/avs_result.rb +12 -12
  4. data/lib/active_merchant/billing/compatibility.rb +1 -2
  5. data/lib/active_merchant/billing/gateways/adyen.rb +1 -1
  6. data/lib/active_merchant/billing/gateways/authorize_net.rb +12 -0
  7. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +1 -2
  8. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +45 -22
  9. data/lib/active_merchant/billing/gateways/beanstream.rb +2 -2
  10. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -6
  11. data/lib/active_merchant/billing/gateways/beanstream_interac.rb +0 -1
  12. data/lib/active_merchant/billing/gateways/blue_pay.rb +1 -1
  13. data/lib/active_merchant/billing/gateways/braintree_blue.rb +6 -4
  14. data/lib/active_merchant/billing/gateways/bridge_pay.rb +3 -3
  15. data/lib/active_merchant/billing/gateways/card_connect.rb +6 -6
  16. data/lib/active_merchant/billing/gateways/card_save.rb +5 -6
  17. data/lib/active_merchant/billing/gateways/cardprocess.rb +4 -4
  18. data/lib/active_merchant/billing/gateways/cashnet.rb +4 -4
  19. data/lib/active_merchant/billing/gateways/cecabank.rb +1 -1
  20. data/lib/active_merchant/billing/gateways/checkout.rb +8 -8
  21. data/lib/active_merchant/billing/gateways/citrus_pay.rb +0 -1
  22. data/lib/active_merchant/billing/gateways/creditcall.rb +3 -3
  23. data/lib/active_merchant/billing/gateways/credorax.rb +1 -1
  24. data/lib/active_merchant/billing/gateways/ct_payment.rb +1 -1
  25. data/lib/active_merchant/billing/gateways/cyber_source.rb +5 -5
  26. data/lib/active_merchant/billing/gateways/efsnet.rb +9 -9
  27. data/lib/active_merchant/billing/gateways/elavon.rb +3 -5
  28. data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
  29. data/lib/active_merchant/billing/gateways/exact.rb +0 -1
  30. data/lib/active_merchant/billing/gateways/federated_canada.rb +0 -1
  31. data/lib/active_merchant/billing/gateways/finansbank.rb +0 -1
  32. data/lib/active_merchant/billing/gateways/first_giving.rb +0 -1
  33. data/lib/active_merchant/billing/gateways/first_pay.rb +3 -3
  34. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +7 -7
  35. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +6 -6
  36. data/lib/active_merchant/billing/gateways/garanti.rb +0 -1
  37. data/lib/active_merchant/billing/gateways/global_collect.rb +21 -6
  38. data/lib/active_merchant/billing/gateways/hdfc.rb +0 -1
  39. data/lib/active_merchant/billing/gateways/hps.rb +1 -1
  40. data/lib/active_merchant/billing/gateways/inspire.rb +0 -1
  41. data/lib/active_merchant/billing/gateways/instapay.rb +1 -2
  42. data/lib/active_merchant/billing/gateways/itransact.rb +0 -1
  43. data/lib/active_merchant/billing/gateways/jetpay.rb +1 -1
  44. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +1 -1
  45. data/lib/active_merchant/billing/gateways/linkpoint.rb +3 -3
  46. data/lib/active_merchant/billing/gateways/litle.rb +1 -1
  47. data/lib/active_merchant/billing/gateways/mercado_pago.rb +7 -1
  48. data/lib/active_merchant/billing/gateways/merchant_one.rb +0 -1
  49. data/lib/active_merchant/billing/gateways/mercury.rb +1 -1
  50. data/lib/active_merchant/billing/gateways/migs.rb +5 -5
  51. data/lib/active_merchant/billing/gateways/modern_payments.rb +0 -1
  52. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +0 -1
  53. data/lib/active_merchant/billing/gateways/money_movers.rb +0 -1
  54. data/lib/active_merchant/billing/gateways/mundipagg.rb +4 -4
  55. data/lib/active_merchant/billing/gateways/nab_transact.rb +8 -8
  56. data/lib/active_merchant/billing/gateways/net_registry.rb +1 -1
  57. data/lib/active_merchant/billing/gateways/netaxept.rb +0 -1
  58. data/lib/active_merchant/billing/gateways/netbanx.rb +4 -3
  59. data/lib/active_merchant/billing/gateways/netpay.rb +0 -1
  60. data/lib/active_merchant/billing/gateways/network_merchants.rb +0 -1
  61. data/lib/active_merchant/billing/gateways/omise.rb +1 -1
  62. data/lib/active_merchant/billing/gateways/opp.rb +0 -1
  63. data/lib/active_merchant/billing/gateways/optimal_payment.rb +20 -20
  64. data/lib/active_merchant/billing/gateways/orbital.rb +1 -1
  65. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +0 -1
  66. data/lib/active_merchant/billing/gateways/pagarme.rb +1 -1
  67. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +1 -1
  68. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +1 -1
  69. data/lib/active_merchant/billing/gateways/pay_secure.rb +0 -1
  70. data/lib/active_merchant/billing/gateways/payeezy.rb +1 -1
  71. data/lib/active_merchant/billing/gateways/payex.rb +2 -3
  72. data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +5 -1
  73. data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +2 -2
  74. data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +0 -1
  75. data/lib/active_merchant/billing/gateways/payflow_uk.rb +0 -1
  76. data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
  77. data/lib/active_merchant/billing/gateways/paymentez.rb +4 -4
  78. data/lib/active_merchant/billing/gateways/payscout.rb +1 -2
  79. data/lib/active_merchant/billing/gateways/psigate.rb +1 -1
  80. data/lib/active_merchant/billing/gateways/psl_card.rb +6 -6
  81. data/lib/active_merchant/billing/gateways/quickbooks.rb +2 -2
  82. data/lib/active_merchant/billing/gateways/quickpay.rb +0 -1
  83. data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +7 -8
  84. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +1 -2
  85. data/lib/active_merchant/billing/gateways/s5.rb +1 -1
  86. data/lib/active_merchant/billing/gateways/sage_pay.rb +5 -5
  87. data/lib/active_merchant/billing/gateways/sallie_mae.rb +0 -1
  88. data/lib/active_merchant/billing/gateways/secure_pay.rb +0 -1
  89. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +0 -1
  90. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +0 -1
  91. data/lib/active_merchant/billing/gateways/securion_pay.rb +5 -5
  92. data/lib/active_merchant/billing/gateways/smart_ps.rb +0 -1
  93. data/lib/active_merchant/billing/gateways/stripe.rb +1 -1
  94. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +4 -8
  95. data/lib/active_merchant/billing/gateways/telr.rb +2 -2
  96. data/lib/active_merchant/billing/gateways/transax.rb +4 -5
  97. data/lib/active_merchant/billing/gateways/transnational.rb +0 -1
  98. data/lib/active_merchant/billing/gateways/trexle.rb +6 -6
  99. data/lib/active_merchant/billing/gateways/trust_commerce.rb +5 -5
  100. data/lib/active_merchant/billing/gateways/usa_epay.rb +1 -1
  101. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +1 -1
  102. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +3 -2
  103. data/lib/active_merchant/billing/gateways/world_net.rb +3 -3
  104. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +15 -15
  105. data/lib/active_merchant/connection.rb +2 -2
  106. data/lib/active_merchant/network_connection_retries.rb +1 -1
  107. data/lib/active_merchant/posts_data.rb +2 -2
  108. data/lib/active_merchant/version.rb +1 -1
  109. data/lib/activemerchant.rb +1 -1
  110. data/lib/support/gateway_support.rb +0 -1
  111. metadata +2 -2
@@ -18,4 +18,3 @@ module ActiveMerchant #:nodoc:
18
18
  end
19
19
  end
20
20
  end
21
-
@@ -169,7 +169,7 @@ module ActiveMerchant #:nodoc:
169
169
  def build_token_request(credit_card, options)
170
170
  result = new_transaction
171
171
  add_credit_card(result, credit_card)
172
- add_amount(result, 100, options) #need to make an auth request for $1
172
+ add_amount(result, 100, options) # need to make an auth request for $1
173
173
  add_token_request(result, options)
174
174
  add_optional_elements(result, options)
175
175
  result
@@ -119,10 +119,10 @@ module ActiveMerchant #:nodoc:
119
119
  end
120
120
 
121
121
  def scrub(transcript)
122
- transcript
123
- .gsub(%r{(\\?"number\\?":)(\\?"[^"]+\\?")}, '\1[FILTERED]')
124
- .gsub(%r{(\\?"cvc\\?":)(\\?"[^"]+\\?")}, '\1[FILTERED]')
125
- .gsub(%r{(Auth-Token: )([A-Za-z0-9=]+)}, '\1[FILTERED]')
122
+ transcript.
123
+ gsub(%r{(\\?"number\\?":)(\\?"[^"]+\\?")}, '\1[FILTERED]').
124
+ gsub(%r{(\\?"cvc\\?":)(\\?"[^"]+\\?")}, '\1[FILTERED]').
125
+ gsub(%r{(Auth-Token: )([A-Za-z0-9=]+)}, '\1[FILTERED]')
126
126
  end
127
127
 
128
128
  private
@@ -102,7 +102,7 @@ module ActiveMerchant #:nodoc:
102
102
  end
103
103
 
104
104
  def parse(body)
105
- Hash[body.split('&').map{|x|x.split('=')}]
105
+ Hash[body.split('&').map{|x| x.split('=')}]
106
106
  end
107
107
 
108
108
  def commit(action, money, parameters)
@@ -158,4 +158,3 @@ module ActiveMerchant #:nodoc:
158
158
  end
159
159
  end
160
160
  end
161
-
@@ -104,7 +104,7 @@ module ActiveMerchant #:nodoc:
104
104
 
105
105
  Response.new(successful?(response), message_from(response), response,
106
106
  :test => test?,
107
- :authorization => build_authorization(response) ,
107
+ :authorization => build_authorization(response),
108
108
  :avs_result => { :code => response[:avsresult] },
109
109
  :cvv_result => response[:cardidresult]
110
110
  )
@@ -46,20 +46,20 @@ module ActiveMerchant
46
46
  'USD' => 840
47
47
  }
48
48
 
49
- #The terminal used - only for swipe transactions, so hard coded to 32 for online
49
+ # The terminal used - only for swipe transactions, so hard coded to 32 for online
50
50
  EMV_TERMINAL_TYPE = 32
51
51
 
52
- #Different Dispatch types
52
+ # Different Dispatch types
53
53
  DISPATCH_LATER = 'LATER'
54
54
  DISPATCH_NOW = 'NOW'
55
55
 
56
56
  # Return codes
57
57
  APPROVED = '00'
58
58
 
59
- #Nominal amount to authorize for a 'dispatch later' type
60
- #The nominal amount is held straight away, when the goods are ready
61
- #to be dispatched, PSL is informed and the full amount is the
62
- #taken.
59
+ # Nominal amount to authorize for a 'dispatch later' type
60
+ # The nominal amount is held straight away, when the goods are ready
61
+ # to be dispatched, PSL is informed and the full amount is the
62
+ # taken.
63
63
  NOMINAL_AMOUNT = 101
64
64
 
65
65
  AVS_CODE = {
@@ -118,7 +118,7 @@ module ActiveMerchant #:nodoc:
118
118
  end
119
119
 
120
120
  def add_address(post, options)
121
- return unless post[:card] && post[:card].kind_of?(Hash)
121
+ return unless post[:card]&.kind_of?(Hash)
122
122
 
123
123
  card_address = {}
124
124
  if address = options[:billing_address] || options[:address]
@@ -253,7 +253,7 @@ module ActiveMerchant #:nodoc:
253
253
 
254
254
  def success?(response)
255
255
  return FRAUD_WARNING_CODES.concat(['0']).include?(response['errors'].first['code']) if response['errors']
256
-
256
+
257
257
  !['DECLINED', 'CANCELLED'].include?(response['status'])
258
258
  end
259
259
 
@@ -23,4 +23,3 @@ module ActiveMerchant #:nodoc:
23
23
  end
24
24
  end
25
25
  end
26
-
@@ -1,4 +1,3 @@
1
-
2
1
  module QuickpayCommon
3
2
  MD5_CHECK_FIELDS = {
4
3
  3 => {
@@ -137,9 +136,9 @@ module QuickpayCommon
137
136
 
138
137
  :chstatus => %w(protocol msgtype merchant apikey)
139
138
  },
140
-
139
+
141
140
  10 => {
142
- :authorize => %w(mobile_number acquirer autofee customer_id extras
141
+ :authorize => %w(mobile_number acquirer autofee customer_id extras
143
142
  zero_auth customer_ip),
144
143
  :capture => %w( extras ),
145
144
  :cancel => %w( extras ),
@@ -149,7 +148,7 @@ module QuickpayCommon
149
148
  :recurring => %w(auto_capture autofee zero_auth)
150
149
  }
151
150
  }
152
-
151
+
153
152
  RESPONSE_CODES = {
154
153
  200 => 'OK',
155
154
  201 => 'Created',
@@ -164,18 +163,18 @@ module QuickpayCommon
164
163
  409 => 'Conflict',
165
164
  500 => 'Internal Server Error'
166
165
  }
167
-
166
+
168
167
  def self.included(base)
169
168
  base.default_currency = 'DKK'
170
169
  base.money_format = :cents
171
-
172
- base.supported_cardtypes = [:dankort, :forbrugsforeningen, :visa, :master,
170
+
171
+ base.supported_cardtypes = [:dankort, :forbrugsforeningen, :visa, :master,
173
172
  :american_express, :diners_club, :jcb, :maestro]
174
173
  base.supported_countries = ['DE', 'DK', 'ES', 'FI', 'FR', 'FO', 'GB', 'IS', 'NO', 'SE']
175
174
  base.homepage_url = 'http://quickpay.net/'
176
175
  base.display_name = 'QuickPay'
177
176
  end
178
-
177
+
179
178
  def expdate(credit_card)
180
179
  year = format(credit_card.year, :two_digits)
181
180
  month = format(credit_card.month, :two_digits)
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
6
6
  module Billing #:nodoc:
7
7
  class QuickpayV4to7Gateway < Gateway
8
8
  include QuickpayCommon
9
- self.live_url = self.test_url = 'https://secure.quickpay.dk/api'
9
+ self.live_url = self.test_url = 'https://secure.quickpay.dk/api'
10
10
  APPROVED = '000'
11
11
 
12
12
  # The login is the QuickpayId
@@ -224,4 +224,3 @@ module ActiveMerchant #:nodoc:
224
224
  end
225
225
  end
226
226
  end
227
-
@@ -136,7 +136,7 @@ module ActiveMerchant #:nodoc:
136
136
  xml.Holder "#{payment_method.first_name} #{payment_method.last_name}"
137
137
  xml.Brand payment_method.brand
138
138
  xml.Expiry(year: payment_method.year, month: payment_method.month)
139
- xml.Verification payment_method.verification_value
139
+ xml.Verification payment_method.verification_value
140
140
  end
141
141
  end
142
142
  end
@@ -52,8 +52,8 @@ module ActiveMerchant #:nodoc:
52
52
  OPTIONAL_REQUEST_FIELDS = {
53
53
  paypal_callback_url: :PayPalCallbackURL,
54
54
  basket: :Basket,
55
- gift_aid_payment: :GiftAidPayment ,
56
- apply_avscv2: :ApplyAVSCV2 ,
55
+ gift_aid_payment: :GiftAidPayment,
56
+ apply_avscv2: :ApplyAVSCV2,
57
57
  apply_3d_secure: :Apply3DSecure,
58
58
  account_type: :AccountType,
59
59
  billing_agreement: :BillingAgreement,
@@ -63,9 +63,9 @@ module ActiveMerchant #:nodoc:
63
63
  vendor_data: :VendorData,
64
64
  language: :Language,
65
65
  website: :Website,
66
- recipient_account_number: :FIRecipientAcctNumber ,
67
- recipient_surname: :FIRecipientSurname ,
68
- recipient_postcode: :FIRecipientPostcode ,
66
+ recipient_account_number: :FIRecipientAcctNumber,
67
+ recipient_surname: :FIRecipientSurname,
68
+ recipient_postcode: :FIRecipientPostcode,
69
69
  recipient_dob: :FIRecipientDoB
70
70
  }
71
71
 
@@ -140,4 +140,3 @@ module ActiveMerchant #:nodoc:
140
140
  end
141
141
  end
142
142
  end
143
-
@@ -198,4 +198,3 @@ module ActiveMerchant #:nodoc:
198
198
  end
199
199
  end
200
200
  end
201
-
@@ -238,7 +238,6 @@ module ActiveMerchant #:nodoc:
238
238
 
239
239
  def commit_periodic(request)
240
240
  my_request = build_periodic_request(request)
241
- #puts my_request
242
241
  response = parse(ssl_post(test? ? self.test_periodic_url : self.live_periodic_url, my_request))
243
242
 
244
243
  Response.new(success?(response), message_from(response), response,
@@ -102,4 +102,3 @@ module ActiveMerchant #:nodoc:
102
102
  end
103
103
  end
104
104
  end
105
-
@@ -73,11 +73,11 @@ module ActiveMerchant #:nodoc:
73
73
  def store(credit_card, options = {})
74
74
  if options[:customer_id].blank?
75
75
  MultiResponse.run() do |r|
76
- #create charge object
76
+ # create charge object
77
77
  r.process { authorize(100, credit_card, options) }
78
- #create customer and save card
78
+ # create customer and save card
79
79
  r.process { create_customer_add_card(r.authorization, options) }
80
- #void the charge
80
+ # void the charge
81
81
  r.process(:ignore_result) { void(r.params['metadata']['chargeId'], options) }
82
82
  end
83
83
  else
@@ -165,7 +165,7 @@ module ActiveMerchant #:nodoc:
165
165
  end
166
166
 
167
167
  def add_address(post, options)
168
- return unless post[:card] && post[:card].kind_of?(Hash)
168
+ return unless post[:card]&.kind_of?(Hash)
169
169
  if address = options[:billing_address]
170
170
  post[:card][:addressLine1] = address[:address1] if address[:address1]
171
171
  post[:card][:addressLine2] = address[:address2] if address[:address2]
@@ -257,7 +257,7 @@ module ActiveMerchant #:nodoc:
257
257
  end
258
258
 
259
259
  def test?
260
- (@options[:secret_key] && @options[:secret_key].include?('_test_'))
260
+ (@options[:secret_key]&.include?('_test_'))
261
261
  end
262
262
  end
263
263
  end
@@ -278,4 +278,3 @@ module ActiveMerchant #:nodoc:
278
278
  end
279
279
  end
280
280
  end
281
-
@@ -386,7 +386,7 @@ module ActiveMerchant #:nodoc:
386
386
  end
387
387
 
388
388
  def add_address(post, options)
389
- return unless post[:card] && post[:card].kind_of?(Hash)
389
+ return unless post[:card]&.kind_of?(Hash)
390
390
  if address = options[:billing_address] || options[:address]
391
391
  post[:card][:address_line1] = address[:address1] if address[:address1]
392
392
  post[:card][:address_line2] = address[:address2] if address[:address2]
@@ -6,10 +6,7 @@ module ActiveMerchant #:nodoc:
6
6
  TRANSACTION_APPROVED_MSG = 'Transaction approved'
7
7
  TRANSACTION_DECLINED_MSG = 'Transaction declined'
8
8
 
9
- LIVE_URLS = {
10
- 'NZ' => 'https://api.swipehq.com',
11
- 'CA' => 'https://api.swipehq.ca'
12
- }
9
+ self.live_url = 'https://api.swipehq.com'
13
10
  self.test_url = 'https://api.swipehq.com'
14
11
 
15
12
  TRANSACTION_API = '/createShopifyTransaction.php'
@@ -135,11 +132,11 @@ module ActiveMerchant #:nodoc:
135
132
 
136
133
  # ssl_post() returns the response body as a string on success,
137
134
  # or raises a ResponseError exception on failure
138
- JSON.parse(ssl_post(url(@options[:region], api), params.to_query))
135
+ JSON.parse(ssl_post(url(api), params.to_query))
139
136
  end
140
137
 
141
- def url(region, api)
142
- ((test? ? self.test_url : LIVE_URLS[region]) + api)
138
+ def url(api)
139
+ (test? ? self.test_url : self.live_url) + api
143
140
  end
144
141
 
145
142
  def build_error_response(message, params={})
@@ -153,4 +150,3 @@ module ActiveMerchant #:nodoc:
153
150
  end
154
151
  end
155
152
  end
156
-
@@ -214,7 +214,7 @@ module ActiveMerchant #:nodoc:
214
214
  response = {}
215
215
 
216
216
  doc = Nokogiri::XML(xml)
217
- doc.root.xpath('*').each do |node|
217
+ doc.root&.xpath('*')&.each do |node|
218
218
  if (node.elements.size == 0)
219
219
  response[node.name.downcase.to_sym] = node.text
220
220
  else
@@ -223,7 +223,7 @@ module ActiveMerchant #:nodoc:
223
223
  response[name.to_sym] = childnode.text
224
224
  end
225
225
  end
226
- end unless doc.root.nil?
226
+ end
227
227
 
228
228
  response
229
229
  end
@@ -4,20 +4,19 @@ module ActiveMerchant #:nodoc:
4
4
  module Billing #:nodoc:
5
5
  class TransaxGateway < SmartPs
6
6
  self.live_url = self.test_url = 'https://secure.nelixtransax.net/api/transact.php'
7
-
7
+
8
8
  # The countries the gateway supports merchants from as 2 digit ISO country codes
9
9
  self.supported_countries = ['US']
10
-
10
+
11
11
  # The card types supported by the payment gateway
12
12
  self.supported_cardtypes = [:visa, :master, :american_express, :discover]
13
-
13
+
14
14
  # The homepage URL of the gateway
15
15
  self.homepage_url = 'https://www.nelixtransax.com/'
16
-
16
+
17
17
  # The name of the gateway
18
18
  self.display_name = 'NELiX TransaX'
19
19
 
20
20
  end
21
21
  end
22
22
  end
23
-
@@ -7,4 +7,3 @@ module ActiveMerchant #:nodoc:
7
7
  end
8
8
  end
9
9
  end
10
-
@@ -154,21 +154,21 @@ module ActiveMerchant #:nodoc:
154
154
  result['X-Safe-Card'] = params[:safe_card] if params[:safe_card]
155
155
  result
156
156
  end
157
-
157
+
158
158
  def commit(method, action, params, options)
159
159
  url = "#{test? ? test_url : live_url}/#{action}"
160
160
  raw_response = ssl_request(method, url, post_data(params), headers(options))
161
161
  parsed_response = parse(raw_response)
162
- success_response(parsed_response)
162
+ success_response(parsed_response)
163
163
  rescue ResponseError => e
164
164
  error_response(parse(e.response.body))
165
165
  rescue JSON::ParserError
166
166
  unparsable_response(raw_response)
167
167
  end
168
-
168
+
169
169
  def success_response(body)
170
170
  return invalid_response unless body['response']
171
-
171
+
172
172
  response = body['response']
173
173
  Response.new(
174
174
  true,
@@ -195,7 +195,7 @@ module ActiveMerchant #:nodoc:
195
195
  message += " (The raw response returned by the API was #{raw_response.inspect})"
196
196
  return Response.new(false, message)
197
197
  end
198
-
198
+
199
199
  def invalid_response
200
200
  message = 'Invalid response.'
201
201
  return Response.new(false, message)
@@ -207,7 +207,7 @@ module ActiveMerchant #:nodoc:
207
207
 
208
208
  def parse(body)
209
209
  return {} if body.blank?
210
- JSON.parse(body)
210
+ JSON.parse(body)
211
211
  end
212
212
 
213
213
  def post_data(parameters = {})
@@ -19,10 +19,10 @@ module ActiveMerchant #:nodoc:
19
19
  # Next, create a credit card object using a TC approved test card.
20
20
  #
21
21
  # creditcard = ActiveMerchant::Billing::CreditCard.new(
22
- # :number => '4111111111111111',
23
- # :month => 8,
24
- # :year => 2006,
25
- # :first_name => 'Longbob',
22
+ # :number => '4111111111111111',
23
+ # :month => 8,
24
+ # :year => 2006,
25
+ # :first_name => 'Longbob',
26
26
  # :last_name => 'Longsen'
27
27
  # )
28
28
  #
@@ -353,7 +353,7 @@ module ActiveMerchant #:nodoc:
353
353
  params[:shipto_address2] = shipping_address[:address2] unless shipping_address[:address2].blank?
354
354
  params[:shipto_city] = shipping_address[:city] unless shipping_address[:city].blank?
355
355
  params[:shipto_state] = shipping_address[:state] unless shipping_address[:state].blank?
356
- params[:shipto_zip] = shipping_address[:zip] unless shipping_address[:zip].blank?
356
+ params[:shipto_zip] = shipping_address[:zip] unless shipping_address[:zip].blank?
357
357
  params[:shipto_country] = shipping_address[:country] unless shipping_address[:country].blank?
358
358
  end
359
359
  end
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
9
9
  self.abstract_class = true
10
10
 
11
11
  ##
12
- # Creates an instance of UsaEpayTransactionGateway by default, but if
12
+ # Creates an instance of UsaEpayTransactionGateway by default, but if
13
13
  # :software id or :live_url are passed in the options hash it will
14
14
  # create an instance of UsaEpayAdvancedGateway.
15
15
  #
@@ -1310,7 +1310,7 @@ module ActiveMerchant #:nodoc:
1310
1310
  if options[:payment_methods]
1311
1311
  length = options[:payment_methods].length
1312
1312
  soap.PaymentMethods 'SOAP-ENC:arrayType' => "ns1:PaymentMethod[#{length}]",
1313
- 'xsi:type' =>'ns1:PaymentMethodArray' do
1313
+ 'xsi:type' =>'ns1:PaymentMethodArray' do
1314
1314
  build_customer_payment_methods soap, options
1315
1315
  end
1316
1316
  end