activemerchant-nsp 1.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. data/CHANGELOG +952 -0
  2. data/CONTRIBUTORS +347 -0
  3. data/MIT-LICENSE +20 -0
  4. data/README.md +204 -0
  5. data/gem-public_cert.pem +20 -0
  6. data/lib/active_merchant.rb +63 -0
  7. data/lib/active_merchant/billing.rb +9 -0
  8. data/lib/active_merchant/billing/avs_result.rb +98 -0
  9. data/lib/active_merchant/billing/base.rb +56 -0
  10. data/lib/active_merchant/billing/check.rb +68 -0
  11. data/lib/active_merchant/billing/credit_card.rb +274 -0
  12. data/lib/active_merchant/billing/credit_card_formatting.rb +21 -0
  13. data/lib/active_merchant/billing/credit_card_methods.rb +143 -0
  14. data/lib/active_merchant/billing/cvv_result.rb +38 -0
  15. data/lib/active_merchant/billing/expiry_date.rb +34 -0
  16. data/lib/active_merchant/billing/gateway.rb +176 -0
  17. data/lib/active_merchant/billing/gateways.rb +18 -0
  18. data/lib/active_merchant/billing/gateways/authorize_net.rb +695 -0
  19. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +943 -0
  20. data/lib/active_merchant/billing/gateways/balanced.rb +462 -0
  21. data/lib/active_merchant/billing/gateways/barclays_epdq.rb +308 -0
  22. data/lib/active_merchant/billing/gateways/beanstream.rb +167 -0
  23. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +389 -0
  24. data/lib/active_merchant/billing/gateways/beanstream_interac.rb +54 -0
  25. data/lib/active_merchant/billing/gateways/blue_pay.rb +492 -0
  26. data/lib/active_merchant/billing/gateways/bogus.rb +142 -0
  27. data/lib/active_merchant/billing/gateways/braintree.rb +19 -0
  28. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +9 -0
  29. data/lib/active_merchant/billing/gateways/braintree_blue.rb +389 -0
  30. data/lib/active_merchant/billing/gateways/braintree_orange.rb +19 -0
  31. data/lib/active_merchant/billing/gateways/card_save.rb +23 -0
  32. data/lib/active_merchant/billing/gateways/card_stream.rb +230 -0
  33. data/lib/active_merchant/billing/gateways/certo_direct.rb +278 -0
  34. data/lib/active_merchant/billing/gateways/cyber_source.rb +576 -0
  35. data/lib/active_merchant/billing/gateways/data_cash.rb +597 -0
  36. data/lib/active_merchant/billing/gateways/efsnet.rb +235 -0
  37. data/lib/active_merchant/billing/gateways/elavon.rb +137 -0
  38. data/lib/active_merchant/billing/gateways/epay.rb +276 -0
  39. data/lib/active_merchant/billing/gateways/eway.rb +287 -0
  40. data/lib/active_merchant/billing/gateways/eway_managed.rb +265 -0
  41. data/lib/active_merchant/billing/gateways/exact.rb +227 -0
  42. data/lib/active_merchant/billing/gateways/fat_zebra.rb +152 -0
  43. data/lib/active_merchant/billing/gateways/federated_canada.rb +168 -0
  44. data/lib/active_merchant/billing/gateways/first_pay.rb +177 -0
  45. data/lib/active_merchant/billing/gateways/garanti.rb +262 -0
  46. data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +252 -0
  47. data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +13 -0
  48. data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +29 -0
  49. data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +55 -0
  50. data/lib/active_merchant/billing/gateways/inspire.rb +221 -0
  51. data/lib/active_merchant/billing/gateways/instapay.rb +164 -0
  52. data/lib/active_merchant/billing/gateways/iridium.rb +257 -0
  53. data/lib/active_merchant/billing/gateways/itransact.rb +450 -0
  54. data/lib/active_merchant/billing/gateways/jetpay.rb +276 -0
  55. data/lib/active_merchant/billing/gateways/linkpoint.rb +451 -0
  56. data/lib/active_merchant/billing/gateways/litle.rb +290 -0
  57. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +157 -0
  58. data/lib/active_merchant/billing/gateways/merchant_ware.rb +289 -0
  59. data/lib/active_merchant/billing/gateways/metrics_global.rb +323 -0
  60. data/lib/active_merchant/billing/gateways/migs.rb +263 -0
  61. data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +100 -0
  62. data/lib/active_merchant/billing/gateways/modern_payments.rb +38 -0
  63. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +220 -0
  64. data/lib/active_merchant/billing/gateways/moneris.rb +250 -0
  65. data/lib/active_merchant/billing/gateways/moneris_us.rb +211 -0
  66. data/lib/active_merchant/billing/gateways/nab_transact.rb +257 -0
  67. data/lib/active_merchant/billing/gateways/net_registry.rb +189 -0
  68. data/lib/active_merchant/billing/gateways/netaxept.rb +239 -0
  69. data/lib/active_merchant/billing/gateways/netbilling.rb +196 -0
  70. data/lib/active_merchant/billing/gateways/nmi.rb +13 -0
  71. data/lib/active_merchant/billing/gateways/ogone.rb +427 -0
  72. data/lib/active_merchant/billing/gateways/optimal_payment.rb +277 -0
  73. data/lib/active_merchant/billing/gateways/orbital.rb +351 -0
  74. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +46 -0
  75. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +266 -0
  76. data/lib/active_merchant/billing/gateways/pay_junction.rb +397 -0
  77. data/lib/active_merchant/billing/gateways/pay_secure.rb +120 -0
  78. data/lib/active_merchant/billing/gateways/paybox_direct.rb +201 -0
  79. data/lib/active_merchant/billing/gateways/payflow.rb +268 -0
  80. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +212 -0
  81. data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +39 -0
  82. data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +13 -0
  83. data/lib/active_merchant/billing/gateways/payflow_express.rb +224 -0
  84. data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +15 -0
  85. data/lib/active_merchant/billing/gateways/payflow_uk.rb +21 -0
  86. data/lib/active_merchant/billing/gateways/payment_express.rb +282 -0
  87. data/lib/active_merchant/billing/gateways/paypal.rb +106 -0
  88. data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +653 -0
  89. data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +49 -0
  90. data/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb +245 -0
  91. data/lib/active_merchant/billing/gateways/paypal_ca.rb +13 -0
  92. data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +43 -0
  93. data/lib/active_merchant/billing/gateways/paypal_express.rb +178 -0
  94. data/lib/active_merchant/billing/gateways/paypal_express_common.rb +30 -0
  95. data/lib/active_merchant/billing/gateways/paystation.rb +201 -0
  96. data/lib/active_merchant/billing/gateways/payway.rb +214 -0
  97. data/lib/active_merchant/billing/gateways/plugnpay.rb +295 -0
  98. data/lib/active_merchant/billing/gateways/psigate.rb +219 -0
  99. data/lib/active_merchant/billing/gateways/psl_card.rb +304 -0
  100. data/lib/active_merchant/billing/gateways/qbms.rb +297 -0
  101. data/lib/active_merchant/billing/gateways/quantum.rb +282 -0
  102. data/lib/active_merchant/billing/gateways/quickpay.rb +298 -0
  103. data/lib/active_merchant/billing/gateways/realex.rb +313 -0
  104. data/lib/active_merchant/billing/gateways/sage.rb +148 -0
  105. data/lib/active_merchant/billing/gateways/sage/sage_bankcard.rb +88 -0
  106. data/lib/active_merchant/billing/gateways/sage/sage_core.rb +115 -0
  107. data/lib/active_merchant/billing/gateways/sage/sage_virtual_check.rb +97 -0
  108. data/lib/active_merchant/billing/gateways/sage_pay.rb +322 -0
  109. data/lib/active_merchant/billing/gateways/sallie_mae.rb +144 -0
  110. data/lib/active_merchant/billing/gateways/samurai.rb +121 -0
  111. data/lib/active_merchant/billing/gateways/secure_net.rb +330 -0
  112. data/lib/active_merchant/billing/gateways/secure_pay.rb +31 -0
  113. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +284 -0
  114. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +113 -0
  115. data/lib/active_merchant/billing/gateways/skip_jack.rb +458 -0
  116. data/lib/active_merchant/billing/gateways/smart_ps.rb +273 -0
  117. data/lib/active_merchant/billing/gateways/stripe.rb +236 -0
  118. data/lib/active_merchant/billing/gateways/trans_first.rb +127 -0
  119. data/lib/active_merchant/billing/gateways/transax.rb +23 -0
  120. data/lib/active_merchant/billing/gateways/trust_commerce.rb +423 -0
  121. data/lib/active_merchant/billing/gateways/usa_epay.rb +25 -0
  122. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +1497 -0
  123. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +206 -0
  124. data/lib/active_merchant/billing/gateways/verifi.rb +233 -0
  125. data/lib/active_merchant/billing/gateways/viaklix.rb +194 -0
  126. data/lib/active_merchant/billing/gateways/vindicia.rb +359 -0
  127. data/lib/active_merchant/billing/gateways/wirecard.rb +313 -0
  128. data/lib/active_merchant/billing/gateways/worldpay.rb +271 -0
  129. data/lib/active_merchant/billing/integrations.rb +17 -0
  130. data/lib/active_merchant/billing/integrations/action_view_helper.rb +73 -0
  131. data/lib/active_merchant/billing/integrations/authorize_net_sim.rb +38 -0
  132. data/lib/active_merchant/billing/integrations/authorize_net_sim/helper.rb +228 -0
  133. data/lib/active_merchant/billing/integrations/authorize_net_sim/notification.rb +340 -0
  134. data/lib/active_merchant/billing/integrations/bogus.rb +23 -0
  135. data/lib/active_merchant/billing/integrations/bogus/helper.rb +17 -0
  136. data/lib/active_merchant/billing/integrations/bogus/notification.rb +11 -0
  137. data/lib/active_merchant/billing/integrations/bogus/return.rb +10 -0
  138. data/lib/active_merchant/billing/integrations/chronopay.rb +23 -0
  139. data/lib/active_merchant/billing/integrations/chronopay/helper.rb +120 -0
  140. data/lib/active_merchant/billing/integrations/chronopay/notification.rb +158 -0
  141. data/lib/active_merchant/billing/integrations/chronopay/return.rb +10 -0
  142. data/lib/active_merchant/billing/integrations/direc_pay.rb +41 -0
  143. data/lib/active_merchant/billing/integrations/direc_pay/helper.rb +200 -0
  144. data/lib/active_merchant/billing/integrations/direc_pay/notification.rb +76 -0
  145. data/lib/active_merchant/billing/integrations/direc_pay/return.rb +32 -0
  146. data/lib/active_merchant/billing/integrations/direc_pay/status.rb +37 -0
  147. data/lib/active_merchant/billing/integrations/directebanking.rb +47 -0
  148. data/lib/active_merchant/billing/integrations/directebanking/helper.rb +90 -0
  149. data/lib/active_merchant/billing/integrations/directebanking/notification.rb +120 -0
  150. data/lib/active_merchant/billing/integrations/directebanking/return.rb +11 -0
  151. data/lib/active_merchant/billing/integrations/dotpay.rb +22 -0
  152. data/lib/active_merchant/billing/integrations/dotpay/helper.rb +77 -0
  153. data/lib/active_merchant/billing/integrations/dotpay/notification.rb +86 -0
  154. data/lib/active_merchant/billing/integrations/dotpay/return.rb +11 -0
  155. data/lib/active_merchant/billing/integrations/dwolla.rb +30 -0
  156. data/lib/active_merchant/billing/integrations/dwolla/helper.rb +31 -0
  157. data/lib/active_merchant/billing/integrations/dwolla/notification.rb +55 -0
  158. data/lib/active_merchant/billing/integrations/dwolla/return.rb +38 -0
  159. data/lib/active_merchant/billing/integrations/e_payment_plans.rb +48 -0
  160. data/lib/active_merchant/billing/integrations/e_payment_plans/helper.rb +34 -0
  161. data/lib/active_merchant/billing/integrations/e_payment_plans/notification.rb +84 -0
  162. data/lib/active_merchant/billing/integrations/easy_pay.rb +30 -0
  163. data/lib/active_merchant/billing/integrations/easy_pay/common.rb +40 -0
  164. data/lib/active_merchant/billing/integrations/easy_pay/helper.rb +40 -0
  165. data/lib/active_merchant/billing/integrations/easy_pay/notification.rb +51 -0
  166. data/lib/active_merchant/billing/integrations/epay.rb +21 -0
  167. data/lib/active_merchant/billing/integrations/epay/helper.rb +55 -0
  168. data/lib/active_merchant/billing/integrations/epay/notification.rb +110 -0
  169. data/lib/active_merchant/billing/integrations/first_data.rb +38 -0
  170. data/lib/active_merchant/billing/integrations/first_data/helper.rb +63 -0
  171. data/lib/active_merchant/billing/integrations/first_data/notification.rb +56 -0
  172. data/lib/active_merchant/billing/integrations/gestpay.rb +25 -0
  173. data/lib/active_merchant/billing/integrations/gestpay/common.rb +42 -0
  174. data/lib/active_merchant/billing/integrations/gestpay/helper.rb +70 -0
  175. data/lib/active_merchant/billing/integrations/gestpay/notification.rb +85 -0
  176. data/lib/active_merchant/billing/integrations/gestpay/return.rb +10 -0
  177. data/lib/active_merchant/billing/integrations/helper.rb +117 -0
  178. data/lib/active_merchant/billing/integrations/hi_trust.rb +27 -0
  179. data/lib/active_merchant/billing/integrations/hi_trust/helper.rb +58 -0
  180. data/lib/active_merchant/billing/integrations/hi_trust/notification.rb +59 -0
  181. data/lib/active_merchant/billing/integrations/hi_trust/return.rb +67 -0
  182. data/lib/active_merchant/billing/integrations/maksuturva.rb +86 -0
  183. data/lib/active_merchant/billing/integrations/maksuturva/helper.rb +119 -0
  184. data/lib/active_merchant/billing/integrations/maksuturva/notification.rb +48 -0
  185. data/lib/active_merchant/billing/integrations/moneybookers.rb +26 -0
  186. data/lib/active_merchant/billing/integrations/moneybookers/helper.rb +59 -0
  187. data/lib/active_merchant/billing/integrations/moneybookers/notification.rb +129 -0
  188. data/lib/active_merchant/billing/integrations/nelnet.rb +40 -0
  189. data/lib/active_merchant/billing/integrations/nelnet/helper.rb +34 -0
  190. data/lib/active_merchant/billing/integrations/nelnet/notification.rb +100 -0
  191. data/lib/active_merchant/billing/integrations/nochex.rb +88 -0
  192. data/lib/active_merchant/billing/integrations/nochex/helper.rb +68 -0
  193. data/lib/active_merchant/billing/integrations/nochex/notification.rb +94 -0
  194. data/lib/active_merchant/billing/integrations/nochex/return.rb +10 -0
  195. data/lib/active_merchant/billing/integrations/notification.rb +62 -0
  196. data/lib/active_merchant/billing/integrations/paxum.rb +44 -0
  197. data/lib/active_merchant/billing/integrations/paxum/common.rb +24 -0
  198. data/lib/active_merchant/billing/integrations/paxum/helper.rb +42 -0
  199. data/lib/active_merchant/billing/integrations/paxum/notification.rb +33 -0
  200. data/lib/active_merchant/billing/integrations/payflow_link.rb +21 -0
  201. data/lib/active_merchant/billing/integrations/payflow_link/helper.rb +100 -0
  202. data/lib/active_merchant/billing/integrations/payflow_link/notification.rb +78 -0
  203. data/lib/active_merchant/billing/integrations/paypal.rb +39 -0
  204. data/lib/active_merchant/billing/integrations/paypal/helper.rb +119 -0
  205. data/lib/active_merchant/billing/integrations/paypal/notification.rb +155 -0
  206. data/lib/active_merchant/billing/integrations/paypal/return.rb +10 -0
  207. data/lib/active_merchant/billing/integrations/paypal_payments_advanced.rb +20 -0
  208. data/lib/active_merchant/billing/integrations/paypal_payments_advanced/helper.rb +15 -0
  209. data/lib/active_merchant/billing/integrations/pxpay.rb +31 -0
  210. data/lib/active_merchant/billing/integrations/pxpay/helper.rb +110 -0
  211. data/lib/active_merchant/billing/integrations/pxpay/notification.rb +157 -0
  212. data/lib/active_merchant/billing/integrations/pxpay/return.rb +25 -0
  213. data/lib/active_merchant/billing/integrations/quickpay.rb +21 -0
  214. data/lib/active_merchant/billing/integrations/quickpay/helper.rb +71 -0
  215. data/lib/active_merchant/billing/integrations/quickpay/notification.rb +74 -0
  216. data/lib/active_merchant/billing/integrations/return.rb +42 -0
  217. data/lib/active_merchant/billing/integrations/robokassa.rb +49 -0
  218. data/lib/active_merchant/billing/integrations/robokassa/common.rb +19 -0
  219. data/lib/active_merchant/billing/integrations/robokassa/helper.rb +50 -0
  220. data/lib/active_merchant/billing/integrations/robokassa/notification.rb +55 -0
  221. data/lib/active_merchant/billing/integrations/robokassa/return.rb +17 -0
  222. data/lib/active_merchant/billing/integrations/sage_pay_form.rb +37 -0
  223. data/lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb +33 -0
  224. data/lib/active_merchant/billing/integrations/sage_pay_form/helper.rb +129 -0
  225. data/lib/active_merchant/billing/integrations/sage_pay_form/notification.rb +210 -0
  226. data/lib/active_merchant/billing/integrations/sage_pay_form/return.rb +31 -0
  227. data/lib/active_merchant/billing/integrations/two_checkout.rb +44 -0
  228. data/lib/active_merchant/billing/integrations/two_checkout/helper.rb +91 -0
  229. data/lib/active_merchant/billing/integrations/two_checkout/notification.rb +139 -0
  230. data/lib/active_merchant/billing/integrations/two_checkout/return.rb +17 -0
  231. data/lib/active_merchant/billing/integrations/valitor.rb +33 -0
  232. data/lib/active_merchant/billing/integrations/valitor/helper.rb +86 -0
  233. data/lib/active_merchant/billing/integrations/valitor/notification.rb +13 -0
  234. data/lib/active_merchant/billing/integrations/valitor/response_fields.rb +97 -0
  235. data/lib/active_merchant/billing/integrations/valitor/return.rb +13 -0
  236. data/lib/active_merchant/billing/integrations/verkkomaksut.rb +20 -0
  237. data/lib/active_merchant/billing/integrations/verkkomaksut/helper.rb +87 -0
  238. data/lib/active_merchant/billing/integrations/verkkomaksut/notification.rb +59 -0
  239. data/lib/active_merchant/billing/integrations/web_pay.rb +45 -0
  240. data/lib/active_merchant/billing/integrations/web_pay/common.rb +50 -0
  241. data/lib/active_merchant/billing/integrations/web_pay/helper.rb +68 -0
  242. data/lib/active_merchant/billing/integrations/web_pay/notification.rb +51 -0
  243. data/lib/active_merchant/billing/integrations/world_pay.rb +27 -0
  244. data/lib/active_merchant/billing/integrations/world_pay/helper.rb +100 -0
  245. data/lib/active_merchant/billing/integrations/world_pay/notification.rb +160 -0
  246. data/lib/active_merchant/billing/response.rb +64 -0
  247. data/lib/active_merchant/version.rb +3 -0
  248. data/lib/activemerchant.rb +1 -0
  249. data/lib/support/gateway_support.rb +65 -0
  250. data/lib/support/outbound_hosts.rb +25 -0
  251. data/lib/support/ssl_verify.rb +93 -0
  252. metadata +482 -0
@@ -0,0 +1,290 @@
1
+ module ActiveMerchant #:nodoc:
2
+ module Billing #:nodoc:
3
+ class LitleGateway < Gateway
4
+ # Specific to Litle options:
5
+ # * <tt>:merchant_id</tt> - Merchant Id assigned by Litle
6
+ # * <tt>:user</tt> - Username assigned by Litle
7
+ # * <tt>:password</tt> - Password assigned by Litle
8
+ # * <tt>:version</tt> - The version of the api you are using (eg, '8.10')
9
+ # * <tt>:proxy_addr</tt> - Proxy address - nil if not needed
10
+ # * <tt>:proxy_port</tt> - Proxy port - nil if not needed
11
+ # * <tt>:url</tt> - URL assigned by Litle (for testing, use the sandbox)
12
+ #
13
+ # Standard Active Merchant options
14
+ # * <tt>:order_id</tt> - The order number
15
+ # * <tt>:ip</tt> - The IP address of the customer making the purchase
16
+ # * <tt>:customer</tt> - The name, customer number, or other information that identifies the customer
17
+ # * <tt>:invoice</tt> - The invoice number
18
+ # * <tt>:merchant</tt> - The name or description of the merchant offering the product
19
+ # * <tt>:description</tt> - A description of the transaction
20
+ # * <tt>:email</tt> - The email address of the customer
21
+ # * <tt>:currency</tt> - The currency of the transaction. Only important when you are using a currency that is not the default with a gateway that supports multiple currencies.
22
+ # * <tt>:billing_address</tt> - A hash containing the billing address of the customer.
23
+ # * <tt>:shipping_address</tt> - A hash containing the shipping address of the customer.
24
+ #
25
+ # The <tt>:billing_address</tt>, and <tt>:shipping_address</tt> hashes can have the following keys:
26
+ #
27
+ # * <tt>:name</tt> - The full name of the customer.
28
+ # * <tt>:company</tt> - The company name of the customer.
29
+ # * <tt>:address1</tt> - The primary street address of the customer.
30
+ # * <tt>:address2</tt> - Additional line of address information.
31
+ # * <tt>:city</tt> - The city of the customer.
32
+ # * <tt>:state</tt> - The state of the customer. The 2 digit code for US and Canadian addresses. The full name of the state or province for foreign addresses.
33
+ # * <tt>:country</tt> - The [ISO 3166-1-alpha-2 code](http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm) for the customer.
34
+ # * <tt>:zip</tt> - The zip or postal code of the customer.
35
+ # * <tt>:phone</tt> - The phone number of the customer.
36
+
37
+ self.test_url = 'https://www.testlitle.com/sandbox/communicator/online'
38
+ self.live_url = 'https://payments.litle.com/vap/communicator/online'
39
+
40
+ LITLE_SCHEMA_VERSION = '8.10'
41
+
42
+ # The countries the gateway supports merchants from as 2 digit ISO country codes
43
+ self.supported_countries = ['US']
44
+
45
+ # The card types supported by the payment gateway
46
+ self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb]
47
+
48
+ # The homepage URL of the gateway
49
+ self.homepage_url = 'http://www.litle.com/'
50
+
51
+ # The name of the gateway
52
+ self.display_name = 'Litle & Co.'
53
+
54
+ self.default_currency = 'USD'
55
+
56
+ def initialize(options = {})
57
+ begin
58
+ require 'LitleOnline'
59
+ rescue LoadError
60
+ raise "Could not load the LitleOnline gem (>= 08.13.2). Use `gem install LitleOnline` to install it."
61
+ end
62
+
63
+ @litle = LitleOnline::LitleOnlineRequest.new
64
+
65
+ options[:version] ||= LITLE_SCHEMA_VERSION
66
+ options[:merchant] ||= 'Default Report Group'
67
+ options[:user] ||= options[:login]
68
+
69
+ requires!(options, :merchant_id, :user, :password, :merchant, :version)
70
+
71
+ @options = options
72
+ end
73
+
74
+ def authorize(money, creditcard, options = {})
75
+ to_pass = create_credit_card_hash(money, creditcard, options)
76
+ build_response(:authorization, @litle.authorization(to_pass))
77
+ end
78
+
79
+ def purchase(money, creditcard, options = {})
80
+ to_pass = create_credit_card_hash(money, creditcard, options)
81
+ build_response(:sale, @litle.sale(to_pass))
82
+ end
83
+
84
+ def capture(money, authorization, options = {})
85
+ to_pass = create_capture_hash(money, authorization, options)
86
+ build_response(:capture, @litle.capture(to_pass))
87
+ end
88
+
89
+ def void(identification, options = {})
90
+ to_pass = create_void_hash(identification, options)
91
+ build_response(:void, @litle.void(to_pass))
92
+ end
93
+
94
+ def credit(money, identification, options = {})
95
+ to_pass = create_credit_hash(money, identification, options)
96
+ build_response(:credit, @litle.credit(to_pass))
97
+ end
98
+
99
+ def store(creditcard, options = {})
100
+ to_pass = create_token_hash(creditcard, options)
101
+ build_response(:registerToken, @litle.register_token_request(to_pass), %w(801 802))
102
+ end
103
+
104
+ private
105
+
106
+ CARD_TYPE = {
107
+ 'visa' => 'VI',
108
+ 'master' => 'MC',
109
+ 'american_express' => 'AX',
110
+ 'discover' => 'DI',
111
+ 'jcb' => 'DI',
112
+ 'diners_club' => 'DI'
113
+ }
114
+
115
+ AVS_RESPONSE_CODE = {
116
+ '00' => 'Y',
117
+ '01' => 'X',
118
+ '02' => 'D',
119
+ '10' => 'Z',
120
+ '11' => 'W',
121
+ '12' => 'A',
122
+ '13' => 'A',
123
+ '14' => 'P',
124
+ '20' => 'N',
125
+ '30' => 'S',
126
+ '31' => 'R',
127
+ '32' => 'U',
128
+ '33' => 'R',
129
+ '34' => 'I',
130
+ '40' => 'E'
131
+ }
132
+
133
+ def url
134
+ return @options[:url] if @options[:url].present?
135
+
136
+ test? ? self.test_url : self.live_url
137
+ end
138
+
139
+ def build_response(kind, litle_response, valid_responses=%w(000))
140
+ response = Hash.from_xml(litle_response.raw_xml.to_s)['litleOnlineResponse']
141
+
142
+ if response['response'] == "0"
143
+ detail = response["#{kind}Response"]
144
+ fraud = fraud_result(detail)
145
+ Response.new(
146
+ valid_responses.include?(detail['response']),
147
+ detail['message'],
148
+ {:litleOnlineResponse => response},
149
+ :authorization => detail['litleTxnId'],
150
+ :avs_result => {:code => fraud['avs']},
151
+ :cvv_result => fraud['cvv']
152
+ )
153
+ else
154
+ Response.new(false, response['message'], :litleOnlineResponse => response)
155
+ end
156
+ end
157
+
158
+ def create_credit_card_hash(money, creditcard, options)
159
+ cc_type = CARD_TYPE[creditcard.brand]
160
+
161
+ exp_date_yr = creditcard.year.to_s()[2..3]
162
+
163
+ if( creditcard.month.to_s().length == 1 )
164
+ exp_date_mo = '0' + creditcard.month.to_s()
165
+ else
166
+ exp_date_mo = creditcard.month.to_s()
167
+ end
168
+
169
+ exp_date = exp_date_mo + exp_date_yr
170
+
171
+ card_info = {
172
+ 'type' => cc_type,
173
+ 'number' => creditcard.number,
174
+ 'expDate' => exp_date,
175
+ 'cardValidationNum' => creditcard.verification_value
176
+ }
177
+
178
+ hash = create_hash(money, options)
179
+ hash['card'] = card_info
180
+ hash
181
+ end
182
+
183
+ def create_capture_hash(money, authorization, options)
184
+ hash = create_hash(money, options)
185
+ hash['litleTxnId'] = authorization
186
+ hash
187
+ end
188
+
189
+ def create_credit_hash(money, identification, options)
190
+ hash = create_hash(money, options)
191
+ hash['litleTxnId'] = identification
192
+ hash['orderSource'] = nil
193
+ hash['orderId'] = nil
194
+ hash
195
+ end
196
+
197
+ def create_token_hash(creditcard, options)
198
+ hash = create_hash(0, options)
199
+ hash['accountNumber'] = creditcard.number
200
+ hash
201
+ end
202
+
203
+ def create_void_hash(identification, options)
204
+ hash = create_hash(nil, options)
205
+ hash['litleTxnId'] = identification
206
+ hash
207
+ end
208
+
209
+ def create_hash(money, options)
210
+ fraud_check_type = {}
211
+ if options[:ip]
212
+ fraud_check_type['customerIpAddress'] = options[:ip]
213
+ end
214
+
215
+ enhanced_data = {}
216
+ if options[:invoice]
217
+ enhanced_data['invoiceReferenceNumber'] = options[:invoice]
218
+ end
219
+
220
+ if options[:description]
221
+ enhanced_data['customerReference'] = options[:description]
222
+ end
223
+
224
+ if options[:billing_address]
225
+ bill_to_address = {
226
+ 'name' => options[:billing_address][:name],
227
+ 'companyName' => options[:billing_address][:company],
228
+ 'addressLine1' => options[:billing_address][:address1],
229
+ 'addressLine2' => options[:billing_address][:address2],
230
+ 'city' => options[:billing_address][:city],
231
+ 'state' => options[:billing_address][:state],
232
+ 'zip' => options[:billing_address][:zip],
233
+ 'country' => options[:billing_address][:country],
234
+ 'email' => options[:email],
235
+ 'phone' => options[:billing_address][:phone]
236
+ }
237
+ end
238
+ if options[:shipping_address]
239
+ ship_to_address = {
240
+ 'name' => options[:shipping_address][:name],
241
+ 'companyName' => options[:shipping_address][:company],
242
+ 'addressLine1' => options[:shipping_address][:address1],
243
+ 'addressLine2' => options[:shipping_address][:address2],
244
+ 'city' => options[:shipping_address][:city],
245
+ 'state' => options[:shipping_address][:state],
246
+ 'zip' => options[:shipping_address][:zip],
247
+ 'country' => options[:shipping_address][:country],
248
+ 'email' => options[:email],
249
+ 'phone' => options[:shipping_address][:phone]
250
+ }
251
+ end
252
+
253
+ hash = {
254
+ 'billToAddress' => bill_to_address,
255
+ 'shipToAddress' => ship_to_address,
256
+ 'orderId' => (options[:order_id] || @options[:order_id]),
257
+ 'customerId' => options[:customer],
258
+ 'reportGroup' => (options[:merchant] || @options[:merchant]),
259
+ 'merchantId' => (options[:merchant_id] || @options[:merchant_id]),
260
+ 'orderSource' => 'ecommerce',
261
+ 'enhancedData' => enhanced_data,
262
+ 'fraudCheckType' => fraud_check_type,
263
+ 'user' => (options[:user] || @options[:user]),
264
+ 'password' => (options[:password] || @options[:password]),
265
+ 'version' => (options[:version] || @options[:version]),
266
+ 'url' => (options[:url] || url),
267
+ 'proxy_addr' => (options[:proxy_addr] || @options[:proxy_addr]),
268
+ 'proxy_port' => (options[:proxy_port] || @options[:proxy_port]),
269
+ 'id' => (options[:id] || options[:order_id] || @options[:order_id])
270
+ }
271
+
272
+ if( !money.nil? && money.to_s.length > 0 )
273
+ hash.merge!({'amount' => money})
274
+ end
275
+ hash
276
+ end
277
+
278
+ def fraud_result(authorization_response)
279
+ if result = authorization_response['fraudResult']
280
+ if result.key?('cardValidationResult')
281
+ cvv_to_pass = result['cardValidationResult'].blank? ? "P" : result['cardValidationResult']
282
+ end
283
+
284
+ avs_to_pass = AVS_RESPONSE_CODE[result['avsResult']] unless result['avsResult'].blank?
285
+ end
286
+ {'cvv'=>cvv_to_pass, 'avs'=>avs_to_pass}
287
+ end
288
+ end
289
+ end
290
+ end
@@ -0,0 +1,157 @@
1
+ module ActiveMerchant #:nodoc:
2
+ module Billing #:nodoc:
3
+ class MerchantESolutionsGateway < Gateway
4
+
5
+ self.test_url = 'https://cert.merchante-solutions.com/mes-api/tridentApi'
6
+ self.live_url = 'https://api.merchante-solutions.com/mes-api/tridentApi'
7
+
8
+ # The countries the gateway supports merchants from as 2 digit ISO country codes
9
+ self.supported_countries = ['US']
10
+
11
+ # The card types supported by the payment gateway
12
+ self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb]
13
+
14
+ # The homepage URL of the gateway
15
+ self.homepage_url = 'http://www.merchante-solutions.com/'
16
+
17
+ # The name of the gateway
18
+ self.display_name = 'Merchant e-Solutions'
19
+
20
+ def initialize(options = {})
21
+ requires!(options, :login, :password)
22
+ @options = options
23
+ super
24
+ end
25
+
26
+ def authorize(money, creditcard_or_card_id, options = {})
27
+ post = {}
28
+ add_invoice(post, options)
29
+ add_payment_source(post, creditcard_or_card_id, options)
30
+ add_address(post, options)
31
+ commit('P', money, post)
32
+ end
33
+
34
+ def purchase(money, creditcard_or_card_id, options = {})
35
+ post = {}
36
+ add_invoice(post, options)
37
+ add_payment_source(post, creditcard_or_card_id, options)
38
+ add_address(post, options)
39
+ commit('D', money, post)
40
+ end
41
+
42
+ def capture(money, transaction_id, options = {})
43
+ post ={}
44
+ post[:transaction_id] = transaction_id
45
+ commit('S', money, post)
46
+ end
47
+
48
+ def store(creditcard, options = {})
49
+ post = {}
50
+ add_creditcard(post, creditcard, options)
51
+ commit('T', nil, post)
52
+ end
53
+
54
+ def unstore(card_id)
55
+ post = {}
56
+ post[:card_id] = card_id
57
+ commit('X', nil, post)
58
+ end
59
+
60
+ def refund(money, identification, options = {})
61
+ commit('U', money, options.merge(:transaction_id => identification))
62
+ end
63
+
64
+ def credit(money, creditcard_or_card_id, options = {})
65
+ post = {}
66
+ add_payment_source(post, creditcard_or_card_id, options)
67
+ commit('C', money, post)
68
+ end
69
+
70
+ def void(transaction_id, options = {})
71
+ commit('V', nil, options.merge(:transaction_id => transaction_id))
72
+ end
73
+
74
+ private
75
+
76
+ def add_address(post, options)
77
+ if address = options[:billing_address] || options[:address]
78
+ post[:cardholder_street_address] = address[:address1].to_s.gsub(/[^\w.]/, '+')
79
+ post[:cardholder_zip] = address[:zip].to_s
80
+ end
81
+ end
82
+
83
+ def add_invoice(post, options)
84
+ if options.has_key? :order_id
85
+ post[:invoice_number] = options[:order_id].to_s.gsub(/[^\w.]/, '')
86
+ end
87
+ end
88
+
89
+ def add_payment_source(post, creditcard_or_card_id, options)
90
+ if creditcard_or_card_id.is_a?(String)
91
+ # using stored card
92
+ post[:card_id] = creditcard_or_card_id
93
+ post[:card_exp_date] = options[:expiration_date] if options[:expiration_date]
94
+ else
95
+ # card info is provided
96
+ add_creditcard(post, creditcard_or_card_id, options)
97
+ end
98
+ end
99
+
100
+ def add_creditcard(post, creditcard, options)
101
+ post[:card_number] = creditcard.number
102
+ post[:cvv2] = creditcard.verification_value if creditcard.verification_value?
103
+ post[:card_exp_date] = expdate(creditcard)
104
+ end
105
+
106
+ def parse(body)
107
+ results = {}
108
+ body.split(/&/).each do |pair|
109
+ key,val = pair.split(/=/)
110
+ results[key] = val
111
+ end
112
+ results
113
+ end
114
+
115
+ def commit(action, money, parameters)
116
+
117
+ url = test? ? self.test_url : self.live_url
118
+ parameters[:transaction_amount] = amount(money) if money unless action == 'V'
119
+
120
+ response = parse( ssl_post(url, post_data(action,parameters)) )
121
+
122
+ Response.new(response["error_code"] == "000", message_from(response), response,
123
+ :authorization => response["transaction_id"],
124
+ :test => test?,
125
+ :cvv_result => response["cvv2_result"],
126
+ :avs_result => { :code => response["avs_result"] }
127
+ )
128
+
129
+ end
130
+
131
+ def expdate(creditcard)
132
+ year = sprintf("%.4i", creditcard.year)
133
+ month = sprintf("%.2i", creditcard.month)
134
+ "#{month}#{year[-2..-1]}"
135
+ end
136
+
137
+ def message_from(response)
138
+ if response["error_code"] == "000"
139
+ "This transaction has been approved"
140
+ else
141
+ response["auth_response_text"]
142
+ end
143
+ end
144
+
145
+ def post_data(action, parameters = {})
146
+ post = {}
147
+ post[:profile_id] = @options[:login]
148
+ post[:profile_key] = @options[:password]
149
+ post[:transaction_type] = action if action
150
+
151
+ request = post.merge(parameters).map {|key,value| "#{key}=#{CGI.escape(value.to_s)}"}.join("&")
152
+ request
153
+ end
154
+ end
155
+ end
156
+ end
157
+
@@ -0,0 +1,289 @@
1
+ module ActiveMerchant #:nodoc:
2
+ module Billing #:nodoc:
3
+ class MerchantWareGateway < Gateway
4
+ self.live_url = self.test_url = 'https://ps1.merchantware.net/MerchantWARE/ws/RetailTransaction/TXRetail.asmx'
5
+
6
+ self.supported_countries = ['US']
7
+ self.supported_cardtypes = [:visa, :master, :american_express, :discover]
8
+ self.homepage_url = 'http://merchantwarehouse.com/merchantware'
9
+ self.display_name = 'MerchantWARE'
10
+
11
+ ENV_NAMESPACES = { "xmlns:xsi" => "http://www.w3.org/2001/XMLSchema-instance",
12
+ "xmlns:xsd" => "http://www.w3.org/2001/XMLSchema",
13
+ "xmlns:env" => "http://schemas.xmlsoap.org/soap/envelope/"
14
+ }
15
+ TX_NAMESPACE = "http://merchantwarehouse.com/MerchantWARE/Client/TransactionRetail"
16
+
17
+ ACTIONS = {
18
+ :purchase => "IssueKeyedSale",
19
+ :authorize => "IssueKeyedPreAuth",
20
+ :capture => "IssuePostAuth",
21
+ :void => "IssueVoid",
22
+ :credit => "IssueKeyedRefund",
23
+ :reference_credit => "IssueRefundByReference"
24
+ }
25
+
26
+ # Creates a new MerchantWareGateway
27
+ #
28
+ # The gateway requires that a valid login, password, and name be passed
29
+ # in the +options+ hash.
30
+ #
31
+ # ==== Options
32
+ #
33
+ # * <tt>:login</tt> - The MerchantWARE SiteID.
34
+ # * <tt>:password</tt> - The MerchantWARE Key.
35
+ # * <tt>:name</tt> - The MerchantWARE Name.
36
+ def initialize(options = {})
37
+ requires!(options, :login, :password, :name)
38
+ @options = options
39
+ super
40
+ end
41
+
42
+ # Authorize a credit card for a given amount.
43
+ #
44
+ # ==== Parameters
45
+ # * <tt>money</tt> - The amount to be authorized as an Integer value in cents.
46
+ # * <tt>credit_card</tt> - The CreditCard details for the transaction.
47
+ # * <tt>options</tt>
48
+ # * <tt>:order_id</tt> - A unique reference for this order (required).
49
+ # * <tt>:billing_address</tt> - The billing address for the cardholder.
50
+ def authorize(money, credit_card, options = {})
51
+ request = build_purchase_request(:authorize, money, credit_card, options)
52
+ commit(:authorize, request)
53
+ end
54
+
55
+ # Authorize and immediately capture funds from a credit card.
56
+ #
57
+ # ==== Parameters
58
+ # * <tt>money</tt> - The amount to be authorized as anInteger value in cents.
59
+ # * <tt>credit_card</tt> - The CreditCard details for the transaction.
60
+ # * <tt>options</tt>
61
+ # * <tt>:order_id</tt> - A unique reference for this order (required).
62
+ # * <tt>:billing_address</tt> - The billing address for the cardholder.
63
+ def purchase(money, credit_card, options = {})
64
+ request = build_purchase_request(:purchase, money, credit_card, options)
65
+ commit(:purchase, request)
66
+ end
67
+
68
+ # Capture authorized funds from a credit card.
69
+ #
70
+ # ==== Parameters
71
+ # * <tt>money</tt> - The amount to be captured as anInteger value in cents.
72
+ # * <tt>authorization</tt> - The authorization string returned from the initial authorization.
73
+ def capture(money, authorization, options = {})
74
+ request = build_capture_request(:capture, money, authorization, options)
75
+ commit(:capture, request)
76
+ end
77
+
78
+ # Void a transaction.
79
+ #
80
+ # ==== Parameters
81
+ # * <tt>authorization</tt> - The authorization string returned from the initial authorization or purchase.
82
+ def void(authorization, options = {})
83
+ reference, options[:order_id] = split_reference(authorization)
84
+
85
+ request = soap_request(:void) do |xml|
86
+ add_reference(xml, reference)
87
+ end
88
+ commit(:void, request)
89
+ end
90
+
91
+ # Refund an amount back a cardholder
92
+ #
93
+ # ==== Parameters
94
+ #
95
+ # * <tt>money</tt> - The amount to be refunded as an Integer value in cents.
96
+ # * <tt>identification</tt> - The credit card you want to refund or the authorization for the existing transaction you are refunding.
97
+ # * <tt>options</tt>
98
+ # * <tt>:order_id</tt> - A unique reference for this order (required when performing a non-referenced credit)
99
+ def credit(money, identification, options = {})
100
+ if identification.is_a?(String)
101
+ deprecated CREDIT_DEPRECATION_MESSAGE
102
+ refund(money, identification, options)
103
+ else
104
+ perform_credit(money, identification, options)
105
+ end
106
+ end
107
+
108
+ def refund(money, reference, options = {})
109
+ perform_reference_credit(money, reference, options)
110
+ end
111
+
112
+
113
+ private
114
+
115
+ def soap_request(action)
116
+ xml = Builder::XmlMarkup.new :indent => 2
117
+ xml.instruct!
118
+ xml.tag! "env:Envelope", ENV_NAMESPACES do
119
+ xml.tag! "env:Body" do
120
+ xml.tag! ACTIONS[action], "xmlns" => TX_NAMESPACE do
121
+ add_credentials(xml)
122
+ yield xml
123
+ end
124
+ end
125
+ end
126
+ xml.target!
127
+ end
128
+
129
+ def build_purchase_request(action, money, credit_card, options)
130
+ requires!(options, :order_id)
131
+
132
+ request = soap_request(action) do |xml|
133
+ add_invoice(xml, options)
134
+ add_amount(xml, money)
135
+ add_credit_card(xml, credit_card)
136
+ add_address(xml, options)
137
+ end
138
+ end
139
+
140
+ def build_capture_request(action, money, identification, options)
141
+ reference, options[:order_id] = split_reference(identification)
142
+
143
+ request = soap_request(action) do |xml|
144
+ add_reference(xml, reference)
145
+ add_invoice(xml, options)
146
+ add_amount(xml, money)
147
+ end
148
+ end
149
+
150
+ def perform_reference_credit(money, identification, options)
151
+ reference, options[:order_id] = split_reference(identification)
152
+
153
+ request = soap_request(:reference_credit) do |xml|
154
+ add_reference(xml, reference)
155
+ add_invoice(xml, options)
156
+ add_amount(xml, money, "strOverrideAmount")
157
+ end
158
+
159
+ commit(:reference_credit, request)
160
+ end
161
+
162
+ def perform_credit(money, credit_card, options)
163
+ requires!(options, :order_id)
164
+
165
+ request = soap_request(:credit) do |xml|
166
+ add_invoice(xml, options)
167
+ add_amount(xml, money)
168
+ add_credit_card(xml, credit_card)
169
+ end
170
+
171
+ commit(:credit, request)
172
+ end
173
+
174
+ def add_credentials(xml)
175
+ xml.tag! "strSiteId", @options[:login]
176
+ xml.tag! "strKey", @options[:password]
177
+ xml.tag! "strName", @options[:name]
178
+ end
179
+
180
+ def expdate(credit_card)
181
+ year = sprintf("%.4i", credit_card.year)
182
+ month = sprintf("%.2i", credit_card.month)
183
+
184
+ "#{month}#{year[-2..-1]}"
185
+ end
186
+
187
+ def add_invoice(xml, options)
188
+ xml.tag! "strOrderNumber", options[:order_id].to_s.gsub(/[^\w]/, '').slice(0, 25)
189
+ end
190
+
191
+ def add_amount(xml, money, tag = "strAmount")
192
+ xml.tag! tag, amount(money)
193
+ end
194
+
195
+ def add_reference(xml, reference)
196
+ xml.tag! "strReferenceCode", reference
197
+ end
198
+
199
+ def add_address(xml, options)
200
+ if address = options[:billing_address] || options[:address]
201
+ xml.tag! "strAVSStreetAddress", address[:address1]
202
+ xml.tag! "strAVSZipCode", address[:zip]
203
+ end
204
+ end
205
+
206
+ def add_credit_card(xml, credit_card)
207
+ xml.tag! "strPAN", credit_card.number
208
+ xml.tag! "strExpDate", expdate(credit_card)
209
+ xml.tag! "strCardHolder", credit_card.name
210
+ xml.tag! "strCVCode", credit_card.verification_value if credit_card.verification_value?
211
+ end
212
+
213
+ def split_reference(reference)
214
+ reference.to_s.split(";")
215
+ end
216
+
217
+ def parse(action, data)
218
+ response = {}
219
+ xml = REXML::Document.new(data)
220
+
221
+ root = REXML::XPath.first(xml, "//#{ACTIONS[action]}Response/#{ACTIONS[action]}Result")
222
+
223
+ root.elements.each do |element|
224
+ response[element.name] = element.text
225
+ end
226
+
227
+ status, code, message = response["ApprovalStatus"].split(";")
228
+ response[:status] = status
229
+
230
+ if response[:success] = status == "APPROVED"
231
+ response[:message] = status
232
+ else
233
+ response[:message] = message
234
+ response[:failure_code] = code
235
+ end
236
+
237
+ response
238
+ end
239
+
240
+ def parse_error(http_response)
241
+ response = {}
242
+ response[:http_code] = http_response.code
243
+ response[:http_message] = http_response.message
244
+ response[:success] = false
245
+
246
+ document = REXML::Document.new(http_response.body)
247
+
248
+ node = REXML::XPath.first(document, "//soap:Fault")
249
+
250
+ node.elements.each do |element|
251
+ response[element.name] = element.text
252
+ end
253
+
254
+ response[:message] = response["faultstring"].to_s.gsub("\n", " ")
255
+ response
256
+ rescue REXML::ParseException => e
257
+ response[:http_body] = http_response.body
258
+ response[:message] = "Failed to parse the failed response"
259
+ response
260
+ end
261
+
262
+ def commit(action, request)
263
+ begin
264
+ data = ssl_post(self.live_url, request,
265
+ "Content-Type" => 'text/xml; charset=utf-8',
266
+ "SOAPAction" => "http://merchantwarehouse.com/MerchantWARE/Client/TransactionRetail/#{ACTIONS[action]}"
267
+ )
268
+ response = parse(action, data)
269
+ rescue ActiveMerchant::ResponseError => e
270
+ response = parse_error(e.response)
271
+ end
272
+
273
+ Response.new(response[:success], response[:message], response,
274
+ :test => test?,
275
+ :authorization => authorization_from(response),
276
+ :avs_result => { :code => response["AVSResponse"] },
277
+ :cvv_result => response["CVResponse"]
278
+ )
279
+ end
280
+
281
+ def authorization_from(response)
282
+ if response[:success]
283
+ [ response["ReferenceID"], response["OrderNumber"] ].join(";")
284
+ end
285
+ end
286
+ end
287
+ end
288
+ end
289
+