activemerchant 1.109.0 → 1.114.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +47 -1
  3. data/README.md +2 -2
  4. data/lib/active_merchant/billing/credit_card.rb +1 -1
  5. data/lib/active_merchant/billing/credit_card_methods.rb +1 -1
  6. data/lib/active_merchant/billing/gateway.rb +1 -1
  7. data/lib/active_merchant/billing/gateways/adyen.rb +17 -6
  8. data/lib/active_merchant/billing/gateways/authorize_net.rb +6 -6
  9. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +1 -1
  10. data/lib/active_merchant/billing/gateways/balanced.rb +1 -1
  11. data/lib/active_merchant/billing/gateways/bambora_apac.rb +1 -1
  12. data/lib/active_merchant/billing/gateways/bank_frick.rb +1 -1
  13. data/lib/active_merchant/billing/gateways/blue_snap.rb +74 -16
  14. data/lib/active_merchant/billing/gateways/borgun.rb +1 -1
  15. data/lib/active_merchant/billing/gateways/braintree_blue.rb +7 -7
  16. data/lib/active_merchant/billing/gateways/cardknox.rb +1 -1
  17. data/lib/active_merchant/billing/gateways/cenpos.rb +1 -1
  18. data/lib/active_merchant/billing/gateways/checkout_v2.rb +1 -1
  19. data/lib/active_merchant/billing/gateways/credorax.rb +7 -1
  20. data/lib/active_merchant/billing/gateways/culqi.rb +1 -1
  21. data/lib/active_merchant/billing/gateways/cyber_source.rb +53 -16
  22. data/lib/active_merchant/billing/gateways/decidir.rb +1 -1
  23. data/lib/active_merchant/billing/gateways/digitzs.rb +1 -1
  24. data/lib/active_merchant/billing/gateways/efsnet.rb +1 -1
  25. data/lib/active_merchant/billing/gateways/element.rb +4 -0
  26. data/lib/active_merchant/billing/gateways/eway_rapid.rb +2 -2
  27. data/lib/active_merchant/billing/gateways/ezic.rb +1 -1
  28. data/lib/active_merchant/billing/gateways/fat_zebra.rb +5 -3
  29. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +8 -0
  30. data/lib/active_merchant/billing/gateways/flo2cash.rb +1 -1
  31. data/lib/active_merchant/billing/gateways/global_collect.rb +5 -0
  32. data/lib/active_merchant/billing/gateways/hdfc.rb +1 -1
  33. data/lib/active_merchant/billing/gateways/hps.rb +9 -6
  34. data/lib/active_merchant/billing/gateways/ipp.rb +2 -2
  35. data/lib/active_merchant/billing/gateways/iridium.rb +2 -2
  36. data/lib/active_merchant/billing/gateways/linkpoint.rb +1 -1
  37. data/lib/active_merchant/billing/gateways/litle.rb +1 -1
  38. data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
  39. data/lib/active_merchant/billing/gateways/mercado_pago.rb +1 -1
  40. data/lib/active_merchant/billing/gateways/netbanx.rb +8 -2
  41. data/lib/active_merchant/billing/gateways/openpay.rb +1 -1
  42. data/lib/active_merchant/billing/gateways/opp.rb +3 -3
  43. data/lib/active_merchant/billing/gateways/optimal_payment.rb +1 -1
  44. data/lib/active_merchant/billing/gateways/orbital.rb +8 -1
  45. data/lib/active_merchant/billing/gateways/pagarme.rb +1 -1
  46. data/lib/active_merchant/billing/gateways/pay_junction.rb +2 -2
  47. data/lib/active_merchant/billing/gateways/payeezy.rb +3 -3
  48. data/lib/active_merchant/billing/gateways/payex.rb +5 -5
  49. data/lib/active_merchant/billing/gateways/payflow.rb +3 -0
  50. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -1
  51. data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
  52. data/lib/active_merchant/billing/gateways/paymill.rb +3 -3
  53. data/lib/active_merchant/billing/gateways/payu_latam.rb +4 -1
  54. data/lib/active_merchant/billing/gateways/plugnpay.rb +1 -1
  55. data/lib/active_merchant/billing/gateways/psigate.rb +1 -1
  56. data/lib/active_merchant/billing/gateways/qbms.rb +3 -3
  57. data/lib/active_merchant/billing/gateways/quickbooks.rb +3 -2
  58. data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
  59. data/lib/active_merchant/billing/gateways/realex.rb +1 -0
  60. data/lib/active_merchant/billing/gateways/redsys.rb +3 -3
  61. data/lib/active_merchant/billing/gateways/sage_pay.rb +4 -4
  62. data/lib/active_merchant/billing/gateways/skip_jack.rb +1 -1
  63. data/lib/active_merchant/billing/gateways/stripe.rb +2 -2
  64. data/lib/active_merchant/billing/gateways/telr.rb +1 -1
  65. data/lib/active_merchant/billing/gateways/trans_first.rb +1 -1
  66. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +2 -2
  67. data/lib/active_merchant/billing/gateways/trust_commerce.rb +7 -7
  68. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +4 -4
  69. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +1 -1
  70. data/lib/active_merchant/billing/gateways/worldpay_us.rb +2 -2
  71. data/lib/active_merchant/version.rb +1 -1
  72. metadata +16 -2
@@ -248,7 +248,7 @@ module ActiveMerchant #:nodoc:
248
248
  add_pair(post, :BillingAddress1, truncate(billing_address[:address1], 100))
249
249
  add_pair(post, :BillingAddress2, truncate(billing_address[:address2], 100))
250
250
  add_pair(post, :BillingCity, truncate(billing_address[:city], 40))
251
- add_pair(post, :BillingState, truncate(billing_address[:state], 2)) if is_usa(billing_address[:country])
251
+ add_pair(post, :BillingState, truncate(billing_address[:state], 2)) if usa?(billing_address[:country])
252
252
  add_pair(post, :BillingCountry, truncate(billing_address[:country], 2))
253
253
  add_pair(post, :BillingPhone, sanitize_phone(billing_address[:phone]))
254
254
  add_pair(post, :BillingPostCode, truncate(billing_address[:zip], 10))
@@ -261,7 +261,7 @@ module ActiveMerchant #:nodoc:
261
261
  add_pair(post, :DeliveryAddress1, truncate(shipping_address[:address1], 100))
262
262
  add_pair(post, :DeliveryAddress2, truncate(shipping_address[:address2], 100))
263
263
  add_pair(post, :DeliveryCity, truncate(shipping_address[:city], 40))
264
- add_pair(post, :DeliveryState, truncate(shipping_address[:state], 2)) if is_usa(shipping_address[:country])
264
+ add_pair(post, :DeliveryState, truncate(shipping_address[:state], 2)) if usa?(shipping_address[:country])
265
265
  add_pair(post, :DeliveryCountry, truncate(shipping_address[:country], 2))
266
266
  add_pair(post, :DeliveryPhone, sanitize_phone(shipping_address[:phone]))
267
267
  add_pair(post, :DeliveryPostCode, truncate(shipping_address[:zip], 10))
@@ -317,7 +317,7 @@ module ActiveMerchant #:nodoc:
317
317
  truncate(cleansed, 20)
318
318
  end
319
319
 
320
- def is_usa(country)
320
+ def usa?(country)
321
321
  truncate(country, 2) == 'US'
322
322
  end
323
323
 
@@ -351,7 +351,7 @@ module ActiveMerchant #:nodoc:
351
351
  authorization: authorization_from(response, parameters, action),
352
352
  avs_result: {
353
353
  street_match: AVS_CODE[response['AddressResult']],
354
- postal_match: AVS_CODE[response['PostCodeResult']],
354
+ postal_match: AVS_CODE[response['PostCodeResult']]
355
355
  },
356
356
  cvv_result: CVV_CODE[response['CV2Result']]
357
357
  )
@@ -51,7 +51,7 @@ module ActiveMerchant #:nodoc:
51
51
  'W' => '9-digit zip/postal code matches billing information, street address does not',
52
52
  'X' => 'Street address and 9-digit zip/postal code matches billing information',
53
53
  'Y' => 'Street address and 5-digit zip/postal code matches billing information',
54
- 'Z' => '5-digit zip/postal code matches billing information, street address does not',
54
+ 'Z' => '5-digit zip/postal code matches billing information, street address does not'
55
55
  }
56
56
 
57
57
  CHANGE_STATUS_ERROR_MESSAGES = {
@@ -53,7 +53,7 @@ module ActiveMerchant #:nodoc:
53
53
 
54
54
  BANK_ACCOUNT_HOLDER_TYPE_MAPPING = {
55
55
  'personal' => 'individual',
56
- 'business' => 'company',
56
+ 'business' => 'company'
57
57
  }
58
58
 
59
59
  MINIMUM_AUTHORIZE_AMOUNTS = {
@@ -755,7 +755,7 @@ module ActiveMerchant #:nodoc:
755
755
  currency: 'usd',
756
756
  routing_number: bank_account.routing_number,
757
757
  name: bank_account.name,
758
- account_holder_type: account_holder_type,
758
+ account_holder_type: account_holder_type
759
759
  }
760
760
  }
761
761
 
@@ -17,7 +17,7 @@ module ActiveMerchant #:nodoc:
17
17
  'Y' => 'M',
18
18
  'N' => 'N',
19
19
  'X' => 'P',
20
- 'E' => 'U',
20
+ 'E' => 'U'
21
21
  }
22
22
 
23
23
  AVS_CODE_TRANSLATOR = {
@@ -18,7 +18,7 @@ module ActiveMerchant #:nodoc:
18
18
  purchase_echeck: 'ACHDebit',
19
19
  refund: 'CreditCardCredit',
20
20
  refund_echeck: 'ACHVoidTransaction',
21
- void: 'CreditCardAutoRefundorVoid',
21
+ void: 'CreditCardAutoRefundorVoid'
22
22
  }
23
23
 
24
24
  ENDPOINTS = {
@@ -152,7 +152,7 @@ module ActiveMerchant #:nodoc:
152
152
  'R1' => 'The transaction was declined or returned, because the cardholder requested that payment of all recurring or installment payment transactions for a specific merchant account be stopped/ Reserved for client-specific use (declined)',
153
153
  'Q1' => 'Card Authentication failed/ Reserved for client-specific use (declined)',
154
154
  'XA' => 'Forward to Issuer/ Reserved for client-specific use (declined)',
155
- 'XD' => 'Forward to Issuer/ Reserved for client-specific use (declined)',
155
+ 'XD' => 'Forward to Issuer/ Reserved for client-specific use (declined)'
156
156
  }
157
157
 
158
158
  EXTENDED_RESPONSE_MESSAGES = {
@@ -179,7 +179,7 @@ module ActiveMerchant #:nodoc:
179
179
  refund_echeck: 16,
180
180
  void_echeck: 16,
181
181
 
182
- wallet_sale: 14,
182
+ wallet_sale: 14
183
183
  }
184
184
 
185
185
  def initialize(options={})
@@ -151,7 +151,7 @@ module ActiveMerchant #:nodoc:
151
151
 
152
152
  def authorize(money, creditcard_or_billing_id, options = {})
153
153
  parameters = {
154
- amount: amount(money),
154
+ amount: amount(money)
155
155
  }
156
156
 
157
157
  add_order_id(parameters, options)
@@ -168,7 +168,7 @@ module ActiveMerchant #:nodoc:
168
168
  # to process a purchase are an amount in cents or a money object and a creditcard object or billingid string.
169
169
  def purchase(money, creditcard_or_billing_id, options = {})
170
170
  parameters = {
171
- amount: amount(money),
171
+ amount: amount(money)
172
172
  }
173
173
 
174
174
  add_order_id(parameters, options)
@@ -188,7 +188,7 @@ module ActiveMerchant #:nodoc:
188
188
  transaction_id, = split_authorization(authorization)
189
189
  parameters = {
190
190
  amount: amount(money),
191
- transid: transaction_id,
191
+ transid: transaction_id
192
192
  }
193
193
  add_aggregator(parameters, options)
194
194
  add_custom_fields(parameters, options)
@@ -239,7 +239,7 @@ module ActiveMerchant #:nodoc:
239
239
  action = (VOIDABLE_ACTIONS - ['preauth']).include?(original_action) ? 'void' : 'reversal'
240
240
 
241
241
  parameters = {
242
- transid: transaction_id,
242
+ transid: transaction_id
243
243
  }
244
244
 
245
245
  add_aggregator(parameters, options)
@@ -285,7 +285,7 @@ module ActiveMerchant #:nodoc:
285
285
  cycle: cycle,
286
286
  verify: options[:verify] || 'y',
287
287
  billingid: options[:billingid] || nil,
288
- payments: options[:payments] || nil,
288
+ payments: options[:payments] || nil
289
289
  }
290
290
 
291
291
  add_creditcard(parameters, creditcard)
@@ -300,7 +300,7 @@ module ActiveMerchant #:nodoc:
300
300
  def store(creditcard, options = {})
301
301
  parameters = {
302
302
  verify: options[:verify] || 'y',
303
- billingid: options[:billingid] || options[:billing_id] || nil,
303
+ billingid: options[:billingid] || options[:billing_id] || nil
304
304
  }
305
305
 
306
306
  add_creditcard(parameters, creditcard)
@@ -314,7 +314,7 @@ module ActiveMerchant #:nodoc:
314
314
  # unstore() the information will be removed and a Response object will be returned indicating the success of the action.
315
315
  def unstore(identification, options = {})
316
316
  parameters = {
317
- billingid: identification,
317
+ billingid: identification
318
318
  }
319
319
 
320
320
  add_custom_fields(parameters, options)
@@ -126,7 +126,7 @@ module ActiveMerchant #:nodoc:
126
126
  COMMON_ADDRESS_OPTIONS,
127
127
  {
128
128
  address1: [:string, 'Street'],
129
- address2: [:string, 'Street2'],
129
+ address2: [:string, 'Street2']
130
130
  }
131
131
  ].inject(:merge) #:nodoc
132
132
 
@@ -136,7 +136,7 @@ module ActiveMerchant #:nodoc:
136
136
  COMMON_ADDRESS_OPTIONS,
137
137
  {
138
138
  address1: [:string, 'Address'],
139
- address2: [:string, 'Address2'],
139
+ address2: [:string, 'Address2']
140
140
  },
141
141
  {
142
142
  card_number: [:string, 'CardNumber'],
@@ -144,7 +144,7 @@ module ActiveMerchant #:nodoc:
144
144
  account: [:string, 'Account'],
145
145
  routing: [:string, 'Routing'],
146
146
  check_format: [:string, 'CheckFormat'],
147
- record_type: [:string, 'RecordType'],
147
+ record_type: [:string, 'RecordType']
148
148
  }
149
149
  ].inject(:merge) #:nodoc
150
150
 
@@ -187,7 +187,7 @@ module ActiveMerchant #:nodoc:
187
187
  comments: [:string, 'Comments'],
188
188
  allow_partial_auth: [:boolean, 'AllowPartialAuth'],
189
189
  currency: [:string, 'Currency'],
190
- non_tax: [:boolean, 'NonTax'],
190
+ non_tax: [:boolean, 'NonTax']
191
191
  } #:nodoc:
192
192
 
193
193
  TRANSACTION_DETAIL_MONEY_OPTIONS = {
@@ -279,7 +279,7 @@ module ActiveMerchant #:nodoc:
279
279
 
280
280
  {
281
281
  quantity: 'qty',
282
- unit: 'um',
282
+ unit: 'um'
283
283
  }.each do |key, umkey|
284
284
  post["line#{index}#{umkey}"] = line_item[key.to_sym] if line_item.has_key?(key.to_sym)
285
285
  end
@@ -139,7 +139,7 @@ module ActiveMerchant #:nodoc:
139
139
 
140
140
  ACCOUNT_TYPES = {
141
141
  'checking' => '1',
142
- 'savings' => '2',
142
+ 'savings' => '2'
143
143
  }
144
144
 
145
145
  def add_check(post, payment_method)
@@ -178,7 +178,7 @@ module ActiveMerchant #:nodoc:
178
178
  'refund' => 'ns_credit',
179
179
  'authorize' => 'ns_quicksale_cc',
180
180
  'capture' => 'ns_quicksale_cc',
181
- 'void' => 'ns_void',
181
+ 'void' => 'ns_void'
182
182
  }
183
183
 
184
184
  def commit(action, options, post)
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchant
2
- VERSION = '1.109.0'
2
+ VERSION = '1.114.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activemerchant
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.109.0
4
+ version: 1.114.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-30 00:00:00.000000000 Z
11
+ date: 2020-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -100,6 +100,20 @@ dependencies:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: pry-byebug
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
103
117
  - !ruby/object:Gem::Dependency
104
118
  name: rake
105
119
  requirement: !ruby/object:Gem::Requirement