activemerchant 1.79.2 → 1.80.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 (219) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +33 -0
  3. data/README.md +10 -2
  4. data/lib/active_merchant.rb +1 -1
  5. data/lib/active_merchant/billing/check.rb +4 -4
  6. data/lib/active_merchant/billing/compatibility.rb +1 -1
  7. data/lib/active_merchant/billing/credit_card.rb +21 -21
  8. data/lib/active_merchant/billing/credit_card_formatting.rb +2 -2
  9. data/lib/active_merchant/billing/credit_card_methods.rb +2 -2
  10. data/lib/active_merchant/billing/gateway.rb +13 -13
  11. data/lib/active_merchant/billing/gateways/adyen.rb +31 -15
  12. data/lib/active_merchant/billing/gateways/allied_wallet.rb +22 -22
  13. data/lib/active_merchant/billing/gateways/authorize_net.rb +72 -72
  14. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
  15. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -3
  16. data/lib/active_merchant/billing/gateways/axcessms.rb +51 -51
  17. data/lib/active_merchant/billing/gateways/balanced.rb +29 -29
  18. data/lib/active_merchant/billing/gateways/bank_frick.rb +3 -3
  19. data/lib/active_merchant/billing/gateways/banwire.rb +8 -8
  20. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +5 -5
  21. data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +6 -6
  22. data/lib/active_merchant/billing/gateways/be2bill.rb +2 -2
  23. data/lib/active_merchant/billing/gateways/beanstream.rb +1 -1
  24. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +69 -69
  25. data/lib/active_merchant/billing/gateways/blue_pay.rb +19 -19
  26. data/lib/active_merchant/billing/gateways/blue_snap.rb +42 -42
  27. data/lib/active_merchant/billing/gateways/bogus.rb +10 -10
  28. data/lib/active_merchant/billing/gateways/borgun.rb +10 -10
  29. data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
  30. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +2 -2
  31. data/lib/active_merchant/billing/gateways/braintree_blue.rb +94 -94
  32. data/lib/active_merchant/billing/gateways/braintree_orange.rb +1 -1
  33. data/lib/active_merchant/billing/gateways/bridge_pay.rb +39 -39
  34. data/lib/active_merchant/billing/gateways/cams.rb +12 -12
  35. data/lib/active_merchant/billing/gateways/card_connect.rb +38 -13
  36. data/lib/active_merchant/billing/gateways/card_stream.rb +116 -116
  37. data/lib/active_merchant/billing/gateways/cardknox.rb +7 -7
  38. data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
  39. data/lib/active_merchant/billing/gateways/cashnet.rb +10 -10
  40. data/lib/active_merchant/billing/gateways/cc5.rb +3 -5
  41. data/lib/active_merchant/billing/gateways/cecabank.rb +6 -6
  42. data/lib/active_merchant/billing/gateways/cenpos.rb +36 -36
  43. data/lib/active_merchant/billing/gateways/checkout.rb +5 -5
  44. data/lib/active_merchant/billing/gateways/checkout_v2.rb +31 -31
  45. data/lib/active_merchant/billing/gateways/clearhaus.rb +5 -5
  46. data/lib/active_merchant/billing/gateways/commercegate.rb +6 -6
  47. data/lib/active_merchant/billing/gateways/conekta.rb +24 -19
  48. data/lib/active_merchant/billing/gateways/creditcall.rb +41 -41
  49. data/lib/active_merchant/billing/gateways/credorax.rb +104 -103
  50. data/lib/active_merchant/billing/gateways/culqi.rb +25 -25
  51. data/lib/active_merchant/billing/gateways/cyber_source.rb +65 -65
  52. data/lib/active_merchant/billing/gateways/data_cash.rb +4 -4
  53. data/lib/active_merchant/billing/gateways/dibs.rb +24 -24
  54. data/lib/active_merchant/billing/gateways/digitzs.rb +35 -35
  55. data/lib/active_merchant/billing/gateways/ebanx.rb +26 -26
  56. data/lib/active_merchant/billing/gateways/efsnet.rb +10 -10
  57. data/lib/active_merchant/billing/gateways/elavon.rb +5 -5
  58. data/lib/active_merchant/billing/gateways/element.rb +35 -35
  59. data/lib/active_merchant/billing/gateways/epay.rb +4 -4
  60. data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
  61. data/lib/active_merchant/billing/gateways/eway.rb +65 -65
  62. data/lib/active_merchant/billing/gateways/eway_managed.rb +11 -11
  63. data/lib/active_merchant/billing/gateways/eway_rapid.rb +31 -31
  64. data/lib/active_merchant/billing/gateways/exact.rb +12 -12
  65. data/lib/active_merchant/billing/gateways/ezic.rb +13 -13
  66. data/lib/active_merchant/billing/gateways/fat_zebra.rb +24 -24
  67. data/lib/active_merchant/billing/gateways/federated_canada.rb +3 -3
  68. data/lib/active_merchant/billing/gateways/first_giving.rb +16 -16
  69. data/lib/active_merchant/billing/gateways/first_pay.rb +7 -4
  70. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +71 -71
  71. data/lib/active_merchant/billing/gateways/flo2cash.rb +12 -12
  72. data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +1 -1
  73. data/lib/active_merchant/billing/gateways/forte.rb +26 -16
  74. data/lib/active_merchant/billing/gateways/garanti.rb +10 -12
  75. data/lib/active_merchant/billing/gateways/global_collect.rb +88 -88
  76. data/lib/active_merchant/billing/gateways/global_transport.rb +4 -4
  77. data/lib/active_merchant/billing/gateways/hdfc.rb +33 -33
  78. data/lib/active_merchant/billing/gateways/hps.rb +28 -28
  79. data/lib/active_merchant/billing/gateways/iats_payments.rb +26 -26
  80. data/lib/active_merchant/billing/gateways/inspire.rb +15 -15
  81. data/lib/active_merchant/billing/gateways/instapay.rb +4 -4
  82. data/lib/active_merchant/billing/gateways/ipp.rb +17 -17
  83. data/lib/active_merchant/billing/gateways/iridium.rb +207 -207
  84. data/lib/active_merchant/billing/gateways/iveri.rb +8 -8
  85. data/lib/active_merchant/billing/gateways/jetpay.rb +134 -134
  86. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +141 -141
  87. data/lib/active_merchant/billing/gateways/komoju.rb +15 -15
  88. data/lib/active_merchant/billing/gateways/kushki.rb +31 -37
  89. data/lib/active_merchant/billing/gateways/latitude19.rb +64 -64
  90. data/lib/active_merchant/billing/gateways/linkpoint.rb +22 -22
  91. data/lib/active_merchant/billing/gateways/litle.rb +4 -4
  92. data/lib/active_merchant/billing/gateways/mastercard.rb +3 -3
  93. data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
  94. data/lib/active_merchant/billing/gateways/mercado_pago.rb +28 -28
  95. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +9 -9
  96. data/lib/active_merchant/billing/gateways/merchant_one.rb +6 -6
  97. data/lib/active_merchant/billing/gateways/merchant_partners.rb +24 -24
  98. data/lib/active_merchant/billing/gateways/merchant_ware.rb +49 -49
  99. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +36 -36
  100. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +4 -4
  101. data/lib/active_merchant/billing/gateways/mercury.rb +28 -28
  102. data/lib/active_merchant/billing/gateways/metrics_global.rb +7 -7
  103. data/lib/active_merchant/billing/gateways/micropayment.rb +31 -31
  104. data/lib/active_merchant/billing/gateways/migs.rb +11 -9
  105. data/lib/active_merchant/billing/gateways/modern_payments.rb +1 -1
  106. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +16 -16
  107. data/lib/active_merchant/billing/gateways/monei.rb +5 -5
  108. data/lib/active_merchant/billing/gateways/moneris.rb +26 -26
  109. data/lib/active_merchant/billing/gateways/moneris_us.rb +81 -37
  110. data/lib/active_merchant/billing/gateways/money_movers.rb +3 -3
  111. data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
  112. data/lib/active_merchant/billing/gateways/nab_transact.rb +6 -6
  113. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +3 -3
  114. data/lib/active_merchant/billing/gateways/netaxept.rb +15 -15
  115. data/lib/active_merchant/billing/gateways/netbanx.rb +2 -2
  116. data/lib/active_merchant/billing/gateways/netbilling.rb +1 -1
  117. data/lib/active_merchant/billing/gateways/netpay.rb +5 -5
  118. data/lib/active_merchant/billing/gateways/nmi.rb +18 -18
  119. data/lib/active_merchant/billing/gateways/ogone.rb +22 -22
  120. data/lib/active_merchant/billing/gateways/omise.rb +3 -3
  121. data/lib/active_merchant/billing/gateways/openpay.rb +6 -4
  122. data/lib/active_merchant/billing/gateways/opp.rb +4 -4
  123. data/lib/active_merchant/billing/gateways/optimal_payment.rb +2 -2
  124. data/lib/active_merchant/billing/gateways/orbital.rb +61 -61
  125. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +4 -4
  126. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +5 -5
  127. data/lib/active_merchant/billing/gateways/pagarme.rb +27 -27
  128. data/lib/active_merchant/billing/gateways/pago_facil.rb +8 -8
  129. data/lib/active_merchant/billing/gateways/pay_conex.rb +25 -25
  130. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +32 -32
  131. data/lib/active_merchant/billing/gateways/pay_hub.rb +29 -29
  132. data/lib/active_merchant/billing/gateways/pay_junction.rb +7 -7
  133. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +30 -30
  134. data/lib/active_merchant/billing/gateways/pay_secure.rb +4 -4
  135. data/lib/active_merchant/billing/gateways/paybox_direct.rb +15 -15
  136. data/lib/active_merchant/billing/gateways/payeezy.rb +5 -5
  137. data/lib/active_merchant/billing/gateways/payex.rb +4 -4
  138. data/lib/active_merchant/billing/gateways/payflow.rb +7 -7
  139. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +23 -22
  140. data/lib/active_merchant/billing/gateways/payflow_express.rb +2 -2
  141. data/lib/active_merchant/billing/gateways/payment_express.rb +40 -37
  142. data/lib/active_merchant/billing/gateways/paymentez.rb +11 -3
  143. data/lib/active_merchant/billing/gateways/paymill.rb +115 -115
  144. data/lib/active_merchant/billing/gateways/paypal.rb +1 -1
  145. data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +1 -1
  146. data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
  147. data/lib/active_merchant/billing/gateways/paystation.rb +14 -14
  148. data/lib/active_merchant/billing/gateways/payu_in.rb +43 -43
  149. data/lib/active_merchant/billing/gateways/payu_latam.rb +41 -41
  150. data/lib/active_merchant/billing/gateways/payway.rb +6 -6
  151. data/lib/active_merchant/billing/gateways/pin.rb +7 -7
  152. data/lib/active_merchant/billing/gateways/plugnpay.rb +62 -62
  153. data/lib/active_merchant/billing/gateways/pro_pay.rb +123 -123
  154. data/lib/active_merchant/billing/gateways/psigate.rb +16 -16
  155. data/lib/active_merchant/billing/gateways/psl_card.rb +13 -13
  156. data/lib/active_merchant/billing/gateways/qbms.rb +52 -52
  157. data/lib/active_merchant/billing/gateways/quantum.rb +5 -5
  158. data/lib/active_merchant/billing/gateways/quickbooks.rb +10 -10
  159. data/lib/active_merchant/billing/gateways/quickpay.rb +1 -1
  160. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +11 -11
  161. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +3 -3
  162. data/lib/active_merchant/billing/gateways/qvalent.rb +55 -55
  163. data/lib/active_merchant/billing/gateways/realex.rb +16 -15
  164. data/lib/active_merchant/billing/gateways/redsys.rb +128 -121
  165. data/lib/active_merchant/billing/gateways/s5.rb +5 -5
  166. data/lib/active_merchant/billing/gateways/safe_charge.rb +16 -16
  167. data/lib/active_merchant/billing/gateways/sage.rb +20 -20
  168. data/lib/active_merchant/billing/gateways/sage_pay.rb +32 -32
  169. data/lib/active_merchant/billing/gateways/sallie_mae.rb +11 -11
  170. data/lib/active_merchant/billing/gateways/secure_net.rb +19 -19
  171. data/lib/active_merchant/billing/gateways/secure_pay.rb +5 -5
  172. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +7 -7
  173. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +9 -9
  174. data/lib/active_merchant/billing/gateways/securion_pay.rb +12 -12
  175. data/lib/active_merchant/billing/gateways/skip_jack.rb +28 -28
  176. data/lib/active_merchant/billing/gateways/smart_ps.rb +31 -31
  177. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +3 -3
  178. data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
  179. data/lib/active_merchant/billing/gateways/stripe.rb +63 -63
  180. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +5 -5
  181. data/lib/active_merchant/billing/gateways/telr.rb +26 -26
  182. data/lib/active_merchant/billing/gateways/trans_first.rb +28 -28
  183. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +224 -224
  184. data/lib/active_merchant/billing/gateways/transact_pro.rb +7 -7
  185. data/lib/active_merchant/billing/gateways/transnational.rb +1 -1
  186. data/lib/active_merchant/billing/gateways/trexle.rb +5 -5
  187. data/lib/active_merchant/billing/gateways/trust_commerce.rb +38 -38
  188. data/lib/active_merchant/billing/gateways/usa_epay.rb +3 -3
  189. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +37 -37
  190. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +3 -3
  191. data/lib/active_merchant/billing/gateways/vanco.rb +25 -25
  192. data/lib/active_merchant/billing/gateways/verifi.rb +40 -40
  193. data/lib/active_merchant/billing/gateways/viaklix.rb +5 -5
  194. data/lib/active_merchant/billing/gateways/visanet_peru.rb +64 -36
  195. data/lib/active_merchant/billing/gateways/webpay.rb +8 -8
  196. data/lib/active_merchant/billing/gateways/wepay.rb +25 -25
  197. data/lib/active_merchant/billing/gateways/wirecard.rb +26 -26
  198. data/lib/active_merchant/billing/gateways/worldpay.rb +15 -15
  199. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +42 -42
  200. data/lib/active_merchant/billing/gateways/worldpay_us.rb +17 -17
  201. data/lib/active_merchant/billing/model.rb +2 -2
  202. data/lib/active_merchant/billing/network_tokenization_credit_card.rb +1 -1
  203. data/lib/active_merchant/billing/rails.rb +1 -1
  204. data/lib/active_merchant/connection.rb +10 -8
  205. data/lib/active_merchant/country.rb +1 -1
  206. data/lib/active_merchant/net_http_ssl_connection.rb +1 -0
  207. data/lib/active_merchant/network_connection_retries.rb +12 -12
  208. data/lib/active_merchant/post_data.rb +1 -1
  209. data/lib/active_merchant/posts_data.rb +1 -1
  210. data/lib/active_merchant/version.rb +1 -1
  211. data/lib/certs/cacert.pem +37 -0
  212. data/lib/support/gateway_support.rb +2 -2
  213. data/lib/support/ssl_verify.rb +5 -5
  214. data/lib/support/ssl_version.rb +7 -7
  215. metadata +3 -7
  216. data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +0 -246
  217. data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +0 -13
  218. data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +0 -29
  219. data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +0 -66
@@ -175,18 +175,18 @@ module ActiveMerchant #:nodoc:
175
175
 
176
176
  def headers(post)
177
177
  {
178
- "Content-Type" => "text/xml; charset=utf-8",
179
- "Content-Length" => post.size.to_s,
180
- "SOAPAction" => "http://iveri.com/Execute"
178
+ 'Content-Type' => 'text/xml; charset=utf-8',
179
+ 'Content-Length' => post.size.to_s,
180
+ 'SOAPAction' => 'http://iveri.com/Execute'
181
181
  }
182
182
  end
183
183
 
184
184
  def parse(body)
185
185
  parsed = {}
186
186
 
187
- vxml = Nokogiri::XML(body).remove_namespaces!.xpath("//Envelope/Body/ExecuteResponse/ExecuteResult").inner_text
187
+ vxml = Nokogiri::XML(body).remove_namespaces!.xpath('//Envelope/Body/ExecuteResponse/ExecuteResult').inner_text
188
188
  doc = Nokogiri::XML(vxml)
189
- doc.xpath("*").each do |node|
189
+ doc.xpath('*').each do |node|
190
190
  if (node.elements.empty?)
191
191
  parsed[underscore(node.name)] = node.text
192
192
  else
@@ -201,7 +201,7 @@ module ActiveMerchant #:nodoc:
201
201
  def parse_element(parsed, node)
202
202
  if !node.attributes.empty?
203
203
  node.attributes.each do |a|
204
- parsed[underscore(node.name)+ "_" + underscore(a[1].name)] = a[1].value
204
+ parsed[underscore(node.name)+ '_' + underscore(a[1].name)] = a[1].value
205
205
  end
206
206
  end
207
207
 
@@ -218,7 +218,7 @@ module ActiveMerchant #:nodoc:
218
218
 
219
219
  def message_from(response, succeeded)
220
220
  if succeeded
221
- "Succeeded"
221
+ 'Succeeded'
222
222
  else
223
223
  response['result_description'] || response['result_acquirer_description']
224
224
  end
@@ -243,7 +243,7 @@ module ActiveMerchant #:nodoc:
243
243
  camel_cased_word.to_s.gsub(/::/, '/').
244
244
  gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
245
245
  gsub(/([a-z\d])([A-Z])/,'\1_\2').
246
- tr("-", "_").
246
+ tr('-', '_').
247
247
  downcase
248
248
  end
249
249
  end
@@ -23,132 +23,132 @@ module ActiveMerchant #:nodoc:
23
23
  self.money_format = :cents
24
24
 
25
25
  ACTION_CODE_MESSAGES = {
26
- "000" => "Approved.",
27
- "001" => "Refer to card issuer.",
28
- "002" => "Refer to card issuer, special condition.",
29
- "003" => "Invalid merchant or service provider.",
30
- "004" => "Pick up card.",
31
- "005" => "Do not honor.",
32
- "006" => "Error.",
33
- "007" => "Pick up card, special condition.",
34
- "008" => "Honor with ID (Show ID).",
35
- "010" => "Partial approval.",
36
- "011" => "VIP approval.",
37
- "012" => "Invalid transaction.",
38
- "013" => "Invalid amount or exceeds maximum for card program.",
39
- "014" => "Invalid account number (no such number).",
40
- "015" => "No such issuer.",
41
- "019" => "Re-enter Transaction.",
42
- "021" => "No action taken (unable to back out prior transaction).",
43
- "025" => "Transaction Not Found.",
44
- "027" => "File update field edit error.",
45
- "028" => "File is temporarily unavailable.",
46
- "030" => "Format error.",
47
- "039" => "No credit account.",
48
- "041" => "Pick up card (lost card).",
49
- "043" => "Pick up card (stolen card).",
50
- "051" => "Insufficient funds.",
51
- "052" => "No checking account.",
52
- "053" => "Mp savomgs accpimt.",
53
- "054" => "Expired Card.",
54
- "055" => "Incorrect PIN.",
55
- "057" => "Transaction not permitted to cardholder.",
56
- "058" => "Transaction not allowed at terminal.",
57
- "061" => "Exceeds withdrawal limit.",
58
- "062" => "Restricted card (eg, Country Exclusion).",
59
- "063" => "Security violation.",
60
- "065" => "Activity count limit exceeded.",
61
- "068" => "Response late.",
62
- "070" => "Contact card issuer.",
63
- "071" => "PIN not changed.",
64
- "075" => "Allowable number of PIN-entry tries exceeded.",
65
- "076" => "Unable to locate previous message (no matching retrieval reference number).",
66
- "077" => "Repeat or reversal data are inconsistent with original message.",
67
- "078" => "Blocked (first use), or non-existent account.",
68
- "079" => "Key exchange validation failed.",
69
- "080" => "Credit issuer unavailable or invalid date.",
70
- "081" => "PIN cryptographic error found.",
71
- "082" => "Negative online CVV results.",
72
- "084" => "Invalid auth life cycle.",
73
- "085" => "No reason to decline - CVV or AVS approved.",
74
- "086" => "Cannot verify PIN.",
75
- "087" => "Cashback not allowed.",
76
- "089" => "Issuer Down.",
77
- "091" => "Issuer Down.",
78
- "092" => "Unable to route transaction.",
79
- "093" => "Transaction cannot be completed - violation of law.",
80
- "094" => "Duplicate transmission.",
81
- "096" => "System error.",
82
- "100" => "Deny.",
83
- "101" => "Expired Card.",
84
- "103" => "Deny - Invalid manual Entry 4DBC.",
85
- "104" => "Deny - New card issued.",
86
- "105" => "Deny - Account Cancelled.",
87
- "106" => "Exceeded PIN Attempts.",
88
- "107" => "Please Call Issuer.",
89
- "109" => "Invalid merchant.",
90
- "110" => "Invalid amount.",
91
- "111" => "Invalid account.",
92
- "115" => "Service not permitted.",
93
- "122" => "Invalid card (CID) security code.",
94
- "125" => "Invalid effective date.",
95
- "181" => "Format error.",
96
- "182" => "Please wait.",
97
- "183" => "Invalid currency code.",
98
- "187" => "Deny - new card issued.",
99
- "188" => "Deny - Expiration date required.",
100
- "189" => "Deny - Cancelled or Closed Merchant/SE.",
101
- "200" => "Deny - Pick up card.",
102
- "400" => "Reversal accepted.",
103
- "601" => "Reject - EMV Chip Declined Transaction.",
104
- "602" => "Reject - Suspected Fraud.",
105
- "603" => "Reject - Communications Error.",
106
- "604" => "Reject - Insufficient Approval.",
107
- "750" => "Velocity Check Fail.",
108
- "899" => "Misc Decline.",
109
- "900" => "Invalid Message Type.",
110
- "901" => "Invalid Merchant ID.",
111
- "903" => "Debit not supported.",
112
- "904" => "Private label not supported.",
113
- "905" => "Invalid card type.",
114
- "906" => "Unit not active.",
115
- "908" => "Manual card entry invalid.",
116
- "909" => "Invalid track information.",
117
- "911" => "Master merchant not found.",
118
- "912" => "Invalid card format.",
119
- "913" => "Invalid card type.",
120
- "914" => "Invalid card length.",
121
- "917" => "Expired card.",
122
- "919" => "Invalid entry type.",
123
- "920" => "Invalid amount.",
124
- "921" => "Invalid messge format.",
125
- "923" => "Invalid ABA.",
126
- "924" => "Invalid DDA.",
127
- "925" => "Invalid TID.",
128
- "926" => "Invalid Password.",
129
- "930" => "Invalid zipcode.",
130
- "931" => "Invalid Address.",
131
- "932" => "Invalid ZIP and Address.",
132
- "933" => "Invalid CVV2.",
133
- "934" => "Program Not Allowed.",
134
- "940" => "Record Not Found.",
135
- "941" => "Merchant ID error.",
136
- "942" => "Refund Not Allowed.",
137
- "943" => "Refund denied.",
138
- "955" => "Invalid PIN block.",
139
- "956" => "Invalid KSN.",
140
- "958" => "Bad Status.",
141
- "959" => "Seek Record limit exceeded.",
142
- "962" => "Invalid PIN key (Unknown KSN).",
143
- "981" => "Invalid AVS.",
144
- "987" => "Issuer Unavailable.",
145
- "988" => "System error SD.",
146
- "989" => "Database Error.",
147
- "992" => "Transaction Timeout.",
148
- "996" => "Bad Terminal ID.",
149
- "997" => "Message rejected by association.",
150
- "999" => "Communication failure",
151
- nil => "No response returned (missing credentials?)."
26
+ '000' => 'Approved.',
27
+ '001' => 'Refer to card issuer.',
28
+ '002' => 'Refer to card issuer, special condition.',
29
+ '003' => 'Invalid merchant or service provider.',
30
+ '004' => 'Pick up card.',
31
+ '005' => 'Do not honor.',
32
+ '006' => 'Error.',
33
+ '007' => 'Pick up card, special condition.',
34
+ '008' => 'Honor with ID (Show ID).',
35
+ '010' => 'Partial approval.',
36
+ '011' => 'VIP approval.',
37
+ '012' => 'Invalid transaction.',
38
+ '013' => 'Invalid amount or exceeds maximum for card program.',
39
+ '014' => 'Invalid account number (no such number).',
40
+ '015' => 'No such issuer.',
41
+ '019' => 'Re-enter Transaction.',
42
+ '021' => 'No action taken (unable to back out prior transaction).',
43
+ '025' => 'Transaction Not Found.',
44
+ '027' => 'File update field edit error.',
45
+ '028' => 'File is temporarily unavailable.',
46
+ '030' => 'Format error.',
47
+ '039' => 'No credit account.',
48
+ '041' => 'Pick up card (lost card).',
49
+ '043' => 'Pick up card (stolen card).',
50
+ '051' => 'Insufficient funds.',
51
+ '052' => 'No checking account.',
52
+ '053' => 'No savings account.',
53
+ '054' => 'Expired Card.',
54
+ '055' => 'Incorrect PIN.',
55
+ '057' => 'Transaction not permitted to cardholder.',
56
+ '058' => 'Transaction not allowed at terminal.',
57
+ '061' => 'Exceeds withdrawal limit.',
58
+ '062' => 'Restricted card (eg, Country Exclusion).',
59
+ '063' => 'Security violation.',
60
+ '065' => 'Activity count limit exceeded.',
61
+ '068' => 'Response late.',
62
+ '070' => 'Contact card issuer.',
63
+ '071' => 'PIN not changed.',
64
+ '075' => 'Allowable number of PIN-entry tries exceeded.',
65
+ '076' => 'Unable to locate previous message (no matching retrieval reference number).',
66
+ '077' => 'Repeat or reversal data are inconsistent with original message.',
67
+ '078' => 'Blocked (first use), or non-existent account.',
68
+ '079' => 'Key exchange validation failed.',
69
+ '080' => 'Credit issuer unavailable or invalid date.',
70
+ '081' => 'PIN cryptographic error found.',
71
+ '082' => 'Negative online CVV results.',
72
+ '084' => 'Invalid auth life cycle.',
73
+ '085' => 'No reason to decline - CVV or AVS approved.',
74
+ '086' => 'Cannot verify PIN.',
75
+ '087' => 'Cashback not allowed.',
76
+ '089' => 'Issuer Down.',
77
+ '091' => 'Issuer Down.',
78
+ '092' => 'Unable to route transaction.',
79
+ '093' => 'Transaction cannot be completed - violation of law.',
80
+ '094' => 'Duplicate transmission.',
81
+ '096' => 'System error.',
82
+ '100' => 'Deny.',
83
+ '101' => 'Expired Card.',
84
+ '103' => 'Deny - Invalid manual Entry 4DBC.',
85
+ '104' => 'Deny - New card issued.',
86
+ '105' => 'Deny - Account Cancelled.',
87
+ '106' => 'Exceeded PIN Attempts.',
88
+ '107' => 'Please Call Issuer.',
89
+ '109' => 'Invalid merchant.',
90
+ '110' => 'Invalid amount.',
91
+ '111' => 'Invalid account.',
92
+ '115' => 'Service not permitted.',
93
+ '122' => 'Invalid card (CID) security code.',
94
+ '125' => 'Invalid effective date.',
95
+ '181' => 'Format error.',
96
+ '182' => 'Please wait.',
97
+ '183' => 'Invalid currency code.',
98
+ '187' => 'Deny - new card issued.',
99
+ '188' => 'Deny - Expiration date required.',
100
+ '189' => 'Deny - Cancelled or Closed Merchant/SE.',
101
+ '200' => 'Deny - Pick up card.',
102
+ '400' => 'Reversal accepted.',
103
+ '601' => 'Reject - EMV Chip Declined Transaction.',
104
+ '602' => 'Reject - Suspected Fraud.',
105
+ '603' => 'Reject - Communications Error.',
106
+ '604' => 'Reject - Insufficient Approval.',
107
+ '750' => 'Velocity Check Fail.',
108
+ '899' => 'Misc Decline.',
109
+ '900' => 'Invalid Message Type.',
110
+ '901' => 'Invalid Merchant ID.',
111
+ '903' => 'Debit not supported.',
112
+ '904' => 'Private label not supported.',
113
+ '905' => 'Invalid card type.',
114
+ '906' => 'Unit not active.',
115
+ '908' => 'Manual card entry invalid.',
116
+ '909' => 'Invalid track information.',
117
+ '911' => 'Master merchant not found.',
118
+ '912' => 'Invalid card format.',
119
+ '913' => 'Invalid card type.',
120
+ '914' => 'Invalid card length.',
121
+ '917' => 'Expired card.',
122
+ '919' => 'Invalid entry type.',
123
+ '920' => 'Invalid amount.',
124
+ '921' => 'Invalid messge format.',
125
+ '923' => 'Invalid ABA.',
126
+ '924' => 'Invalid DDA.',
127
+ '925' => 'Invalid TID.',
128
+ '926' => 'Invalid Password.',
129
+ '930' => 'Invalid zipcode.',
130
+ '931' => 'Invalid Address.',
131
+ '932' => 'Invalid ZIP and Address.',
132
+ '933' => 'Invalid CVV2.',
133
+ '934' => 'Program Not Allowed.',
134
+ '940' => 'Record Not Found.',
135
+ '941' => 'Merchant ID error.',
136
+ '942' => 'Refund Not Allowed.',
137
+ '943' => 'Refund denied.',
138
+ '955' => 'Invalid PIN block.',
139
+ '956' => 'Invalid KSN.',
140
+ '958' => 'Bad Status.',
141
+ '959' => 'Seek Record limit exceeded.',
142
+ '962' => 'Invalid PIN key (Unknown KSN).',
143
+ '981' => 'Invalid AVS.',
144
+ '987' => 'Issuer Unavailable.',
145
+ '988' => 'System error SD.',
146
+ '989' => 'Database Error.',
147
+ '992' => 'Transaction Timeout.',
148
+ '996' => 'Bad Terminal ID.',
149
+ '997' => 'Message rejected by association.',
150
+ '999' => 'Communication failure',
151
+ nil => 'No response returned (missing credentials?).'
152
152
  }
153
153
 
154
154
  def initialize(options = {})
@@ -165,14 +165,14 @@ module ActiveMerchant #:nodoc:
165
165
  end
166
166
 
167
167
  def capture(money, reference, options = {})
168
- split_authorization = reference.split(";")
168
+ split_authorization = reference.split(';')
169
169
  transaction_id = split_authorization[0]
170
170
  token = split_authorization[3]
171
171
  commit(money, build_capture_request(transaction_id, money, options), token)
172
172
  end
173
173
 
174
174
  def void(reference, options = {})
175
- transaction_id, approval, amount, token = reference.split(";")
175
+ transaction_id, approval, amount, token = reference.split(';')
176
176
  commit(amount.to_i, build_void_request(amount.to_i, transaction_id, approval, token, options), token)
177
177
  end
178
178
 
@@ -186,7 +186,7 @@ module ActiveMerchant #:nodoc:
186
186
  end
187
187
 
188
188
  def refund(money, reference, options = {})
189
- split_authorization = reference.split(";")
189
+ split_authorization = reference.split(';')
190
190
  transaction_id = split_authorization[0]
191
191
  token = split_authorization[3]
192
192
  credit_card = options[:credit_card]
@@ -326,7 +326,7 @@ module ActiveMerchant #:nodoc:
326
326
  end
327
327
 
328
328
  def success?(response)
329
- response[:action_code] == "000"
329
+ response[:action_code] == '000'
330
330
  end
331
331
 
332
332
  def message_from(response)
@@ -335,11 +335,11 @@ module ActiveMerchant #:nodoc:
335
335
 
336
336
  def authorization_from(response, money, previous_token)
337
337
  original_amount = amount(money) if money
338
- [ response[:transaction_id], response[:approval], original_amount, (response[:token] || previous_token)].join(";")
338
+ [ response[:transaction_id], response[:approval], original_amount, (response[:token] || previous_token)].join(';')
339
339
  end
340
340
 
341
341
  def add_credit_card(xml, credit_card)
342
- xml.tag! 'CardNum', credit_card.number, "Tokenize" => true
342
+ xml.tag! 'CardNum', credit_card.number, 'Tokenize' => true
343
343
  xml.tag! 'CardExpMonth', format_exp(credit_card.month)
344
344
  xml.tag! 'CardExpYear', format_exp(credit_card.year)
345
345
 
@@ -354,7 +354,7 @@ module ActiveMerchant #:nodoc:
354
354
 
355
355
  def add_addresses(xml, options)
356
356
  if billing_address = options[:billing_address] || options[:address]
357
- xml.tag! 'BillingAddress', [billing_address[:address1], billing_address[:address2]].compact.join(" ")
357
+ xml.tag! 'BillingAddress', [billing_address[:address1], billing_address[:address2]].compact.join(' ')
358
358
  xml.tag! 'BillingCity', billing_address[:city]
359
359
  xml.tag! 'BillingStateProv', billing_address[:state]
360
360
  xml.tag! 'BillingPostalCode', billing_address[:zip]
@@ -367,7 +367,7 @@ module ActiveMerchant #:nodoc:
367
367
  xml.tag! 'ShippingName', shipping_address[:name]
368
368
 
369
369
  xml.tag! 'ShippingAddr' do
370
- xml.tag! 'Address', [shipping_address[:address1], shipping_address[:address2]].compact.join(" ")
370
+ xml.tag! 'Address', [shipping_address[:address1], shipping_address[:address2]].compact.join(' ')
371
371
  xml.tag! 'City', shipping_address[:city]
372
372
  xml.tag! 'StateProv', shipping_address[:state]
373
373
  xml.tag! 'PostalCode', shipping_address[:zip]
@@ -15,137 +15,137 @@ module ActiveMerchant #:nodoc:
15
15
  API_VERSION = '2.2'
16
16
 
17
17
  ACTION_CODE_MESSAGES = {
18
- "000" => "Approved.",
19
- "001" => "Refer to card issuer.",
20
- "002" => "Refer to card issuer, special condition.",
21
- "003" => "Invalid merchant or service provider.",
22
- "004" => "Pick up card.",
23
- "005" => "Do not honor.",
24
- "006" => "Error.",
25
- "007" => "Pick up card, special condition.",
26
- "008" => "Honor with ID (Show ID).",
27
- "010" => "Partial approval.",
28
- "011" => "VIP approval.",
29
- "012" => "Invalid transaction.",
30
- "013" => "Invalid amount or exceeds maximum for card program.",
31
- "014" => "Invalid account number (no such number).",
32
- "015" => "No such issuer.",
33
- "019" => "Re-enter Transaction.",
34
- "021" => "No action taken (unable to back out prior transaction).",
35
- "025" => "Transaction Not Found.",
36
- "027" => "File update field edit error.",
37
- "028" => "File is temporarily unavailable.",
38
- "030" => "Format error.",
39
- "039" => "No credit account.",
40
- "041" => "Pick up card (lost card).",
41
- "043" => "Pick up card (stolen card).",
42
- "051" => "Insufficient funds.",
43
- "052" => "No checking account.",
44
- "053" => "Mp savomgs accpimt.",
45
- "054" => "Expired Card.",
46
- "055" => "Incorrect PIN.",
47
- "057" => "Transaction not permitted to cardholder.",
48
- "058" => "Transaction not allowed at terminal.",
49
- "061" => "Exceeds withdrawal limit.",
50
- "062" => "Restricted card (eg, Country Exclusion).",
51
- "063" => "Security violation.",
52
- "065" => "Activity count limit exceeded.",
53
- "068" => "Response late.",
54
- "070" => "Contact card issuer.",
55
- "071" => "PIN not changed.",
56
- "075" => "Allowable number of PIN-entry tries exceeded.",
57
- "076" => "Unable to locate previous message (no matching retrieval reference number).",
58
- "077" => "Repeat or reversal data are inconsistent with original message.",
59
- "078" => "Blocked (first use), or non-existent account.",
60
- "079" => "Key exchange validation failed.",
61
- "080" => "Credit issuer unavailable or invalid date.",
62
- "081" => "PIN cryptographic error found.",
63
- "082" => "Negative online CVV results.",
64
- "084" => "Invalid auth life cycle.",
65
- "085" => "No reason to decline - CVV or AVS approved.",
66
- "086" => "Cannot verify PIN.",
67
- "087" => "Cashback not allowed.",
68
- "089" => "Issuer Down.",
69
- "091" => "Issuer Down.",
70
- "092" => "Unable to route transaction.",
71
- "093" => "Transaction cannot be completed - violation of law.",
72
- "094" => "Duplicate transmission.",
73
- "096" => "System error.",
74
- "100" => "Deny.",
75
- "101" => "Expired Card.",
76
- "103" => "Deny - Invalid manual Entry 4DBC.",
77
- "104" => "Deny - New card issued.",
78
- "105" => "Deny - Account Cancelled.",
79
- "106" => "Exceeded PIN Attempts.",
80
- "107" => "Please Call Issuer.",
81
- "109" => "Invalid merchant.",
82
- "110" => "Invalid amount.",
83
- "111" => "Invalid account.",
84
- "115" => "Service not permitted.",
85
- "117" => "Invalid PIN.",
86
- "119" => "Card member not enrolled.",
87
- "122" => "Invalid card (CID) security code.",
88
- "125" => "Invalid effective date.",
89
- "181" => "Format error.",
90
- "182" => "Please wait.",
91
- "183" => "Invalid currency code.",
92
- "187" => "Deny - new card issued.",
93
- "188" => "Deny - Expiration date required.",
94
- "189" => "Deny - Cancelled or Closed Merchant/SE.",
95
- "200" => "Deny - Pick up card.",
96
- "400" => "Reversal accepted.",
97
- "601" => "Reject - EMV Chip Declined Transaction.",
98
- "602" => "Reject - Suspected Fraud.",
99
- "603" => "Reject - Communications Error.",
100
- "604" => "Reject - Insufficient Approval.",
101
- "750" => "Velocity Check Fail.",
102
- "899" => "Misc Decline.",
103
- "900" => "Invalid Message Type.",
104
- "901" => "Invalid Merchant ID.",
105
- "903" => "Debit not supported.",
106
- "904" => "Private label not supported.",
107
- "905" => "Invalid card type.",
108
- "906" => "Unit not active.",
109
- "908" => "Manual card entry invalid.",
110
- "909" => "Invalid track information.",
111
- "911" => "Master merchant not found.",
112
- "912" => "Invalid card format.",
113
- "913" => "Invalid card type.",
114
- "914" => "Invalid card length.",
115
- "917" => "Expired card.",
116
- "919" => "Invalid entry type.",
117
- "920" => "Invalid amount.",
118
- "921" => "Invalid messge format.",
119
- "923" => "Invalid ABA.",
120
- "924" => "Invalid DDA.",
121
- "925" => "Invalid TID.",
122
- "926" => "Invalid Password.",
123
- "930" => "Invalid zipcode.",
124
- "931" => "Invalid Address.",
125
- "932" => "Invalid ZIP and Address.",
126
- "933" => "Invalid CVV2.",
127
- "934" => "Program Not Allowed.",
128
- "935" => "Invalid Device/App.",
129
- "940" => "Record Not Found.",
130
- "941" => "Merchant ID error.",
131
- "942" => "Refund Not Allowed.",
132
- "943" => "Refund denied.",
133
- "955" => "Invalid PIN block.",
134
- "956" => "Invalid KSN.",
135
- "958" => "Bad Status.",
136
- "959" => "Seek Record limit exceeded.",
137
- "960" => "Internal Key Database Error.",
138
- "961" => "TRANS not Supported. Cash Disbursement required a specific MCC.",
139
- "962" => "Invalid PIN key (Unknown KSN).",
140
- "981" => "Invalid AVS.",
141
- "987" => "Issuer Unavailable.",
142
- "988" => "System error SD.",
143
- "989" => "Database Error.",
144
- "992" => "Transaction Timeout.",
145
- "996" => "Bad Terminal ID.",
146
- "997" => "Message rejected by association.",
147
- "999" => "Communication failure",
148
- nil => "No response returned (missing credentials?)."
18
+ '000' => 'Approved.',
19
+ '001' => 'Refer to card issuer.',
20
+ '002' => 'Refer to card issuer, special condition.',
21
+ '003' => 'Invalid merchant or service provider.',
22
+ '004' => 'Pick up card.',
23
+ '005' => 'Do not honor.',
24
+ '006' => 'Error.',
25
+ '007' => 'Pick up card, special condition.',
26
+ '008' => 'Honor with ID (Show ID).',
27
+ '010' => 'Partial approval.',
28
+ '011' => 'VIP approval.',
29
+ '012' => 'Invalid transaction.',
30
+ '013' => 'Invalid amount or exceeds maximum for card program.',
31
+ '014' => 'Invalid account number (no such number).',
32
+ '015' => 'No such issuer.',
33
+ '019' => 'Re-enter Transaction.',
34
+ '021' => 'No action taken (unable to back out prior transaction).',
35
+ '025' => 'Transaction Not Found.',
36
+ '027' => 'File update field edit error.',
37
+ '028' => 'File is temporarily unavailable.',
38
+ '030' => 'Format error.',
39
+ '039' => 'No credit account.',
40
+ '041' => 'Pick up card (lost card).',
41
+ '043' => 'Pick up card (stolen card).',
42
+ '051' => 'Insufficient funds.',
43
+ '052' => 'No checking account.',
44
+ '053' => 'No savings account.',
45
+ '054' => 'Expired Card.',
46
+ '055' => 'Incorrect PIN.',
47
+ '057' => 'Transaction not permitted to cardholder.',
48
+ '058' => 'Transaction not allowed at terminal.',
49
+ '061' => 'Exceeds withdrawal limit.',
50
+ '062' => 'Restricted card (eg, Country Exclusion).',
51
+ '063' => 'Security violation.',
52
+ '065' => 'Activity count limit exceeded.',
53
+ '068' => 'Response late.',
54
+ '070' => 'Contact card issuer.',
55
+ '071' => 'PIN not changed.',
56
+ '075' => 'Allowable number of PIN-entry tries exceeded.',
57
+ '076' => 'Unable to locate previous message (no matching retrieval reference number).',
58
+ '077' => 'Repeat or reversal data are inconsistent with original message.',
59
+ '078' => 'Blocked (first use), or non-existent account.',
60
+ '079' => 'Key exchange validation failed.',
61
+ '080' => 'Credit issuer unavailable or invalid date.',
62
+ '081' => 'PIN cryptographic error found.',
63
+ '082' => 'Negative online CVV results.',
64
+ '084' => 'Invalid auth life cycle.',
65
+ '085' => 'No reason to decline - CVV or AVS approved.',
66
+ '086' => 'Cannot verify PIN.',
67
+ '087' => 'Cashback not allowed.',
68
+ '089' => 'Issuer Down.',
69
+ '091' => 'Issuer Down.',
70
+ '092' => 'Unable to route transaction.',
71
+ '093' => 'Transaction cannot be completed - violation of law.',
72
+ '094' => 'Duplicate transmission.',
73
+ '096' => 'System error.',
74
+ '100' => 'Deny.',
75
+ '101' => 'Expired Card.',
76
+ '103' => 'Deny - Invalid manual Entry 4DBC.',
77
+ '104' => 'Deny - New card issued.',
78
+ '105' => 'Deny - Account Cancelled.',
79
+ '106' => 'Exceeded PIN Attempts.',
80
+ '107' => 'Please Call Issuer.',
81
+ '109' => 'Invalid merchant.',
82
+ '110' => 'Invalid amount.',
83
+ '111' => 'Invalid account.',
84
+ '115' => 'Service not permitted.',
85
+ '117' => 'Invalid PIN.',
86
+ '119' => 'Card member not enrolled.',
87
+ '122' => 'Invalid card (CID) security code.',
88
+ '125' => 'Invalid effective date.',
89
+ '181' => 'Format error.',
90
+ '182' => 'Please wait.',
91
+ '183' => 'Invalid currency code.',
92
+ '187' => 'Deny - new card issued.',
93
+ '188' => 'Deny - Expiration date required.',
94
+ '189' => 'Deny - Cancelled or Closed Merchant/SE.',
95
+ '200' => 'Deny - Pick up card.',
96
+ '400' => 'Reversal accepted.',
97
+ '601' => 'Reject - EMV Chip Declined Transaction.',
98
+ '602' => 'Reject - Suspected Fraud.',
99
+ '603' => 'Reject - Communications Error.',
100
+ '604' => 'Reject - Insufficient Approval.',
101
+ '750' => 'Velocity Check Fail.',
102
+ '899' => 'Misc Decline.',
103
+ '900' => 'Invalid Message Type.',
104
+ '901' => 'Invalid Merchant ID.',
105
+ '903' => 'Debit not supported.',
106
+ '904' => 'Private label not supported.',
107
+ '905' => 'Invalid card type.',
108
+ '906' => 'Unit not active.',
109
+ '908' => 'Manual card entry invalid.',
110
+ '909' => 'Invalid track information.',
111
+ '911' => 'Master merchant not found.',
112
+ '912' => 'Invalid card format.',
113
+ '913' => 'Invalid card type.',
114
+ '914' => 'Invalid card length.',
115
+ '917' => 'Expired card.',
116
+ '919' => 'Invalid entry type.',
117
+ '920' => 'Invalid amount.',
118
+ '921' => 'Invalid messge format.',
119
+ '923' => 'Invalid ABA.',
120
+ '924' => 'Invalid DDA.',
121
+ '925' => 'Invalid TID.',
122
+ '926' => 'Invalid Password.',
123
+ '930' => 'Invalid zipcode.',
124
+ '931' => 'Invalid Address.',
125
+ '932' => 'Invalid ZIP and Address.',
126
+ '933' => 'Invalid CVV2.',
127
+ '934' => 'Program Not Allowed.',
128
+ '935' => 'Invalid Device/App.',
129
+ '940' => 'Record Not Found.',
130
+ '941' => 'Merchant ID error.',
131
+ '942' => 'Refund Not Allowed.',
132
+ '943' => 'Refund denied.',
133
+ '955' => 'Invalid PIN block.',
134
+ '956' => 'Invalid KSN.',
135
+ '958' => 'Bad Status.',
136
+ '959' => 'Seek Record limit exceeded.',
137
+ '960' => 'Internal Key Database Error.',
138
+ '961' => 'TRANS not Supported. Cash Disbursement required a specific MCC.',
139
+ '962' => 'Invalid PIN key (Unknown KSN).',
140
+ '981' => 'Invalid AVS.',
141
+ '987' => 'Issuer Unavailable.',
142
+ '988' => 'System error SD.',
143
+ '989' => 'Database Error.',
144
+ '992' => 'Transaction Timeout.',
145
+ '996' => 'Bad Terminal ID.',
146
+ '997' => 'Message rejected by association.',
147
+ '999' => 'Communication failure',
148
+ nil => 'No response returned (missing credentials?).'
149
149
  }
150
150
 
151
151
  def initialize(options = {})
@@ -162,12 +162,12 @@ module ActiveMerchant #:nodoc:
162
162
  end
163
163
 
164
164
  def capture(money, reference, options = {})
165
- transaction_id, _, _, token = reference.split(";")
165
+ transaction_id, _, _, token = reference.split(';')
166
166
  commit(money, build_capture_request(money, transaction_id, options), token)
167
167
  end
168
168
 
169
169
  def void(reference, options = {})
170
- transaction_id, _, amount, token = reference.split(";")
170
+ transaction_id, _, amount, token = reference.split(';')
171
171
  commit(amount.to_i, build_void_request(amount.to_i, transaction_id, options), token)
172
172
  end
173
173
 
@@ -176,7 +176,7 @@ module ActiveMerchant #:nodoc:
176
176
  end
177
177
 
178
178
  def refund(money, reference, options = {})
179
- transaction_id, _, _, token = reference.split(";")
179
+ transaction_id, _, _, token = reference.split(';')
180
180
  commit(money, build_credit_request(money, transaction_id, token, options), token)
181
181
  end
182
182
 
@@ -335,7 +335,7 @@ module ActiveMerchant #:nodoc:
335
335
  end
336
336
 
337
337
  def success?(response)
338
- response[:action_code] == "000"
338
+ response[:action_code] == '000'
339
339
  end
340
340
 
341
341
  def message_from(response)
@@ -344,7 +344,7 @@ module ActiveMerchant #:nodoc:
344
344
 
345
345
  def authorization_from(response, money, previous_token)
346
346
  original_amount = amount(money) if money
347
- [ response[:transaction_id], response[:approval], original_amount, (response[:token] || previous_token)].join(";")
347
+ [ response[:transaction_id], response[:approval], original_amount, (response[:token] || previous_token)].join(';')
348
348
  end
349
349
 
350
350
  def error_code_from(response)
@@ -356,7 +356,7 @@ module ActiveMerchant #:nodoc:
356
356
 
357
357
  if payment.is_a? String
358
358
  token = payment
359
- _, _, _, token = payment.split(";") if payment.include? ";"
359
+ _, _, _, token = payment.split(';') if payment.include? ';'
360
360
  xml.tag! 'Token', token if token
361
361
  else
362
362
  add_credit_card(xml, payment)
@@ -364,7 +364,7 @@ module ActiveMerchant #:nodoc:
364
364
  end
365
365
 
366
366
  def add_credit_card(xml, credit_card)
367
- xml.tag! 'CardNum', credit_card.number, "CardPresent" => false, "Tokenize" => true
367
+ xml.tag! 'CardNum', credit_card.number, 'CardPresent' => false, 'Tokenize' => true
368
368
  xml.tag! 'CardExpMonth', format_exp(credit_card.month)
369
369
  xml.tag! 'CardExpYear', format_exp(credit_card.year)
370
370
 
@@ -380,7 +380,7 @@ module ActiveMerchant #:nodoc:
380
380
  def add_addresses(xml, options)
381
381
  if billing_address = options[:billing_address] || options[:address]
382
382
  xml.tag! 'Billing' do
383
- xml.tag! 'Address', [billing_address[:address1], billing_address[:address2]].compact.join(" ")
383
+ xml.tag! 'Address', [billing_address[:address1], billing_address[:address2]].compact.join(' ')
384
384
  xml.tag! 'City', billing_address[:city]
385
385
  xml.tag! 'StateProv', billing_address[:state]
386
386
  xml.tag! 'PostalCode', billing_address[:zip]
@@ -393,7 +393,7 @@ module ActiveMerchant #:nodoc:
393
393
  if shipping_address = options[:shipping_address]
394
394
  xml.tag! 'Shipping' do
395
395
  xml.tag! 'Name', shipping_address[:name]
396
- xml.tag! 'Address', [shipping_address[:address1], shipping_address[:address2]].compact.join(" ")
396
+ xml.tag! 'Address', [shipping_address[:address1], shipping_address[:address2]].compact.join(' ')
397
397
  xml.tag! 'City', shipping_address[:city]
398
398
  xml.tag! 'StateProv', shipping_address[:state]
399
399
  xml.tag! 'PostalCode', shipping_address[:zip]
@@ -410,7 +410,7 @@ module ActiveMerchant #:nodoc:
410
410
  def add_invoice_data(xml, options)
411
411
  xml.tag! 'OrderNumber', options[:order_id] if options[:order_id]
412
412
  if tax_amount = options[:tax_amount]
413
- xml.tag! 'TaxAmount', tax_amount, {'ExemptInd' => options[:tax_exempt] || "false"}
413
+ xml.tag! 'TaxAmount', tax_amount, {'ExemptInd' => options[:tax_exempt] || 'false'}
414
414
  end
415
415
  end
416
416