activemerchant 1.43.3 → 1.44.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 (326) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/CHANGELOG +133 -3
  5. data/CONTRIBUTORS +25 -0
  6. data/README.md +14 -39
  7. data/lib/active_merchant.rb +43 -2
  8. data/lib/active_merchant/billing.rb +3 -1
  9. data/lib/active_merchant/billing/base.rb +10 -2
  10. data/lib/active_merchant/billing/check.rb +29 -22
  11. data/lib/active_merchant/billing/compatibility.rb +120 -0
  12. data/lib/active_merchant/billing/credit_card.rb +129 -60
  13. data/lib/active_merchant/billing/credit_card_formatting.rb +4 -1
  14. data/lib/active_merchant/billing/credit_card_methods.rb +60 -43
  15. data/lib/active_merchant/billing/cvv_result.rb +15 -15
  16. data/lib/active_merchant/billing/gateway.rb +46 -11
  17. data/lib/active_merchant/billing/gateways/adyen.rb +205 -0
  18. data/lib/active_merchant/billing/gateways/app55.rb +1 -9
  19. data/lib/active_merchant/billing/gateways/authorize_net.rb +7 -391
  20. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +417 -0
  21. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +20 -4
  22. data/lib/active_merchant/billing/gateways/balanced.rb +127 -367
  23. data/lib/active_merchant/billing/gateways/barclays_epdq.rb +1 -1
  24. data/lib/active_merchant/billing/gateways/beanstream.rb +25 -6
  25. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +3 -3
  26. data/lib/active_merchant/billing/gateways/blue_pay.rb +11 -3
  27. data/lib/active_merchant/billing/gateways/bogus.rb +1 -13
  28. data/lib/active_merchant/billing/gateways/borgun.rb +211 -0
  29. data/lib/active_merchant/billing/gateways/braintree_blue.rb +31 -13
  30. data/lib/active_merchant/billing/gateways/bridge_pay.rb +7 -0
  31. data/lib/active_merchant/billing/gateways/cashnet.rb +184 -0
  32. data/lib/active_merchant/billing/gateways/cc5.rb +45 -0
  33. data/lib/active_merchant/billing/gateways/certo_direct.rb +3 -2
  34. data/lib/active_merchant/billing/gateways/commercegate.rb +143 -0
  35. data/lib/active_merchant/billing/gateways/conekta.rb +56 -81
  36. data/lib/active_merchant/billing/gateways/cyber_source.rb +1 -0
  37. data/lib/active_merchant/billing/gateways/data_cash.rb +3 -1
  38. data/lib/active_merchant/billing/gateways/efsnet.rb +3 -14
  39. data/lib/active_merchant/billing/gateways/elavon.rb +45 -9
  40. data/lib/active_merchant/billing/gateways/epay.rb +2 -2
  41. data/lib/active_merchant/billing/gateways/eway.rb +1 -12
  42. data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
  43. data/lib/active_merchant/billing/gateways/eway_rapid.rb +233 -202
  44. data/lib/active_merchant/billing/gateways/exact.rb +1 -1
  45. data/lib/active_merchant/billing/gateways/fat_zebra.rb +1 -1
  46. data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -8
  47. data/lib/active_merchant/billing/gateways/finansbank.rb +2 -1
  48. data/lib/active_merchant/billing/gateways/first_pay.rb +108 -124
  49. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +43 -13
  50. data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
  51. data/lib/active_merchant/billing/gateways/hps.rb +281 -0
  52. data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
  53. data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +1 -4
  54. data/lib/active_merchant/billing/gateways/inspire.rb +0 -8
  55. data/lib/active_merchant/billing/gateways/iridium.rb +25 -3
  56. data/lib/active_merchant/billing/gateways/jetpay.rb +1 -1
  57. data/lib/active_merchant/billing/gateways/linkpoint.rb +4 -13
  58. data/lib/active_merchant/billing/gateways/litle.rb +10 -4
  59. data/lib/active_merchant/billing/gateways/maxipago.rb +7 -0
  60. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +0 -6
  61. data/lib/active_merchant/billing/gateways/merchant_ware.rb +4 -11
  62. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +3 -10
  63. data/lib/active_merchant/billing/gateways/mercury.rb +0 -7
  64. data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -20
  65. data/lib/active_merchant/billing/gateways/migs.rb +1 -1
  66. data/lib/active_merchant/billing/gateways/moneris.rb +29 -21
  67. data/lib/active_merchant/billing/gateways/moneris_us.rb +1 -11
  68. data/lib/active_merchant/billing/gateways/money_movers.rb +1 -8
  69. data/lib/active_merchant/billing/gateways/nab_transact.rb +16 -15
  70. data/lib/active_merchant/billing/gateways/net_registry.rb +1 -1
  71. data/lib/active_merchant/billing/gateways/netbilling.rb +0 -7
  72. data/lib/active_merchant/billing/gateways/network_merchants.rb +21 -18
  73. data/lib/active_merchant/billing/gateways/ogone.rb +3 -3
  74. data/lib/active_merchant/billing/gateways/openpay.rb +1 -8
  75. data/lib/active_merchant/billing/gateways/optimal_payment.rb +34 -23
  76. data/lib/active_merchant/billing/gateways/orbital.rb +121 -4
  77. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +22 -21
  78. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +2 -9
  79. data/lib/active_merchant/billing/gateways/pago_facil.rb +122 -0
  80. data/lib/active_merchant/billing/gateways/pay_junction.rb +3 -13
  81. data/lib/active_merchant/billing/gateways/pay_secure.rb +0 -7
  82. data/lib/active_merchant/billing/gateways/paybox_direct.rb +1 -9
  83. data/lib/active_merchant/billing/gateways/payex.rb +1 -1
  84. data/lib/active_merchant/billing/gateways/payflow.rb +7 -1
  85. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +15 -15
  86. data/lib/active_merchant/billing/gateways/payflow_express.rb +19 -19
  87. data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
  88. data/lib/active_merchant/billing/gateways/paymill.rb +7 -2
  89. data/lib/active_merchant/billing/gateways/paypal.rb +25 -14
  90. data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +1 -1
  91. data/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb +16 -2
  92. data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +3 -2
  93. data/lib/active_merchant/billing/gateways/paypal_express.rb +25 -0
  94. data/lib/active_merchant/billing/gateways/payscout.rb +1 -8
  95. data/lib/active_merchant/billing/gateways/pin.rb +39 -7
  96. data/lib/active_merchant/billing/gateways/plugnpay.rb +1 -12
  97. data/lib/active_merchant/billing/gateways/psigate.rb +1 -12
  98. data/lib/active_merchant/billing/gateways/qbms.rb +1 -1
  99. data/lib/active_merchant/billing/gateways/quantum.rb +2 -2
  100. data/lib/active_merchant/billing/gateways/quickpay.rb +17 -15
  101. data/lib/active_merchant/billing/gateways/realex.rb +3 -12
  102. data/lib/active_merchant/billing/gateways/sage.rb +1 -1
  103. data/lib/active_merchant/billing/gateways/sage/sage_bankcard.rb +2 -8
  104. data/lib/active_merchant/billing/gateways/sage/sage_core.rb +1 -1
  105. data/lib/active_merchant/billing/gateways/sage/sage_virtual_check.rb +1 -1
  106. data/lib/active_merchant/billing/gateways/sage_pay.rb +93 -28
  107. data/lib/active_merchant/billing/gateways/secure_net.rb +1 -8
  108. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +3 -3
  109. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +0 -7
  110. data/lib/active_merchant/billing/gateways/skip_jack.rb +1 -2
  111. data/lib/active_merchant/billing/gateways/smart_ps.rb +8 -2
  112. data/lib/active_merchant/billing/gateways/spreedly_core.rb +2 -1
  113. data/lib/active_merchant/billing/gateways/stripe.rb +14 -15
  114. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +0 -1
  115. data/lib/active_merchant/billing/gateways/trust_commerce.rb +4 -9
  116. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +46 -43
  117. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +7 -0
  118. data/lib/active_merchant/billing/gateways/verifi.rb +1 -8
  119. data/lib/active_merchant/billing/gateways/viaklix.rb +0 -6
  120. data/lib/active_merchant/billing/gateways/vindicia.rb +68 -44
  121. data/lib/active_merchant/billing/gateways/webpay.rb +1 -9
  122. data/lib/active_merchant/billing/gateways/wirecard.rb +117 -11
  123. data/lib/active_merchant/billing/gateways/worldpay.rb +50 -22
  124. data/lib/active_merchant/billing/gateways/worldpay_us.rb +181 -0
  125. data/lib/active_merchant/billing/model.rb +30 -0
  126. data/lib/active_merchant/billing/rails.rb +3 -0
  127. data/lib/active_merchant/billing/response.rb +20 -15
  128. data/lib/active_merchant/country.rb +327 -0
  129. data/lib/active_merchant/empty.rb +20 -0
  130. data/lib/active_merchant/errors.rb +29 -0
  131. data/lib/active_merchant/offsite_payments_shim.rb +19 -0
  132. data/lib/active_merchant/version.rb +1 -1
  133. metadata +60 -243
  134. metadata.gz.sig +0 -0
  135. data/gem-public_cert.pem +0 -21
  136. data/lib/active_merchant/billing/expiry_date.rb +0 -34
  137. data/lib/active_merchant/billing/gateways/orbital/avs_result.rb +0 -93
  138. data/lib/active_merchant/billing/gateways/orbital/cvv_result.rb +0 -34
  139. data/lib/active_merchant/billing/integrations.rb +0 -17
  140. data/lib/active_merchant/billing/integrations/a1agregator.rb +0 -26
  141. data/lib/active_merchant/billing/integrations/a1agregator/helper.rb +0 -31
  142. data/lib/active_merchant/billing/integrations/a1agregator/notification.rb +0 -186
  143. data/lib/active_merchant/billing/integrations/a1agregator/status.rb +0 -38
  144. data/lib/active_merchant/billing/integrations/action_view_helper.rb +0 -78
  145. data/lib/active_merchant/billing/integrations/authorize_net_sim.rb +0 -38
  146. data/lib/active_merchant/billing/integrations/authorize_net_sim/helper.rb +0 -229
  147. data/lib/active_merchant/billing/integrations/authorize_net_sim/notification.rb +0 -340
  148. data/lib/active_merchant/billing/integrations/bit_pay.rb +0 -30
  149. data/lib/active_merchant/billing/integrations/bit_pay/helper.rb +0 -66
  150. data/lib/active_merchant/billing/integrations/bit_pay/notification.rb +0 -74
  151. data/lib/active_merchant/billing/integrations/bit_pay/return.rb +0 -10
  152. data/lib/active_merchant/billing/integrations/bogus.rb +0 -23
  153. data/lib/active_merchant/billing/integrations/bogus/helper.rb +0 -17
  154. data/lib/active_merchant/billing/integrations/bogus/notification.rb +0 -11
  155. data/lib/active_merchant/billing/integrations/bogus/return.rb +0 -10
  156. data/lib/active_merchant/billing/integrations/chronopay.rb +0 -23
  157. data/lib/active_merchant/billing/integrations/chronopay/helper.rb +0 -120
  158. data/lib/active_merchant/billing/integrations/chronopay/notification.rb +0 -158
  159. data/lib/active_merchant/billing/integrations/chronopay/return.rb +0 -10
  160. data/lib/active_merchant/billing/integrations/citrus.rb +0 -28
  161. data/lib/active_merchant/billing/integrations/citrus/helper.rb +0 -57
  162. data/lib/active_merchant/billing/integrations/citrus/notification.rb +0 -133
  163. data/lib/active_merchant/billing/integrations/citrus/return.rb +0 -40
  164. data/lib/active_merchant/billing/integrations/direc_pay.rb +0 -41
  165. data/lib/active_merchant/billing/integrations/direc_pay/helper.rb +0 -200
  166. data/lib/active_merchant/billing/integrations/direc_pay/notification.rb +0 -76
  167. data/lib/active_merchant/billing/integrations/direc_pay/return.rb +0 -32
  168. data/lib/active_merchant/billing/integrations/direc_pay/status.rb +0 -37
  169. data/lib/active_merchant/billing/integrations/directebanking.rb +0 -47
  170. data/lib/active_merchant/billing/integrations/directebanking/helper.rb +0 -90
  171. data/lib/active_merchant/billing/integrations/directebanking/notification.rb +0 -120
  172. data/lib/active_merchant/billing/integrations/directebanking/return.rb +0 -11
  173. data/lib/active_merchant/billing/integrations/doku.rb +0 -24
  174. data/lib/active_merchant/billing/integrations/doku/helper.rb +0 -102
  175. data/lib/active_merchant/billing/integrations/doku/notification.rb +0 -69
  176. data/lib/active_merchant/billing/integrations/doku/return.rb +0 -10
  177. data/lib/active_merchant/billing/integrations/dotpay.rb +0 -22
  178. data/lib/active_merchant/billing/integrations/dotpay/helper.rb +0 -77
  179. data/lib/active_merchant/billing/integrations/dotpay/notification.rb +0 -86
  180. data/lib/active_merchant/billing/integrations/dotpay/return.rb +0 -11
  181. data/lib/active_merchant/billing/integrations/dwolla.rb +0 -23
  182. data/lib/active_merchant/billing/integrations/dwolla/common.rb +0 -23
  183. data/lib/active_merchant/billing/integrations/dwolla/helper.rb +0 -43
  184. data/lib/active_merchant/billing/integrations/dwolla/notification.rb +0 -64
  185. data/lib/active_merchant/billing/integrations/dwolla/return.rb +0 -49
  186. data/lib/active_merchant/billing/integrations/e_payment_plans.rb +0 -48
  187. data/lib/active_merchant/billing/integrations/e_payment_plans/helper.rb +0 -34
  188. data/lib/active_merchant/billing/integrations/e_payment_plans/notification.rb +0 -84
  189. data/lib/active_merchant/billing/integrations/easy_pay.rb +0 -30
  190. data/lib/active_merchant/billing/integrations/easy_pay/common.rb +0 -40
  191. data/lib/active_merchant/billing/integrations/easy_pay/helper.rb +0 -36
  192. data/lib/active_merchant/billing/integrations/easy_pay/notification.rb +0 -59
  193. data/lib/active_merchant/billing/integrations/epay.rb +0 -21
  194. data/lib/active_merchant/billing/integrations/epay/helper.rb +0 -55
  195. data/lib/active_merchant/billing/integrations/epay/notification.rb +0 -110
  196. data/lib/active_merchant/billing/integrations/first_data.rb +0 -38
  197. data/lib/active_merchant/billing/integrations/first_data/helper.rb +0 -61
  198. data/lib/active_merchant/billing/integrations/first_data/notification.rb +0 -56
  199. data/lib/active_merchant/billing/integrations/gestpay.rb +0 -25
  200. data/lib/active_merchant/billing/integrations/gestpay/common.rb +0 -42
  201. data/lib/active_merchant/billing/integrations/gestpay/helper.rb +0 -70
  202. data/lib/active_merchant/billing/integrations/gestpay/notification.rb +0 -85
  203. data/lib/active_merchant/billing/integrations/gestpay/return.rb +0 -10
  204. data/lib/active_merchant/billing/integrations/helper.rb +0 -123
  205. data/lib/active_merchant/billing/integrations/hi_trust.rb +0 -27
  206. data/lib/active_merchant/billing/integrations/hi_trust/helper.rb +0 -58
  207. data/lib/active_merchant/billing/integrations/hi_trust/notification.rb +0 -59
  208. data/lib/active_merchant/billing/integrations/hi_trust/return.rb +0 -68
  209. data/lib/active_merchant/billing/integrations/ipay88.rb +0 -23
  210. data/lib/active_merchant/billing/integrations/ipay88/helper.rb +0 -118
  211. data/lib/active_merchant/billing/integrations/ipay88/notification.rb +0 -103
  212. data/lib/active_merchant/billing/integrations/ipay88/return.rb +0 -29
  213. data/lib/active_merchant/billing/integrations/klarna.rb +0 -71
  214. data/lib/active_merchant/billing/integrations/klarna/helper.rb +0 -123
  215. data/lib/active_merchant/billing/integrations/klarna/notification.rb +0 -103
  216. data/lib/active_merchant/billing/integrations/liqpay.rb +0 -30
  217. data/lib/active_merchant/billing/integrations/liqpay/helper.rb +0 -43
  218. data/lib/active_merchant/billing/integrations/liqpay/notification.rb +0 -89
  219. data/lib/active_merchant/billing/integrations/liqpay/return.rb +0 -83
  220. data/lib/active_merchant/billing/integrations/maksuturva.rb +0 -86
  221. data/lib/active_merchant/billing/integrations/maksuturva/helper.rb +0 -119
  222. data/lib/active_merchant/billing/integrations/maksuturva/notification.rb +0 -48
  223. data/lib/active_merchant/billing/integrations/mollie_ideal.rb +0 -98
  224. data/lib/active_merchant/billing/integrations/mollie_ideal/helper.rb +0 -67
  225. data/lib/active_merchant/billing/integrations/mollie_ideal/notification.rb +0 -69
  226. data/lib/active_merchant/billing/integrations/mollie_ideal/return.rb +0 -10
  227. data/lib/active_merchant/billing/integrations/moneybookers.rb +0 -26
  228. data/lib/active_merchant/billing/integrations/moneybookers/helper.rb +0 -75
  229. data/lib/active_merchant/billing/integrations/moneybookers/notification.rb +0 -123
  230. data/lib/active_merchant/billing/integrations/nochex.rb +0 -88
  231. data/lib/active_merchant/billing/integrations/nochex/helper.rb +0 -68
  232. data/lib/active_merchant/billing/integrations/nochex/notification.rb +0 -94
  233. data/lib/active_merchant/billing/integrations/nochex/return.rb +0 -10
  234. data/lib/active_merchant/billing/integrations/notification.rb +0 -71
  235. data/lib/active_merchant/billing/integrations/pag_seguro.rb +0 -53
  236. data/lib/active_merchant/billing/integrations/pag_seguro/helper.rb +0 -121
  237. data/lib/active_merchant/billing/integrations/pag_seguro/notification.rb +0 -104
  238. data/lib/active_merchant/billing/integrations/paxum.rb +0 -44
  239. data/lib/active_merchant/billing/integrations/paxum/common.rb +0 -24
  240. data/lib/active_merchant/billing/integrations/paxum/helper.rb +0 -42
  241. data/lib/active_merchant/billing/integrations/paxum/notification.rb +0 -33
  242. data/lib/active_merchant/billing/integrations/pay_fast.rb +0 -70
  243. data/lib/active_merchant/billing/integrations/pay_fast/common.rb +0 -42
  244. data/lib/active_merchant/billing/integrations/pay_fast/helper.rb +0 -50
  245. data/lib/active_merchant/billing/integrations/pay_fast/notification.rb +0 -134
  246. data/lib/active_merchant/billing/integrations/pay_fast/return.rb +0 -10
  247. data/lib/active_merchant/billing/integrations/paydollar.rb +0 -59
  248. data/lib/active_merchant/billing/integrations/paydollar/helper.rb +0 -41
  249. data/lib/active_merchant/billing/integrations/paydollar/notification.rb +0 -64
  250. data/lib/active_merchant/billing/integrations/paydollar/return.rb +0 -15
  251. data/lib/active_merchant/billing/integrations/payflow_link.rb +0 -21
  252. data/lib/active_merchant/billing/integrations/payflow_link/helper.rb +0 -116
  253. data/lib/active_merchant/billing/integrations/payflow_link/notification.rb +0 -78
  254. data/lib/active_merchant/billing/integrations/paypal.rb +0 -39
  255. data/lib/active_merchant/billing/integrations/paypal/helper.rb +0 -119
  256. data/lib/active_merchant/billing/integrations/paypal/notification.rb +0 -227
  257. data/lib/active_merchant/billing/integrations/paypal/return.rb +0 -10
  258. data/lib/active_merchant/billing/integrations/paypal_payments_advanced.rb +0 -20
  259. data/lib/active_merchant/billing/integrations/paypal_payments_advanced/helper.rb +0 -15
  260. data/lib/active_merchant/billing/integrations/paysbuy.rb +0 -36
  261. data/lib/active_merchant/billing/integrations/paysbuy/helper.rb +0 -15
  262. data/lib/active_merchant/billing/integrations/paysbuy/notification.rb +0 -39
  263. data/lib/active_merchant/billing/integrations/payu_in.rb +0 -36
  264. data/lib/active_merchant/billing/integrations/payu_in/helper.rb +0 -76
  265. data/lib/active_merchant/billing/integrations/payu_in/notification.rb +0 -154
  266. data/lib/active_merchant/billing/integrations/payu_in/return.rb +0 -36
  267. data/lib/active_merchant/billing/integrations/payu_in_paisa.rb +0 -30
  268. data/lib/active_merchant/billing/integrations/payu_in_paisa/helper.rb +0 -19
  269. data/lib/active_merchant/billing/integrations/payu_in_paisa/notification.rb +0 -13
  270. data/lib/active_merchant/billing/integrations/payu_in_paisa/return.rb +0 -16
  271. data/lib/active_merchant/billing/integrations/platron.rb +0 -28
  272. data/lib/active_merchant/billing/integrations/platron/helper.rb +0 -32
  273. data/lib/active_merchant/billing/integrations/platron/notification.rb +0 -113
  274. data/lib/active_merchant/billing/integrations/pxpay.rb +0 -31
  275. data/lib/active_merchant/billing/integrations/pxpay/helper.rb +0 -113
  276. data/lib/active_merchant/billing/integrations/pxpay/notification.rb +0 -157
  277. data/lib/active_merchant/billing/integrations/pxpay/return.rb +0 -25
  278. data/lib/active_merchant/billing/integrations/quickpay.rb +0 -21
  279. data/lib/active_merchant/billing/integrations/quickpay/helper.rb +0 -96
  280. data/lib/active_merchant/billing/integrations/quickpay/notification.rb +0 -137
  281. data/lib/active_merchant/billing/integrations/rbkmoney.rb +0 -17
  282. data/lib/active_merchant/billing/integrations/rbkmoney/helper.rb +0 -23
  283. data/lib/active_merchant/billing/integrations/rbkmoney/notification.rb +0 -91
  284. data/lib/active_merchant/billing/integrations/return.rb +0 -42
  285. data/lib/active_merchant/billing/integrations/robokassa.rb +0 -49
  286. data/lib/active_merchant/billing/integrations/robokassa/common.rb +0 -19
  287. data/lib/active_merchant/billing/integrations/robokassa/helper.rb +0 -50
  288. data/lib/active_merchant/billing/integrations/robokassa/notification.rb +0 -55
  289. data/lib/active_merchant/billing/integrations/robokassa/return.rb +0 -17
  290. data/lib/active_merchant/billing/integrations/sage_pay_form.rb +0 -37
  291. data/lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb +0 -33
  292. data/lib/active_merchant/billing/integrations/sage_pay_form/helper.rb +0 -136
  293. data/lib/active_merchant/billing/integrations/sage_pay_form/notification.rb +0 -210
  294. data/lib/active_merchant/billing/integrations/sage_pay_form/return.rb +0 -31
  295. data/lib/active_merchant/billing/integrations/two_checkout.rb +0 -44
  296. data/lib/active_merchant/billing/integrations/two_checkout/helper.rb +0 -107
  297. data/lib/active_merchant/billing/integrations/two_checkout/notification.rb +0 -171
  298. data/lib/active_merchant/billing/integrations/two_checkout/return.rb +0 -58
  299. data/lib/active_merchant/billing/integrations/universal.rb +0 -23
  300. data/lib/active_merchant/billing/integrations/universal/helper.rb +0 -76
  301. data/lib/active_merchant/billing/integrations/universal/notification.rb +0 -52
  302. data/lib/active_merchant/billing/integrations/universal/return.rb +0 -18
  303. data/lib/active_merchant/billing/integrations/valitor.rb +0 -33
  304. data/lib/active_merchant/billing/integrations/valitor/helper.rb +0 -86
  305. data/lib/active_merchant/billing/integrations/valitor/notification.rb +0 -13
  306. data/lib/active_merchant/billing/integrations/valitor/response_fields.rb +0 -97
  307. data/lib/active_merchant/billing/integrations/valitor/return.rb +0 -13
  308. data/lib/active_merchant/billing/integrations/verkkomaksut.rb +0 -20
  309. data/lib/active_merchant/billing/integrations/verkkomaksut/helper.rb +0 -88
  310. data/lib/active_merchant/billing/integrations/verkkomaksut/notification.rb +0 -59
  311. data/lib/active_merchant/billing/integrations/web_pay.rb +0 -45
  312. data/lib/active_merchant/billing/integrations/web_pay/common.rb +0 -50
  313. data/lib/active_merchant/billing/integrations/web_pay/helper.rb +0 -68
  314. data/lib/active_merchant/billing/integrations/web_pay/notification.rb +0 -51
  315. data/lib/active_merchant/billing/integrations/webmoney.rb +0 -43
  316. data/lib/active_merchant/billing/integrations/webmoney/common.rb +0 -17
  317. data/lib/active_merchant/billing/integrations/webmoney/helper.rb +0 -40
  318. data/lib/active_merchant/billing/integrations/webmoney/notification.rb +0 -47
  319. data/lib/active_merchant/billing/integrations/wirecard_checkout_page.rb +0 -39
  320. data/lib/active_merchant/billing/integrations/wirecard_checkout_page/common.rb +0 -104
  321. data/lib/active_merchant/billing/integrations/wirecard_checkout_page/helper.rb +0 -145
  322. data/lib/active_merchant/billing/integrations/wirecard_checkout_page/notification.rb +0 -101
  323. data/lib/active_merchant/billing/integrations/wirecard_checkout_page/return.rb +0 -35
  324. data/lib/active_merchant/billing/integrations/world_pay.rb +0 -34
  325. data/lib/active_merchant/billing/integrations/world_pay/helper.rb +0 -101
  326. data/lib/active_merchant/billing/integrations/world_pay/notification.rb +0 -160
@@ -1,31 +0,0 @@
1
- module ActiveMerchant #:nodoc:
2
- module Billing #:nodoc:
3
- module Integrations #:nodoc:
4
- module SagePayForm
5
- class Return < ActiveMerchant::Billing::Integrations::Return
6
-
7
- def initialize(query_string, options)
8
- begin
9
- @notification = Notification.new(query_string, options)
10
- rescue Notification::CryptError => e
11
- @message = e.message
12
- end
13
- end
14
-
15
- def success?
16
- @notification && @notification.complete?
17
- end
18
-
19
- def cancelled?
20
- @notification && @notification.cancelled?
21
- end
22
-
23
- def message
24
- @message || @notification.message
25
- end
26
-
27
- end
28
- end
29
- end
30
- end
31
- end
@@ -1,44 +0,0 @@
1
- module ActiveMerchant #:nodoc:
2
- module Billing #:nodoc:
3
- module Integrations #:nodoc:
4
- module TwoCheckout
5
- autoload 'Helper', File.dirname(__FILE__) + '/two_checkout/helper'
6
- autoload 'Return', File.dirname(__FILE__) + '/two_checkout/return'
7
- autoload 'Notification', File.dirname(__FILE__) + '/two_checkout/notification'
8
-
9
- mattr_accessor :payment_routine
10
- self.payment_routine = :single_page
11
-
12
- def self.service_url
13
- case self.payment_routine
14
- when :multi_page
15
- 'https://www.2checkout.com/checkout/purchase'
16
- when :single_page
17
- 'https://www.2checkout.com/checkout/spurchase'
18
- else
19
- raise StandardError, "Integration payment routine set to an invalid value: #{self.payment_routine}"
20
- end
21
- end
22
-
23
- def self.service_url=(service_url)
24
- # Note: do not use this method, it is here for backward compatibility
25
- # Use the payment_routine method to change service_url
26
- if service_url =~ /spurchase/
27
- self.payment_routine = :single_page
28
- else
29
- self.payment_routine = :multi_page
30
- end
31
- end
32
-
33
-
34
- def self.notification(post, options = {})
35
- Notification.new(post, options)
36
- end
37
-
38
- def self.return(query_string, options = {})
39
- Return.new(query_string, options)
40
- end
41
- end
42
- end
43
- end
44
- end
@@ -1,107 +0,0 @@
1
- module ActiveMerchant #:nodoc:
2
- module Billing #:nodoc:
3
- module Integrations #:nodoc:
4
- module TwoCheckout
5
- class Helper < ActiveMerchant::Billing::Integrations::Helper
6
- def initialize(order, account, options = {})
7
- super
8
- if ActiveMerchant::Billing::Base.integration_mode == :test || options[:test]
9
- add_field('demo', 'Y')
10
- end
11
- end
12
-
13
- # The 2checkout vendor account number
14
- mapping :account, 'sid'
15
-
16
- # The total amount to be billed, in decimal form, without a currency symbol. (8 characters, decimal, 2 characters: Example: 99999999.99)
17
- # This field is only used with the Third Party Cart parameter set.
18
- mapping :amount, 'total'
19
-
20
- # Pass the sale's currency code.
21
- mapping :currency, 'currency_code'
22
-
23
- # Pass your order id. (50 characters max)
24
- mapping :order, 'merchant_order_id'
25
-
26
- # Pass your cart identifier if you are using Third Part Cart Parameters. (128 characters max)
27
- # This value is visible to the buyer and will be listed as the sale's lineitem.
28
- mapping :invoice, 'cart_order_id'
29
-
30
- mapping :customer,
31
- :email => 'email',
32
- :phone => 'phone'
33
-
34
- mapping :billing_address,
35
- :city => 'city',
36
- :address1 => 'street_address',
37
- :address2 => 'street_address2',
38
- :state => 'state',
39
- :zip => 'zip',
40
- :country => 'country'
41
-
42
- mapping :shipping_address,
43
- :name => 'ship_name',
44
- :city => 'ship_city',
45
- :address1 => 'ship_street_address',
46
- :address2 => 'ship_street_address2',
47
- :state => 'ship_state',
48
- :zip => 'ship_zip',
49
- :country => 'ship_country'
50
-
51
- # Overrides Approved URL for return process redirects
52
- mapping :return_url, 'x_receipt_link_url'
53
-
54
- # notifications are sent via static URLs in the Instant Notification Settings of 2Checkout admin
55
- mapping :notify_url, 'notify_url'
56
-
57
- # Allow seller to indicate the step of the checkout page
58
- # Possible values: ‘review-cart’, ‘shipping-information’, ‘shipping-method’, ‘billing-information’ and ‘payment-method’
59
- mapping :purchase_step, 'purchase_step'
60
-
61
- # Allow referral partners to indicate their shopping cart
62
- mapping :cart_type, '2co_cart_type'
63
-
64
- def customer(params = {})
65
- add_field(mappings[:customer][:email], params[:email])
66
- add_field(mappings[:customer][:phone], params[:phone])
67
- add_field('card_holder_name', "#{params[:first_name]} #{params[:last_name]}")
68
- end
69
-
70
- def shipping_address(params = {})
71
- super
72
- add_field(mappings[:shipping_address][:name], "#{params[:first_name]} #{params[:last_name]}")
73
- end
74
-
75
- # Uses Pass Through Product Parameters to pass in lineitems.
76
- def line_item(params = {})
77
- add_field('mode', '2CO')
78
- (max_existing_line_item_id = form_fields.keys.map do |key|
79
- i = key.to_s[/^li_(\d+)_/, 1]
80
- (i && i.to_i)
81
- end.compact.max || 0)
82
-
83
- line_item_id = max_existing_line_item_id + 1
84
- params.each do |key, value|
85
- add_field("li_#{line_item_id}_#{key}", value)
86
- end
87
- end
88
-
89
- # Uses Third Party Cart parameter set to pass in lineitem details.
90
- # You must also specify `service.invoice` when using this method.
91
- def third_party_cart(params = {})
92
- add_field('id_type', '1')
93
- (max_existing_line_item_id = form_fields.keys.map do |key|
94
- i = key.to_s[/^c_prod_(\d+)/, 1]
95
- (i && i.to_i)
96
- end.compact.max || 0)
97
-
98
- line_item_id = max_existing_line_item_id + 1
99
- params.each do |key, value|
100
- add_field("c_#{key}_#{line_item_id}", value)
101
- end
102
- end
103
- end
104
- end
105
- end
106
- end
107
- end
@@ -1,171 +0,0 @@
1
- require 'net/http'
2
- require 'base64'
3
- require 'digest/md5'
4
-
5
- module ActiveMerchant #:nodoc:
6
- module Billing #:nodoc:
7
- module Integrations #:nodoc:
8
- module TwoCheckout
9
- class Notification < ActiveMerchant::Billing::Integrations::Notification
10
-
11
- # message_type - Indicates type of message
12
- # message_description - Human readable description of message_type
13
- # timestamp - Timestamp of event; format YYYY-MM-DD HH:MM:SS ZZZ
14
- # md5_hash - UPPERCASE(MD5_ENCRYPTED(sale_id + vendor_id + invoice_id + Secret Word))
15
- # message_id - This number is incremented for each message sent to a given seller.
16
- # key_count - Indicates the number of parameters sent in message
17
- # vendor_id - Seller account number
18
- # sale_id - 2Checkout sale number
19
- # sale_date_placed - Date of sale; format YYYY-MM-DD
20
- # vendor_order_id - Custom order id provided by seller, if available.
21
- # invoice_id - 2Checkout invoice number; Each recurring sale can have several invoices
22
- # recurring - recurring=1 if any item on the invoice is a recurring item, 0 otherwise
23
- # payment_type - Buyer’s payment method (credit card, online check, paypal ec, OR paypal pay later)
24
- # list_currency - 3-Letter ISO code for seller currency
25
- # cust_currency - 3-Letter ISO code for buyer currency
26
- # auth_exp - The date credit authorization will expire; format YYYY-MM-DD
27
- # invoice_status - Status of a transaction (approved, pending, deposited, or declined)
28
- # fraud_status - Status of 2Checkout fraud review (pass, fail, or wait); This parameter could be empty.
29
- # invoice_list_amount - Total in seller pricing currency; format as appropriate to currency=
30
- # invoice_usd_amount - Total in US Dollars; format with 2 decimal places
31
- # invoice_cust_amount - Total in buyer currency; format as appropriate to currency=
32
- # customer_first_name - Buyer’s first name (may not be available on older sales)
33
- # customer_last_name - Buyer’s last name (may not be available on older sales)
34
- # customer_name - Buyer's full name (name as it appears on credit card)
35
- # customer_email - Buyer's email address
36
- # customer_phone - Buyer's phone number; all but digits stripped out
37
- # customer_ip - Buyer's IP address at time of sale
38
- # customer_ip_country - Country of record for buyer's IP address at time of sale
39
- # bill_street_address - Billing street address
40
- # bill_street_address2 - Billing street address line 2
41
- # bill_city - Billing address city
42
- # bill_state - Billing address state or province
43
- # bill_postal_code - Billing address postal code
44
- # bill_country - 3-Letter ISO country code of billing address
45
- # ship_status - not_shipped, shipped, or empty (if intangible / does not need shipped)
46
- # ship_tracking_number - Tracking Number as entered in Seller Admin
47
- # ship_name - Shipping Recipient’s name (as it should appears on shipping label)
48
- # ship_street_address - Shipping street address
49
- # ship_street_address2 - Shipping street address line 2
50
- # ship_city - Shipping address city
51
- # ship_state - Shipping address state or province
52
- # ship_postal_code - Shipping address postal code
53
- # ship_country - 3-Letter ISO country code of shipping address
54
- # item_count - Indicates how many numbered sets of item parameters to expect
55
- # item_name_# - Product name
56
- # item_id_# - Seller product id
57
- # item_list_amount_# - Total in seller pricing currency; format as appropriate to currency
58
- # item_usd_amount_# - Total in US Dollars; format with 2 decimal places
59
- # item_cust_amount_# - Total in buyer currency; format as appropriate to currency
60
- # item_type_# - Indicates if item is a bill or refund; Value will be bill or refund
61
- # item_duration_# - Product duration, how long it re-bills for Ex. 1 Year
62
- # item_recurrence_# - Product recurrence, how often it re-bills Ex. 1 Month
63
- # item_rec_list_amount_# - Product price; format as appropriate to currency
64
- # item_rec_status_# - Indicates status of recurring subscription: live, canceled, or completed
65
- # item_rec_date_next_# - Date of next recurring installment; format YYYY-MM-DD
66
- # item_rec_install_billed_# - The number of successful recurring installments successfully billed
67
-
68
- # INS message type
69
- def type
70
- params['message_type']
71
- end
72
-
73
- # Seller currency sale was placed in
74
- def currency
75
- params['list_currency']
76
- end
77
-
78
- def complete?
79
- status == 'Completed'
80
- end
81
-
82
- # The value passed with 'merchant_order_id' is passed back as 'vendor_order_id'
83
- def item_id
84
- params['vendor_order_id'] || params['merchant_order_id']
85
- end
86
-
87
- # 2Checkout Sale ID
88
- def transaction_id
89
- params['sale_id'] || params['order_number']
90
- end
91
-
92
- # 2Checkout Invoice ID
93
- def invoice_id
94
- params['invoice_id']
95
- end
96
-
97
- def received_at
98
- params['timestamp']
99
- end
100
-
101
- #Customer Email
102
- def payer_email
103
- params['customer_email']
104
- end
105
-
106
- # The MD5 Hash
107
- def security_key
108
- params['md5_hash'] || params['key']
109
- end
110
-
111
- # The money amount we received in X.2 decimal.
112
- # passback || INS gross amount for new orders || default INS gross
113
- def gross
114
- params['invoice_list_amount'] || params['total'] || params['item_list_amount_1']
115
- end
116
-
117
- # Determine status based on parameter set, if the params include a fraud status we know we're being
118
- # notified of the finalization of an order (an INS message)
119
- # If the params include 'credit_card_processed' we know we're being notified of a new order being inbound,
120
- # which we handle in the deferred demo sale scenario.
121
- def status
122
- if params['fraud_status'] == 'pass' || params['credit_card_processed'] == 'Y'
123
- 'Completed'
124
- elsif params['fraud_status'] == 'wait'
125
- 'Pending'
126
- else
127
- 'Failed'
128
- end
129
- end
130
-
131
- # Secret Word defined in 2Checkout account
132
- def secret
133
- @options[:credential2]
134
- end
135
-
136
- # Checks against MD5 Hash
137
- def acknowledge(authcode = nil)
138
- return false if security_key.blank?
139
- if ins_message?
140
- Digest::MD5.hexdigest("#{ transaction_id }#{ params['vendor_id'] }#{ invoice_id }#{ secret }").upcase == security_key.upcase
141
- elsif passback?
142
- order_number = params['demo'] == 'Y' ? 1 : params['order_number']
143
- Digest::MD5.hexdigest("#{ secret }#{ params['sid'] }#{ order_number }#{ gross }").upcase == params['key'].upcase
144
- else
145
- false
146
- end
147
- end
148
-
149
- private
150
-
151
- # Parses Header Redirect Query String
152
- def parse(post)
153
- @raw = post.to_s
154
- for line in @raw.split('&')
155
- key, value = *line.scan( %r{^(\w+)\=(.*)$} ).flatten
156
- params[key] = CGI.unescape(value || '')
157
- end
158
- end
159
-
160
- def ins_message?
161
- params.include? 'message_type'
162
- end
163
-
164
- def passback?
165
- params.include? 'credit_card_processed'
166
- end
167
- end
168
- end
169
- end
170
- end
171
- end
@@ -1,58 +0,0 @@
1
- module ActiveMerchant #:nodoc:
2
- module Billing #:nodoc:
3
- module Integrations #:nodoc:
4
- module TwoCheckout
5
- class Return < ActiveMerchant::Billing::Integrations::Return
6
-
7
- # card_holder_name - Provides the customer’s name.
8
- # city - Provides the customer’s city.
9
- # country - Provides the customer’s country.
10
- # credit_card_processed - This parameter will always be passed back as Y.
11
- # demo - Defines if an order was live, or if the order was a demo order. If the order was a demo, the MD5 hash will fail.
12
- # email - Provides the email address the customer provided when placing the order.
13
- # fixed - This parameter will only be passed back if it was passed into the purchase routine.
14
- # ip_country - Provides the customer’s IP location.
15
- # key - An MD5 hash used to confirm the validity of a sale.
16
- # lang - Customer language
17
- # merchant_order_id - The order ID you had assigned to the order.
18
- # order_number - The 2Checkout order number associated with the order.
19
- # invoice_id - The 2Checkout invoice number.
20
- # pay_method - Provides seller with the customer’s payment method. CC for Credit Card, PPI for PayPal.
21
- # phone - Provides the phone number the customer provided when placing the order.
22
- # ship_name - Provides the ship to name for the order.
23
- # ship_street_address - Provides ship to address.
24
- # ship_street_address2 - Provides more detailed shipping address if this information was provided by the customer.
25
- # ship_city - Provides ship to city.
26
- # ship_state - Provides ship to state.
27
- # ship_zip - Ship Zip
28
-
29
- # Pass Through Products Only
30
- # li_#_name - Name of the corresponding lineitem.
31
- # li_#_quantity - Quantity of the corresponding lineitem.
32
- # li_#_price - Price of the corresponding lineitem.
33
- # li_#_tangible - Specifies if the corresponding li_#_type is a tangible or intangible. ‘Y’ OR ‘N’
34
- # li_#_product_id - ID of the corresponding lineitem.
35
- # li_#_product_description - Description of the corresponding lineitem.
36
- # li_#_recurrence - # WEEK | MONTH | YEAR – always singular.
37
- # li_#_duration - Forever or # WEEK | MONTH | YEAR – always singular, defaults to Forever.
38
- # li_#_startup_fee - Amount in account pricing currency.
39
- # li_#_option_#_name - Name of option. 64 characters max – cannot include '<' or '>'.
40
- # li_#_option_#_value - Name of option. 64 characters max – cannot include '<' or '>'.
41
- # li_#_option_#_surcharge - Amount in account pricing currency.
42
-
43
- #Third Party Cart Only
44
- # cart_order_id - The order ID you had assigned to the order
45
-
46
- def initialize(query_string, options = {})
47
- super
48
- @notification = Notification.new(query_string, options)
49
- end
50
-
51
- def success?
52
- @notification.status != 'Failed'
53
- end
54
- end
55
- end
56
- end
57
- end
58
- end
@@ -1,23 +0,0 @@
1
- require File.dirname(__FILE__) + '/universal/helper.rb'
2
- require File.dirname(__FILE__) + '/universal/notification.rb'
3
- require File.dirname(__FILE__) + '/universal/return.rb'
4
-
5
- module ActiveMerchant #:nodoc:
6
- module Billing #:nodoc:
7
- module Integrations #:nodoc:
8
- module Universal
9
- def self.notification(post, options = {})
10
- Notification.new(post, options)
11
- end
12
-
13
- def self.return(query_string, options = {})
14
- Return.new(query_string, options)
15
- end
16
-
17
- def self.sign(fields, key)
18
- Digest::HMAC.hexdigest(fields.sort.join, key, Digest::SHA256)
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,76 +0,0 @@
1
- module ActiveMerchant #:nodoc:
2
- module Billing #:nodoc:
3
- module Integrations #:nodoc:
4
- module Universal
5
- class Helper < ActiveMerchant::Billing::Integrations::Helper
6
- def initialize(order, account, options = {})
7
- super
8
- @forward_url = options[:forward_url]
9
- @key = options[:credential2]
10
- self.country = options[:country]
11
- self.account_name = options[:account_name]
12
- self.transaction_type = options[:transaction_type]
13
- add_field 'x_test', @test.to_s
14
- end
15
-
16
- def credential_based_url
17
- @forward_url
18
- end
19
-
20
- def form_fields
21
- sign_fields
22
- end
23
-
24
- def sign_fields
25
- @fields.merge!('x_signature' => generate_signature)
26
- end
27
-
28
- def generate_signature
29
- Universal.sign(@fields, @key)
30
- end
31
-
32
- mapping :account, 'x_account_id'
33
- mapping :currency, 'x_currency'
34
- mapping :amount, 'x_amount'
35
- mapping :shipping, 'x_amount_shipping'
36
- mapping :tax, 'x_amount_tax'
37
- mapping :order, 'x_reference'
38
- mapping :country, 'x_shop_country'
39
- mapping :account_name, 'x_shop_name'
40
- mapping :transaction_type, 'x_transaction_type'
41
- mapping :description, 'x_description'
42
- mapping :invoice, 'x_invoice'
43
-
44
- mapping :customer, :first_name => 'x_customer_first_name',
45
- :last_name => 'x_customer_last_name',
46
- :email => 'x_customer_email',
47
- :phone => 'x_customer_phone'
48
-
49
- mapping :billing_address, :city => 'x_customer_billing_city',
50
- :company => 'x_customer_billing_company',
51
- :address1 => 'x_customer_billing_address1',
52
- :address2 => 'x_customer_billing_address2',
53
- :state => 'x_customer_billing_state',
54
- :zip => 'x_customer_billing_zip',
55
- :country => 'x_customer_billing_country',
56
- :phone => 'x_customer_billing_phone'
57
-
58
- mapping :shipping_address, :first_name => 'x_customer_shipping_first_name',
59
- :last_name => 'x_customer_shipping_last_name',
60
- :city => 'x_customer_shipping_city',
61
- :company => 'x_customer_shipping_company',
62
- :address1 => 'x_customer_shipping_address1',
63
- :address2 => 'x_customer_shipping_address2',
64
- :state => 'x_customer_shipping_state',
65
- :zip => 'x_customer_shipping_zip',
66
- :country => 'x_customer_shipping_country',
67
- :phone => 'x_customer_shipping_phone'
68
-
69
- mapping :notify_url, 'x_url_callback'
70
- mapping :return_url, 'x_url_complete'
71
- mapping :cancel_return_url, 'x_url_cancel'
72
- end
73
- end
74
- end
75
- end
76
- end