activemerchant 1.79.2 → 1.129.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG +1391 -0
  3. data/README.md +29 -14
  4. data/lib/active_merchant/billing/avs_result.rb +25 -28
  5. data/lib/active_merchant/billing/base.rb +0 -13
  6. data/lib/active_merchant/billing/check.rb +55 -22
  7. data/lib/active_merchant/billing/compatibility.rb +10 -12
  8. data/lib/active_merchant/billing/credit_card.rb +82 -62
  9. data/lib/active_merchant/billing/credit_card_formatting.rb +4 -4
  10. data/lib/active_merchant/billing/credit_card_methods.rb +328 -58
  11. data/lib/active_merchant/billing/cvv_result.rb +0 -1
  12. data/lib/active_merchant/billing/gateway.rb +61 -56
  13. data/lib/active_merchant/billing/gateways/adyen.rb +562 -87
  14. data/lib/active_merchant/billing/gateways/airwallex.rb +370 -0
  15. data/lib/active_merchant/billing/gateways/alelo.rb +256 -0
  16. data/lib/active_merchant/billing/gateways/allied_wallet.rb +35 -36
  17. data/lib/active_merchant/billing/gateways/authorize_net.rb +297 -196
  18. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +31 -24
  19. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +94 -98
  20. data/lib/active_merchant/billing/gateways/axcessms.rb +64 -66
  21. data/lib/active_merchant/billing/gateways/balanced.rb +72 -65
  22. data/lib/active_merchant/billing/gateways/bambora_apac.rb +222 -0
  23. data/lib/active_merchant/billing/gateways/bank_frick.rb +16 -16
  24. data/lib/active_merchant/billing/gateways/banwire.rb +12 -12
  25. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +140 -69
  26. data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +7 -7
  27. data/lib/active_merchant/billing/gateways/be2bill.rb +7 -7
  28. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +115 -115
  29. data/lib/active_merchant/billing/gateways/beanstream.rb +39 -13
  30. data/lib/active_merchant/billing/gateways/beanstream_interac.rb +1 -2
  31. data/lib/active_merchant/billing/gateways/blue_pay.rb +87 -58
  32. data/lib/active_merchant/billing/gateways/blue_snap.rb +405 -104
  33. data/lib/active_merchant/billing/gateways/bogus.rb +34 -30
  34. data/lib/active_merchant/billing/gateways/borgun.rb +97 -47
  35. data/lib/active_merchant/billing/gateways/bpoint.rb +20 -20
  36. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +9 -3
  37. data/lib/active_merchant/billing/gateways/braintree/token_nonce.rb +113 -0
  38. data/lib/active_merchant/billing/gateways/braintree.rb +1 -1
  39. data/lib/active_merchant/billing/gateways/braintree_blue.rb +561 -259
  40. data/lib/active_merchant/billing/gateways/braintree_orange.rb +1 -1
  41. data/lib/active_merchant/billing/gateways/bridge_pay.rb +53 -54
  42. data/lib/active_merchant/billing/gateways/cams.rb +31 -31
  43. data/lib/active_merchant/billing/gateways/card_connect.rb +85 -33
  44. data/lib/active_merchant/billing/gateways/card_save.rb +7 -9
  45. data/lib/active_merchant/billing/gateways/card_stream.rb +187 -169
  46. data/lib/active_merchant/billing/gateways/cardknox.rb +24 -25
  47. data/lib/active_merchant/billing/gateways/cardprocess.rb +9 -7
  48. data/lib/active_merchant/billing/gateways/cashnet.rb +43 -27
  49. data/lib/active_merchant/billing/gateways/cc5.rb +14 -17
  50. data/lib/active_merchant/billing/gateways/cecabank.rb +62 -52
  51. data/lib/active_merchant/billing/gateways/cenpos.rb +63 -62
  52. data/lib/active_merchant/billing/gateways/checkout.rb +21 -23
  53. data/lib/active_merchant/billing/gateways/checkout_v2.rb +391 -113
  54. data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -3
  55. data/lib/active_merchant/billing/gateways/clearhaus.rb +40 -41
  56. data/lib/active_merchant/billing/gateways/commerce_hub.rb +361 -0
  57. data/lib/active_merchant/billing/gateways/commercegate.rb +11 -12
  58. data/lib/active_merchant/billing/gateways/conekta.rb +35 -30
  59. data/lib/active_merchant/billing/gateways/creditcall.rb +59 -59
  60. data/lib/active_merchant/billing/gateways/credorax.rb +326 -145
  61. data/lib/active_merchant/billing/gateways/ct_payment.rb +269 -0
  62. data/lib/active_merchant/billing/gateways/culqi.rb +53 -53
  63. data/lib/active_merchant/billing/gateways/cyber_source/cyber_source_common.rb +36 -0
  64. data/lib/active_merchant/billing/gateways/cyber_source.rb +566 -208
  65. data/lib/active_merchant/billing/gateways/cyber_source_rest.rb +456 -0
  66. data/lib/active_merchant/billing/gateways/d_local.rb +342 -0
  67. data/lib/active_merchant/billing/gateways/data_cash.rb +40 -56
  68. data/lib/active_merchant/billing/gateways/decidir.rb +358 -0
  69. data/lib/active_merchant/billing/gateways/decidir_plus.rb +344 -0
  70. data/lib/active_merchant/billing/gateways/dibs.rb +34 -40
  71. data/lib/active_merchant/billing/gateways/digitzs.rb +48 -45
  72. data/lib/active_merchant/billing/gateways/ebanx.rb +110 -60
  73. data/lib/active_merchant/billing/gateways/efsnet.rb +46 -50
  74. data/lib/active_merchant/billing/gateways/elavon.rb +351 -189
  75. data/lib/active_merchant/billing/gateways/element.rb +106 -56
  76. data/lib/active_merchant/billing/gateways/epay.rb +74 -64
  77. data/lib/active_merchant/billing/gateways/evo_ca.rb +13 -14
  78. data/lib/active_merchant/billing/gateways/eway.rb +74 -73
  79. data/lib/active_merchant/billing/gateways/eway_managed.rb +85 -87
  80. data/lib/active_merchant/billing/gateways/eway_rapid.rb +105 -60
  81. data/lib/active_merchant/billing/gateways/exact.rb +29 -37
  82. data/lib/active_merchant/billing/gateways/ezic.rb +21 -22
  83. data/lib/active_merchant/billing/gateways/fat_zebra.rb +70 -48
  84. data/lib/active_merchant/billing/gateways/federated_canada.rb +11 -13
  85. data/lib/active_merchant/billing/gateways/finansbank.rb +3 -4
  86. data/lib/active_merchant/billing/gateways/first_giving.rb +23 -23
  87. data/lib/active_merchant/billing/gateways/first_pay.rb +33 -13
  88. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +106 -105
  89. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +505 -0
  90. data/lib/active_merchant/billing/gateways/flo2cash.rb +36 -36
  91. data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +2 -2
  92. data/lib/active_merchant/billing/gateways/forte.rb +70 -40
  93. data/lib/active_merchant/billing/gateways/garanti.rb +24 -31
  94. data/lib/active_merchant/billing/gateways/global_collect.rb +378 -154
  95. data/lib/active_merchant/billing/gateways/global_transport.rb +12 -13
  96. data/lib/active_merchant/billing/gateways/hdfc.rb +55 -57
  97. data/lib/active_merchant/billing/gateways/hps.rb +236 -69
  98. data/lib/active_merchant/billing/gateways/iats_payments.rb +61 -39
  99. data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +1 -1
  100. data/lib/active_merchant/billing/gateways/inspire.rb +41 -47
  101. data/lib/active_merchant/billing/gateways/instapay.rb +10 -14
  102. data/lib/active_merchant/billing/gateways/ipg.rb +420 -0
  103. data/lib/active_merchant/billing/gateways/ipp.rb +25 -24
  104. data/lib/active_merchant/billing/gateways/iridium.rb +243 -244
  105. data/lib/active_merchant/billing/gateways/itransact.rb +14 -14
  106. data/lib/active_merchant/billing/gateways/iveri.rb +73 -34
  107. data/lib/active_merchant/billing/gateways/ixopay.rb +320 -0
  108. data/lib/active_merchant/billing/gateways/jetpay.rb +145 -152
  109. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +154 -159
  110. data/lib/active_merchant/billing/gateways/komoju.rb +16 -16
  111. data/lib/active_merchant/billing/gateways/kushki.rb +127 -57
  112. data/lib/active_merchant/billing/gateways/latitude19.rb +111 -115
  113. data/lib/active_merchant/billing/gateways/linkpoint.rb +82 -85
  114. data/lib/active_merchant/billing/gateways/litle.rb +247 -53
  115. data/lib/active_merchant/billing/gateways/mastercard.rb +41 -23
  116. data/lib/active_merchant/billing/gateways/maxipago.rb +5 -5
  117. data/lib/active_merchant/billing/gateways/mercado_pago.rb +135 -49
  118. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +62 -29
  119. data/lib/active_merchant/billing/gateways/merchant_one.rb +16 -20
  120. data/lib/active_merchant/billing/gateways/merchant_partners.rb +40 -40
  121. data/lib/active_merchant/billing/gateways/merchant_ware.rb +54 -60
  122. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +42 -44
  123. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +52 -14
  124. data/lib/active_merchant/billing/gateways/mercury.rb +47 -51
  125. data/lib/active_merchant/billing/gateways/metrics_global.rb +32 -42
  126. data/lib/active_merchant/billing/gateways/micropayment.rb +42 -45
  127. data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +7 -7
  128. data/lib/active_merchant/billing/gateways/migs.rb +45 -40
  129. data/lib/active_merchant/billing/gateways/mit.rb +260 -0
  130. data/lib/active_merchant/billing/gateways/modern_payments.rb +2 -2
  131. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +29 -31
  132. data/lib/active_merchant/billing/gateways/moka.rb +290 -0
  133. data/lib/active_merchant/billing/gateways/monei.rb +255 -138
  134. data/lib/active_merchant/billing/gateways/moneris.rb +226 -88
  135. data/lib/active_merchant/billing/gateways/money_movers.rb +11 -13
  136. data/lib/active_merchant/billing/gateways/mundipagg.rb +117 -43
  137. data/lib/active_merchant/billing/gateways/nab_transact.rb +28 -31
  138. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +13 -15
  139. data/lib/active_merchant/billing/gateways/net_registry.rb +12 -12
  140. data/lib/active_merchant/billing/gateways/netaxept.rb +33 -34
  141. data/lib/active_merchant/billing/gateways/netbanx.rb +167 -80
  142. data/lib/active_merchant/billing/gateways/netbilling.rb +27 -30
  143. data/lib/active_merchant/billing/gateways/netpay.rb +10 -10
  144. data/lib/active_merchant/billing/gateways/network_merchants.rb +7 -11
  145. data/lib/active_merchant/billing/gateways/nmi.rb +134 -48
  146. data/lib/active_merchant/billing/gateways/ogone.rb +88 -58
  147. data/lib/active_merchant/billing/gateways/omise.rb +30 -31
  148. data/lib/active_merchant/billing/gateways/openpay.rb +45 -26
  149. data/lib/active_merchant/billing/gateways/opp.rb +166 -144
  150. data/lib/active_merchant/billing/gateways/optimal_payment.rb +67 -64
  151. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +5 -7
  152. data/lib/active_merchant/billing/gateways/orbital.rb +726 -382
  153. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +26 -27
  154. data/lib/active_merchant/billing/gateways/pagarme.rb +47 -56
  155. data/lib/active_merchant/billing/gateways/pago_facil.rb +12 -14
  156. data/lib/active_merchant/billing/gateways/pay_arc.rb +392 -0
  157. data/lib/active_merchant/billing/gateways/pay_conex.rb +39 -40
  158. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +65 -65
  159. data/lib/active_merchant/billing/gateways/pay_hub.rb +39 -39
  160. data/lib/active_merchant/billing/gateways/pay_junction.rb +37 -37
  161. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +70 -54
  162. data/lib/active_merchant/billing/gateways/pay_secure.rb +15 -17
  163. data/lib/active_merchant/billing/gateways/pay_trace.rb +450 -0
  164. data/lib/active_merchant/billing/gateways/paybox_direct.rb +71 -47
  165. data/lib/active_merchant/billing/gateways/payeezy.rb +159 -32
  166. data/lib/active_merchant/billing/gateways/payex.rb +39 -42
  167. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +41 -36
  168. data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +11 -8
  169. data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +3 -3
  170. data/lib/active_merchant/billing/gateways/payflow.rb +178 -54
  171. data/lib/active_merchant/billing/gateways/payflow_express.rb +61 -65
  172. data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +0 -1
  173. data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -2
  174. data/lib/active_merchant/billing/gateways/payment_express.rb +66 -58
  175. data/lib/active_merchant/billing/gateways/paymentez.rb +114 -25
  176. data/lib/active_merchant/billing/gateways/paymill.rb +134 -133
  177. data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +2 -1
  178. data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +4 -0
  179. data/lib/active_merchant/billing/gateways/paypal.rb +27 -14
  180. data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
  181. data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +2 -2
  182. data/lib/active_merchant/billing/gateways/paypal_express.rb +5 -2
  183. data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
  184. data/lib/active_merchant/billing/gateways/paysafe.rb +420 -0
  185. data/lib/active_merchant/billing/gateways/payscout.rb +10 -13
  186. data/lib/active_merchant/billing/gateways/paystation.rb +79 -82
  187. data/lib/active_merchant/billing/gateways/payu_in.rb +59 -58
  188. data/lib/active_merchant/billing/gateways/payu_latam.rb +139 -97
  189. data/lib/active_merchant/billing/gateways/payway.rb +27 -27
  190. data/lib/active_merchant/billing/gateways/payway_dot_com.rb +253 -0
  191. data/lib/active_merchant/billing/gateways/pin.rb +87 -34
  192. data/lib/active_merchant/billing/gateways/plexo.rb +308 -0
  193. data/lib/active_merchant/billing/gateways/plugnpay.rb +82 -82
  194. data/lib/active_merchant/billing/gateways/priority.rb +392 -0
  195. data/lib/active_merchant/billing/gateways/pro_pay.rb +139 -140
  196. data/lib/active_merchant/billing/gateways/psigate.rb +44 -44
  197. data/lib/active_merchant/billing/gateways/psl_card.rb +29 -37
  198. data/lib/active_merchant/billing/gateways/qbms.rb +75 -76
  199. data/lib/active_merchant/billing/gateways/quantum.rb +21 -23
  200. data/lib/active_merchant/billing/gateways/quickbooks.rb +142 -55
  201. data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +103 -107
  202. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +156 -158
  203. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +7 -8
  204. data/lib/active_merchant/billing/gateways/quickpay.rb +1 -3
  205. data/lib/active_merchant/billing/gateways/qvalent.rb +137 -68
  206. data/lib/active_merchant/billing/gateways/rapyd.rb +319 -0
  207. data/lib/active_merchant/billing/gateways/reach.rb +277 -0
  208. data/lib/active_merchant/billing/gateways/realex.rb +132 -50
  209. data/lib/active_merchant/billing/gateways/redsys.rb +382 -186
  210. data/lib/active_merchant/billing/gateways/s5.rb +16 -16
  211. data/lib/active_merchant/billing/gateways/safe_charge.rb +83 -47
  212. data/lib/active_merchant/billing/gateways/sage.rb +49 -48
  213. data/lib/active_merchant/billing/gateways/sage_pay.rb +76 -83
  214. data/lib/active_merchant/billing/gateways/sallie_mae.rb +13 -15
  215. data/lib/active_merchant/billing/gateways/secure_net.rb +32 -40
  216. data/lib/active_merchant/billing/gateways/secure_pay.rb +30 -40
  217. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +23 -26
  218. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +14 -16
  219. data/lib/active_merchant/billing/gateways/securion_pay.rb +69 -31
  220. data/lib/active_merchant/billing/gateways/shift4.rb +342 -0
  221. data/lib/active_merchant/billing/gateways/simetrik.rb +368 -0
  222. data/lib/active_merchant/billing/gateways/skip_jack.rb +52 -53
  223. data/lib/active_merchant/billing/gateways/smart_ps.rb +51 -60
  224. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +29 -29
  225. data/lib/active_merchant/billing/gateways/spreedly_core.rb +66 -47
  226. data/lib/active_merchant/billing/gateways/stripe.rb +309 -148
  227. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +556 -0
  228. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +18 -23
  229. data/lib/active_merchant/billing/gateways/telr.rb +46 -48
  230. data/lib/active_merchant/billing/gateways/tns.rb +8 -7
  231. data/lib/active_merchant/billing/gateways/trans_first.rb +37 -37
  232. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +249 -245
  233. data/lib/active_merchant/billing/gateways/transact_pro.rb +25 -27
  234. data/lib/active_merchant/billing/gateways/transax.rb +6 -8
  235. data/lib/active_merchant/billing/gateways/transnational.rb +1 -2
  236. data/lib/active_merchant/billing/gateways/trexle.rb +22 -18
  237. data/lib/active_merchant/billing/gateways/trust_commerce.rb +161 -88
  238. data/lib/active_merchant/billing/gateways/usa_epay.rb +5 -6
  239. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +231 -238
  240. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +129 -55
  241. data/lib/active_merchant/billing/gateways/vanco.rb +42 -33
  242. data/lib/active_merchant/billing/gateways/verifi.rb +52 -53
  243. data/lib/active_merchant/billing/gateways/viaklix.rb +18 -22
  244. data/lib/active_merchant/billing/gateways/visanet_peru.rb +115 -74
  245. data/lib/active_merchant/billing/gateways/vpos.rb +223 -0
  246. data/lib/active_merchant/billing/gateways/webpay.rb +9 -9
  247. data/lib/active_merchant/billing/gateways/wepay.rb +38 -41
  248. data/lib/active_merchant/billing/gateways/wirecard.rb +36 -37
  249. data/lib/active_merchant/billing/gateways/wompi.rb +197 -0
  250. data/lib/active_merchant/billing/gateways/world_net.rb +39 -38
  251. data/lib/active_merchant/billing/gateways/worldpay.rb +756 -142
  252. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +73 -83
  253. data/lib/active_merchant/billing/gateways/worldpay_us.rb +31 -31
  254. data/lib/active_merchant/billing/model.rb +2 -2
  255. data/lib/active_merchant/billing/network_tokenization_credit_card.rb +3 -3
  256. data/lib/active_merchant/billing/rails.rb +1 -1
  257. data/lib/active_merchant/billing/response.rb +32 -13
  258. data/lib/active_merchant/billing/three_d_secure_eci_mapper.rb +27 -0
  259. data/lib/active_merchant/billing.rb +1 -0
  260. data/lib/active_merchant/connection.rb +24 -38
  261. data/lib/active_merchant/country.rb +9 -5
  262. data/lib/active_merchant/errors.rb +4 -1
  263. data/lib/active_merchant/net_http_ssl_connection.rb +2 -0
  264. data/lib/active_merchant/network_connection_retries.rb +28 -31
  265. data/lib/active_merchant/post_data.rb +5 -3
  266. data/lib/active_merchant/posts_data.rb +5 -7
  267. data/lib/active_merchant/version.rb +1 -1
  268. data/lib/active_merchant.rb +3 -3
  269. data/lib/activemerchant.rb +1 -1
  270. data/lib/certs/cacert.pem +1592 -2329
  271. data/lib/support/gateway_support.rb +8 -10
  272. data/lib/support/ssl_verify.rb +9 -14
  273. data/lib/support/ssl_version.rb +9 -10
  274. metadata +98 -37
  275. data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +0 -246
  276. data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +0 -13
  277. data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +0 -29
  278. data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +0 -66
  279. data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -309
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
7
7
  include BraintreeCommon
8
8
 
9
9
  self.display_name = 'Braintree (Orange Platform)'
10
- self.supported_countries = ["US"]
10
+ self.supported_countries = ['US']
11
11
 
12
12
  self.live_url = self.test_url = 'https://secure.braintreepaymentgateway.com/api/transact.php'
13
13
 
@@ -1,29 +1,28 @@
1
- require "nokogiri"
1
+ require 'nokogiri'
2
2
 
3
3
  module ActiveMerchant #:nodoc:
4
4
  module Billing #:nodoc:
5
5
  class BridgePayGateway < Gateway
6
- self.display_name = "BridgePay"
7
- self.homepage_url = "http://www.bridgepaynetwork.com/"
6
+ self.display_name = 'BridgePay'
7
+ self.homepage_url = 'http://www.bridgepaynetwork.com/'
8
8
 
9
- self.test_url = "https://gatewaystage.itstgate.com/SmartPayments/transact3.asmx"
10
- self.live_url = "https://gateway.itstgate.com/SmartPayments/transact3.asmx"
9
+ self.test_url = 'https://gatewaystage.itstgate.com/SmartPayments/transact3.asmx'
10
+ self.live_url = 'https://gateway.itstgate.com/SmartPayments/transact3.asmx'
11
11
 
12
- self.supported_countries = ["CA", "US"]
13
- self.default_currency = "USD"
14
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb]
12
+ self.supported_countries = %w[CA US]
13
+ self.default_currency = 'USD'
14
+ self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
15
15
 
16
-
17
- def initialize(options={})
16
+ def initialize(options = {})
18
17
  requires!(options, :user_name, :password)
19
18
  super
20
19
  end
21
20
 
22
- def purchase(amount, payment_method, options={})
23
- post = initialize_required_fields("Sale")
21
+ def purchase(amount, payment_method, options = {})
22
+ post = initialize_required_fields('Sale')
24
23
 
25
24
  # Allow the same amount in multiple transactions.
26
- post[:ExtData] = "<Force>T</Force>"
25
+ post[:ExtData] = '<Force>T</Force>'
27
26
  add_invoice(post, amount, options)
28
27
  add_payment_method(post, payment_method)
29
28
  add_customer_data(post, options)
@@ -31,8 +30,8 @@ module ActiveMerchant #:nodoc:
31
30
  commit(post)
32
31
  end
33
32
 
34
- def authorize(amount, payment_method, options={})
35
- post = initialize_required_fields("Auth")
33
+ def authorize(amount, payment_method, options = {})
34
+ post = initialize_required_fields('Auth')
36
35
 
37
36
  add_invoice(post, amount, options)
38
37
  add_payment_method(post, payment_method)
@@ -41,8 +40,8 @@ module ActiveMerchant #:nodoc:
41
40
  commit(post)
42
41
  end
43
42
 
44
- def capture(amount, authorization, options={})
45
- post = initialize_required_fields("Force")
43
+ def capture(amount, authorization, options = {})
44
+ post = initialize_required_fields('Force')
46
45
 
47
46
  add_invoice(post, amount, options)
48
47
  add_reference(post, authorization)
@@ -51,8 +50,8 @@ module ActiveMerchant #:nodoc:
51
50
  commit(post)
52
51
  end
53
52
 
54
- def refund(amount, authorization, options={})
55
- post = initialize_required_fields("Return")
53
+ def refund(amount, authorization, options = {})
54
+ post = initialize_required_fields('Return')
56
55
 
57
56
  add_invoice(post, amount, options)
58
57
  add_reference(post, authorization)
@@ -60,8 +59,8 @@ module ActiveMerchant #:nodoc:
60
59
  commit(post)
61
60
  end
62
61
 
63
- def void(authorization, options={})
64
- post = initialize_required_fields("Void")
62
+ def void(authorization, options = {})
63
+ post = initialize_required_fields('Void')
65
64
 
66
65
  add_reference(post, authorization)
67
66
 
@@ -75,10 +74,10 @@ module ActiveMerchant #:nodoc:
75
74
  end
76
75
  end
77
76
 
78
- def store(creditcard, options={})
77
+ def store(creditcard, options = {})
79
78
  post = initialize_required_fields('')
80
79
  post[:transaction] = 'Create'
81
- post[:CardNumber] = creditcard.number
80
+ post[:CardNumber] = creditcard.number
82
81
  post[:CustomerPaymentInfoKey] = ''
83
82
  post[:token] = ''
84
83
  add_payment_method(post, creditcard)
@@ -114,41 +113,41 @@ module ActiveMerchant #:nodoc:
114
113
  post[:TransitNum] = payment_method.routing_number
115
114
  post[:AccountNum] = payment_method.account_number
116
115
  post[:NameOnCheck] = payment_method.name
117
- post[:ExtData] = "<AccountType>#{payment_method.account_type.capitalize}</AccountType>"
116
+ post[:ExtData] = "<AccountType>#{payment_method.account_type.capitalize}</AccountType>" if payment_method.account_type
118
117
  end
119
118
  end
120
119
 
121
120
  def add_token(post, payment_method)
122
- payment_method = payment_method.split("|")
121
+ payment_method = payment_method.split('|')
123
122
  post[:ExtData] = "<Force>T</Force><CardVault><Transaction>Read</Transaction><CustomerPaymentInfoKey>#{payment_method[1]}</CustomerPaymentInfoKey><Token>#{payment_method[0]}</Token><ExpDate>#{payment_method[2]}</ExpDate></CardVault>"
124
123
  end
125
124
 
126
125
  def initialize_required_fields(transaction_type)
127
126
  post = {}
128
127
  post[:TransType] = transaction_type
129
- post[:Amount] = ""
130
- post[:PNRef] = ""
131
- post[:InvNum] = ""
132
- post[:CardNum] = ""
133
- post[:ExpDate] = ""
134
- post[:MagData] = ""
135
- post[:NameOnCard] = ""
136
- post[:Zip] = ""
137
- post[:Street] = ""
138
- post[:CVNum] = ""
139
- post[:MagData] = ""
140
- post[:ExtData] = ""
141
- post[:MICR] = ""
142
- post[:DL] = ""
143
- post[:SS] = ""
144
- post[:DOB] = ""
145
- post[:StateCode] = ""
146
- post[:CheckType] = ""
128
+ post[:Amount] = ''
129
+ post[:PNRef] = ''
130
+ post[:InvNum] = ''
131
+ post[:CardNum] = ''
132
+ post[:ExpDate] = ''
133
+ post[:MagData] = ''
134
+ post[:NameOnCard] = ''
135
+ post[:Zip] = ''
136
+ post[:Street] = ''
137
+ post[:CVNum] = ''
138
+ post[:MagData] = ''
139
+ post[:ExtData] = ''
140
+ post[:MICR] = ''
141
+ post[:DL] = ''
142
+ post[:SS] = ''
143
+ post[:DOB] = ''
144
+ post[:StateCode] = ''
145
+ post[:CheckType] = ''
147
146
  post
148
147
  end
149
148
 
150
149
  def add_customer_data(post, options)
151
- if(billing_address = (options[:billing_address] || options[:address]))
150
+ if (billing_address = (options[:billing_address] || options[:address]))
152
151
  post[:Street] = billing_address[:address1]
153
152
  post[:Zip] = billing_address[:zip]
154
153
  end
@@ -167,8 +166,8 @@ module ActiveMerchant #:nodoc:
167
166
  response = {}
168
167
 
169
168
  doc = Nokogiri::XML(xml)
170
- doc.root.xpath("*").each do |node|
171
- if (node.elements.size == 0)
169
+ doc.root&.xpath('*')&.each do |node|
170
+ if node.elements.size == 0
172
171
  response[node.name.downcase.to_sym] = node.text
173
172
  else
174
173
  node.elements.each do |childnode|
@@ -176,7 +175,7 @@ module ActiveMerchant #:nodoc:
176
175
  response[name.to_sym] = childnode.text
177
176
  end
178
177
  end
179
- end unless doc.root.nil?
178
+ end
180
179
 
181
180
  response
182
181
  end
@@ -208,7 +207,7 @@ module ActiveMerchant #:nodoc:
208
207
  end
209
208
 
210
209
  def success_from(response)
211
- response[:result] == "0"
210
+ response[:result] == '0'
212
211
  end
213
212
 
214
213
  def message_from(response)
@@ -217,14 +216,14 @@ module ActiveMerchant #:nodoc:
217
216
 
218
217
  def authorization_from(response)
219
218
  if response[:token]
220
- [response[:token], response[:customerpaymentinfokey], response[:expdate]].join("|")
219
+ [response[:token], response[:customerpaymentinfokey], response[:expdate]].join('|')
221
220
  else
222
- [response[:authcode], response[:pnref]].join("|")
221
+ [response[:authcode], response[:pnref]].join('|')
223
222
  end
224
223
  end
225
224
 
226
225
  def split_authorization(authorization)
227
- authcode, pnref = authorization.split("|")
226
+ authcode, pnref = authorization.split('|')
228
227
  [authcode, pnref]
229
228
  end
230
229
 
@@ -236,9 +235,9 @@ module ActiveMerchant #:nodoc:
236
235
 
237
236
  def post_data(post)
238
237
  {
239
- :UserName => @options[:user_name],
240
- :Password => @options[:password]
241
- }.merge(post).collect{|k,v| "#{k}=#{CGI.escape(v.to_s)}"}.join("&")
238
+ UserName: @options[:user_name],
239
+ Password: @options[:password]
240
+ }.merge(post).collect { |k, v| "#{k}=#{CGI.escape(v.to_s)}" }.join('&')
242
241
  end
243
242
  end
244
243
  end
@@ -1,11 +1,11 @@
1
1
  module ActiveMerchant #:nodoc:
2
2
  module Billing #:nodoc:
3
3
  class CamsGateway < Gateway
4
- self.live_url = "https://secure.centralams.com/gw/api/transact.php"
4
+ self.live_url = 'https://secure.centralams.com/gw/api/transact.php'
5
5
 
6
6
  self.supported_countries = ['US']
7
7
  self.default_currency = 'USD'
8
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
8
+ self.supported_cardtypes = %i[visa master american_express discover]
9
9
 
10
10
  self.homepage_url = 'https://www.centralams.com/'
11
11
  self.display_name = 'CAMS: Central Account Management System'
@@ -67,12 +67,12 @@ module ActiveMerchant #:nodoc:
67
67
  '894' => STANDARD_ERROR_CODE[:processing_error]
68
68
  }
69
69
 
70
- def initialize(options={})
70
+ def initialize(options = {})
71
71
  requires!(options, :username, :password)
72
72
  super
73
73
  end
74
74
 
75
- def purchase(money, payment, options={})
75
+ def purchase(money, payment, options = {})
76
76
  post = {}
77
77
  add_invoice(post, money, options)
78
78
 
@@ -83,10 +83,10 @@ module ActiveMerchant #:nodoc:
83
83
  post[:transactionid] = split_authorization(payment)[0]
84
84
  end
85
85
 
86
- commit("sale", post)
86
+ commit('sale', post)
87
87
  end
88
88
 
89
- def authorize(money, payment, options={})
89
+ def authorize(money, payment, options = {})
90
90
  post = {}
91
91
  add_invoice(post, money, options)
92
92
  add_payment(post, payment)
@@ -95,7 +95,7 @@ module ActiveMerchant #:nodoc:
95
95
  commit('auth', post)
96
96
  end
97
97
 
98
- def capture(money, authorization, options={})
98
+ def capture(money, authorization, options = {})
99
99
  post = {}
100
100
  add_reference(post, authorization)
101
101
  add_invoice(post, money, options)
@@ -103,20 +103,20 @@ module ActiveMerchant #:nodoc:
103
103
  commit('capture', post)
104
104
  end
105
105
 
106
- def refund(money, authorization, options={})
106
+ def refund(money, authorization, options = {})
107
107
  post = {}
108
108
  add_reference(post, authorization)
109
109
  add_invoice(post, money, options)
110
110
  commit('refund', post)
111
111
  end
112
112
 
113
- def void(authorization, options={})
113
+ def void(authorization, options = {})
114
114
  post = {}
115
115
  add_reference(post, authorization)
116
116
  commit('void', post)
117
117
  end
118
118
 
119
- def verify(credit_card, options={})
119
+ def verify(credit_card, options = {})
120
120
  post = {}
121
121
  add_invoice(post, 0, options)
122
122
  add_payment(post, credit_card)
@@ -138,26 +138,26 @@ module ActiveMerchant #:nodoc:
138
138
 
139
139
  private
140
140
 
141
- def add_address(post, creditcard, options={})
141
+ def add_address(post, creditcard, options = {})
142
142
  post[:firstname] = creditcard.first_name
143
- post[:lastname ] = creditcard.last_name
143
+ post[:lastname] = creditcard.last_name
144
144
 
145
145
  return unless options[:billing_address]
146
146
 
147
147
  address = options[:billing_address]
148
- post[:address1 ] = address[:address1]
149
- post[:address2 ] = address[:address2]
150
- post[:city ] = address[:city]
151
- post[:state ] = address[:state]
152
- post[:zip ] = address[:zip]
153
- post[:country ] = address[:country]
154
- post[:phone ] = address[:phone]
148
+ post[:address1] = address[:address1]
149
+ post[:address2] = address[:address2]
150
+ post[:city] = address[:city]
151
+ post[:state] = address[:state]
152
+ post[:zip] = address[:zip]
153
+ post[:country] = address[:country]
154
+ post[:phone] = address[:phone]
155
155
  end
156
156
 
157
157
  def add_reference(post, authorization)
158
158
  transaction_id, authcode = split_authorization(authorization)
159
- post["transactionid"] = transaction_id
160
- post["authcode"] = authcode
159
+ post['transactionid'] = transaction_id
160
+ post['authcode'] = authcode
161
161
  end
162
162
 
163
163
  def add_invoice(post, money, options)
@@ -167,15 +167,15 @@ module ActiveMerchant #:nodoc:
167
167
 
168
168
  def add_payment(post, payment)
169
169
  post[:ccnumber] = payment.number
170
- post[:ccexp ] = "#{payment.month.to_s.rjust(2,"0")}#{payment.year.to_s[-2..-1]}"
171
- post[:cvv ] = payment.verification_value
170
+ post[:ccexp] = "#{payment.month.to_s.rjust(2, '0')}#{payment.year.to_s[-2..-1]}"
171
+ post[:cvv] = payment.verification_value
172
172
  end
173
173
 
174
174
  def parse(body)
175
- kvs = body.split("&")
175
+ kvs = body.split('&')
176
176
 
177
177
  kvs.inject({}) { |h, kv|
178
- k,v = kv.split("=")
178
+ k, v = kv.split('=')
179
179
  h[k] = v
180
180
  h
181
181
  }
@@ -199,19 +199,19 @@ module ActiveMerchant #:nodoc:
199
199
  end
200
200
 
201
201
  def success_from(response)
202
- response["response_code"] == "100"
202
+ response['response_code'] == '100'
203
203
  end
204
204
 
205
205
  def message_from(response)
206
- response["responsetext"]
206
+ response['responsetext']
207
207
  end
208
208
 
209
209
  def authorization_from(response)
210
- [response["transactionid"], response["authcode"]].join("#")
210
+ [response['transactionid'], response['authcode']].join('#')
211
211
  end
212
212
 
213
213
  def split_authorization(authorization)
214
- transaction_id, authcode = authorization.split("#")
214
+ transaction_id, authcode = authorization.split('#')
215
215
  [transaction_id, authcode]
216
216
  end
217
217
 
@@ -219,11 +219,11 @@ module ActiveMerchant #:nodoc:
219
219
  parameters[:password] = @options[:password]
220
220
  parameters[:username] = @options[:username]
221
221
 
222
- parameters.collect{|k,v| "#{k}=#{v}" }.join("&")
222
+ parameters.collect { |k, v| "#{k}=#{v}" }.join('&')
223
223
  end
224
224
 
225
225
  def error_code_from(response)
226
- STANDARD_ERROR_CODE_MAPPING[response["response_code"]]
226
+ STANDARD_ERROR_CODE_MAPPING[response['response_code']]
227
227
  end
228
228
  end
229
229
  end
@@ -1,12 +1,12 @@
1
1
  module ActiveMerchant #:nodoc:
2
2
  module Billing #:nodoc:
3
3
  class CardConnectGateway < Gateway
4
- self.test_url = 'https://fts.cardconnect.com:6443/cardconnect/rest/'
5
- self.live_url = 'https://fts.cardconnect.com:8443/cardconnect/rest/'
4
+ self.test_url = 'https://fts-uat.cardconnect.com/cardconnect/rest/'
5
+ self.live_url = 'https://fts.cardconnect.com/cardconnect/rest/'
6
6
 
7
7
  self.supported_countries = ['US']
8
8
  self.default_currency = 'USD'
9
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
9
+ self.supported_cardtypes = %i[visa master american_express discover]
10
10
 
11
11
  self.homepage_url = 'https://cardconnect.com/'
12
12
  self.display_name = 'Card Connect'
@@ -61,6 +61,8 @@ module ActiveMerchant #:nodoc:
61
61
  '60' => STANDARD_ERROR_CODE[:pickup_card]
62
62
  }
63
63
 
64
+ SCHEDULED_PAYMENT_TYPES = %w(recurring installment)
65
+
64
66
  def initialize(options = {})
65
67
  requires!(options, :merchant_id, :username, :password)
66
68
  require_valid_domain!(options, :domain)
@@ -68,8 +70,8 @@ module ActiveMerchant #:nodoc:
68
70
  end
69
71
 
70
72
  def require_valid_domain!(options, param)
71
- if options.key?(param)
72
- raise ArgumentError.new('not a valid cardconnect domain') unless /\Dcardconnect.com:\d{1,}\D/ =~ options[param]
73
+ if options[param]
74
+ raise ArgumentError.new('not a valid cardconnect domain') unless /https:\/\/\D*cardconnect.com/ =~ options[param]
73
75
  end
74
76
  end
75
77
 
@@ -87,7 +89,9 @@ module ActiveMerchant #:nodoc:
87
89
  add_currency(post, money, options)
88
90
  add_address(post, options)
89
91
  add_customer_data(post, options)
90
- add_3DS(post, options)
92
+ add_three_ds_mpi_data(post, options)
93
+ add_additional_data(post, options)
94
+ add_stored_credential(post, options)
91
95
  post[:capture] = 'Y'
92
96
  commit('auth', post)
93
97
  end
@@ -101,7 +105,9 @@ module ActiveMerchant #:nodoc:
101
105
  add_payment(post, payment)
102
106
  add_address(post, options)
103
107
  add_customer_data(post, options)
104
- add_3DS(post, options)
108
+ add_three_ds_mpi_data(post, options)
109
+ add_additional_data(post, options)
110
+ add_stored_credential(post, options)
105
111
  commit('auth', post)
106
112
  end
107
113
 
@@ -130,17 +136,32 @@ module ActiveMerchant #:nodoc:
130
136
  authorize(0, credit_card, options)
131
137
  end
132
138
 
139
+ def store(payment, options = {})
140
+ post = {}
141
+ add_payment(post, payment)
142
+ add_address(post, options)
143
+ add_customer_data(post, options)
144
+ commit('profile', post)
145
+ end
146
+
147
+ def unstore(authorization, options = {})
148
+ account_id, profile_id = authorization.split('|')
149
+ commit('profile', {},
150
+ verb: :delete,
151
+ path: "/#{profile_id}/#{account_id}/#{@options[:merchant_id]}")
152
+ end
153
+
133
154
  def supports_scrubbing?
134
155
  true
135
156
  end
136
157
 
137
158
  def scrub(transcript)
138
- transcript
139
- .gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]')
140
- .gsub(%r(("cvv2\\":\\")\d*), '\1[FILTERED]')
141
- .gsub(%r(("merchid\\":\\")\d*), '\1[FILTERED]')
142
- .gsub(%r((&?"account\\":\\")\d*), '\1[FILTERED]')
143
- .gsub(%r((&?"token\\":\\")\d*), '\1[FILTERED]')
159
+ transcript.
160
+ gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
161
+ gsub(%r(("cvv2\\":\\")\d*), '\1[FILTERED]').
162
+ gsub(%r(("merchid\\":\\")\d*), '\1[FILTERED]').
163
+ gsub(%r((&?"account\\":\\")\d*), '\1[FILTERED]').
164
+ gsub(%r((&?"token\\":\\")\d*), '\1[FILTERED]')
144
165
  end
145
166
 
146
167
  private
@@ -152,7 +173,7 @@ module ActiveMerchant #:nodoc:
152
173
  def add_address(post, options)
153
174
  if address = options[:billing_address] || options[:address]
154
175
  post[:address] = address[:address1] if address[:address1]
155
- post[:address].concat(" #{address[:address2]}") if address[:address2]
176
+ post[:address2] = address[:address2] if address[:address2]
156
177
  post[:city] = address[:city] if address[:city]
157
178
  post[:region] = address[:state] if address[:state]
158
179
  post[:country] = address[:country] if address[:country]
@@ -171,17 +192,27 @@ module ActiveMerchant #:nodoc:
171
192
 
172
193
  def add_invoice(post, options)
173
194
  post[:orderid] = options[:order_id]
174
- post[:ecomind] = (options[:recurring] ? 'R' : 'E')
195
+ post[:ecomind] = if options[:ecomind]
196
+ options[:ecomind].capitalize
197
+ else
198
+ (options[:recurring] ? 'R' : 'E')
199
+ end
175
200
  end
176
201
 
177
202
  def add_payment(post, payment)
178
- post[:name] = payment.name
179
- if card_brand(payment) == 'check'
180
- add_echeck(post, payment)
203
+ if payment.is_a?(String)
204
+ account_id, profile_id = payment.split('|')
205
+ post[:profile] = profile_id
206
+ post[:acctid] = account_id
181
207
  else
182
- post[:account] = payment.number
183
- post[:expiry] = expdate(payment)
184
- post[:cvv2] = payment.verification_value
208
+ post[:name] = payment.name
209
+ if card_brand(payment) == 'check'
210
+ add_echeck(post, payment)
211
+ else
212
+ post[:account] = payment.number
213
+ post[:expiry] = expdate(payment)
214
+ post[:cvv2] = payment.verification_value
215
+ end
185
216
  end
186
217
  end
187
218
 
@@ -210,16 +241,28 @@ module ActiveMerchant #:nodoc:
210
241
  post[:items] = options[:items].map do |item|
211
242
  updated = {}
212
243
  item.each_pair do |k, v|
213
- updated.merge!(k.to_s.gsub(/_/, '') => v)
244
+ updated.merge!(k.to_s.delete('_') => v)
214
245
  end
246
+ updated
215
247
  end
216
248
  end
249
+ post[:userfields] = options[:user_fields] if options[:user_fields]
217
250
  end
218
251
 
219
- def add_3DS(post, options)
220
- post[:secureflag] = options[:secure_flag] if options[:secure_flag]
221
- post[:securevalue] = options[:secure_value] if options[:secure_value]
222
- post[:securexid] = options[:secure_xid] if options[:secure_xid]
252
+ def add_three_ds_mpi_data(post, options)
253
+ return unless three_d_secure = options[:three_d_secure]
254
+
255
+ post[:secureflag] = three_d_secure[:eci]
256
+ post[:securevalue] = three_d_secure[:cavv]
257
+ post[:securedstid] = three_d_secure[:ds_transaction_id]
258
+ end
259
+
260
+ def add_stored_credential(post, options)
261
+ return unless stored_credential = options[:stored_credential]
262
+
263
+ post[:cof] = stored_credential[:initiator] == 'merchant' ? 'M' : 'C'
264
+ post[:cofscheduled] = SCHEDULED_PAYMENT_TYPES.include?(stored_credential[:reason_type]) ? 'Y' : 'N'
265
+ post[:cofpermission] = stored_credential[:initial_transaction] ? 'Y' : 'N'
223
266
  end
224
267
 
225
268
  def headers
@@ -237,18 +280,19 @@ module ActiveMerchant #:nodoc:
237
280
  JSON.parse(body)
238
281
  end
239
282
 
240
- def url(action)
283
+ def url(action, path)
241
284
  if test?
242
- test_url + action
285
+ test_url + action + path
243
286
  else
244
- (@options[:domain] ? @options[:domain] : live_url) + action
287
+ (@options[:domain] || live_url) + action + path
245
288
  end
246
289
  end
247
290
 
248
- def commit(action, parameters)
291
+ def commit(action, parameters, verb: :put, path: '')
292
+ parameters[:frontendid] = application_id
249
293
  parameters[:merchid] = @options[:merchant_id]
250
- url = url(action)
251
- response = parse(ssl_request(:put, url, post_data(parameters), headers))
294
+ url = url(action, path)
295
+ response = parse(ssl_request(verb, url, post_data(parameters), headers))
252
296
 
253
297
  Response.new(
254
298
  success_from(response),
@@ -260,6 +304,10 @@ module ActiveMerchant #:nodoc:
260
304
  test: test?,
261
305
  error_code: error_code_from(response)
262
306
  )
307
+ rescue ResponseError => e
308
+ return Response.new(false, 'Unable to authenticate. Please check your credentials.', {}, test: test?) if e.response.code == '401'
309
+
310
+ raise
263
311
  end
264
312
 
265
313
  def success_from(response)
@@ -271,7 +319,11 @@ module ActiveMerchant #:nodoc:
271
319
  end
272
320
 
273
321
  def authorization_from(response)
274
- response['retref']
322
+ if response['profileid']
323
+ "#{response['acctid']}|#{response['profileid']}"
324
+ else
325
+ response['retref']
326
+ end
275
327
  end
276
328
 
277
329
  def post_data(parameters = {})
@@ -1,23 +1,21 @@
1
1
  module ActiveMerchant #:nodoc:
2
2
  module Billing #:nodoc:
3
3
  class CardSaveGateway < IridiumGateway
4
- #CardSave lets you handle failovers on payments by providing 3 gateways in case one happens to be down
5
- #URLS = ['https://gw1.cardsaveonlinepayments.com:4430/','https://gw2.cardsaveonlinepayments.com:4430/','https://gw3.cardsaveonlinepayments.com:4430/']
6
-
4
+ # CardSave lets you handle failovers on payments by providing 3 gateways in case one happens to be down
5
+ # URLS = ['https://gw1.cardsaveonlinepayments.com:4430/','https://gw2.cardsaveonlinepayments.com:4430/','https://gw3.cardsaveonlinepayments.com:4430/']
6
+
7
7
  self.money_format = :cents
8
8
  self.default_currency = 'GBP'
9
- self.supported_cardtypes = [ :visa, :switch, :maestro, :master, :solo, :american_express, :jcb ]
10
- self.supported_countries = [ 'GB' ]
9
+ self.supported_cardtypes = %i[visa maestro master american_express jcb]
10
+ self.supported_countries = ['GB']
11
11
  self.homepage_url = 'http://www.cardsave.net/'
12
12
  self.display_name = 'CardSave'
13
-
14
- def initialize(options={})
13
+
14
+ def initialize(options = {})
15
15
  super
16
16
  @test_url = 'https://gw1.cardsaveonlinepayments.com:4430/'
17
17
  @live_url = 'https://gw1.cardsaveonlinepayments.com:4430/'
18
18
  end
19
-
20
19
  end
21
20
  end
22
21
  end
23
-