activemerchant 1.4.2 → 1.5.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 (227) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +78 -0
  3. data/{CONTRIBUTERS → CONTRIBUTORS} +44 -0
  4. data/{README → README.rdoc} +4 -1
  5. data/Rakefile +7 -13
  6. data/lib/active_merchant.rb +11 -21
  7. data/lib/active_merchant/billing/avs_result.rb +13 -10
  8. data/lib/active_merchant/billing/base.rb +2 -2
  9. data/lib/active_merchant/billing/check.rb +1 -1
  10. data/lib/active_merchant/billing/credit_card_methods.rb +2 -2
  11. data/lib/active_merchant/billing/expiry_date.rb +10 -4
  12. data/lib/active_merchant/billing/gateway.rb +7 -6
  13. data/lib/active_merchant/billing/gateways.rb +18 -3
  14. data/lib/active_merchant/billing/gateways/authorize_net.rb +20 -12
  15. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +40 -6
  16. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb.orig +736 -0
  17. data/lib/active_merchant/billing/gateways/braintree.rb +6 -211
  18. data/lib/active_merchant/billing/gateways/data_cash.rb +5 -7
  19. data/lib/active_merchant/billing/gateways/elavon.rb +134 -0
  20. data/lib/active_merchant/billing/gateways/eway.rb +7 -2
  21. data/lib/active_merchant/billing/gateways/first_pay.rb +172 -0
  22. data/lib/active_merchant/billing/gateways/instapay.rb +164 -0
  23. data/lib/active_merchant/billing/gateways/jetpay.rb +270 -0
  24. data/lib/active_merchant/billing/gateways/linkpoint.rb +65 -12
  25. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +154 -0
  26. data/lib/active_merchant/billing/gateways/merchant_ware.rb +283 -0
  27. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +12 -6
  28. data/lib/active_merchant/billing/gateways/ogone.rb +279 -0
  29. data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
  30. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -1
  31. data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
  32. data/lib/active_merchant/billing/gateways/payflow_express.rb +1 -1
  33. data/lib/active_merchant/billing/gateways/payment_express.rb +20 -32
  34. data/lib/active_merchant/billing/gateways/paypal.rb +22 -9
  35. data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +2 -1
  36. data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
  37. data/lib/active_merchant/billing/gateways/psl_card.rb +4 -6
  38. data/lib/active_merchant/billing/gateways/sage/sage_core.rb +7 -1
  39. data/lib/active_merchant/billing/gateways/{protx.rb → sage_pay.rb} +60 -35
  40. data/lib/active_merchant/billing/gateways/sallie_mae.rb +144 -0
  41. data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
  42. data/lib/active_merchant/billing/gateways/skip_jack.rb +23 -10
  43. data/lib/active_merchant/billing/gateways/smart_ps.rb +265 -0
  44. data/lib/active_merchant/billing/gateways/transax.rb +25 -0
  45. data/lib/active_merchant/billing/gateways/viaklix.rb +38 -14
  46. data/lib/active_merchant/billing/gateways/wirecard.rb +15 -2
  47. data/lib/active_merchant/billing/integrations.rb +18 -11
  48. data/lib/active_merchant/billing/integrations/bogus.rb +4 -3
  49. data/lib/active_merchant/billing/integrations/chronopay.rb +4 -3
  50. data/lib/active_merchant/billing/integrations/chronopay/notification.rb +3 -1
  51. data/lib/active_merchant/billing/integrations/gestpay.rb +4 -5
  52. data/lib/active_merchant/billing/integrations/gestpay/notification.rb +3 -1
  53. data/lib/active_merchant/billing/integrations/hi_trust.rb +4 -3
  54. data/lib/active_merchant/billing/integrations/nochex.rb +4 -3
  55. data/lib/active_merchant/billing/integrations/nochex/notification.rb +1 -1
  56. data/lib/active_merchant/billing/integrations/paypal.rb +3 -4
  57. data/lib/active_merchant/billing/integrations/paypal/helper.rb +9 -8
  58. data/lib/active_merchant/billing/integrations/quickpay.rb +2 -3
  59. data/lib/active_merchant/billing/integrations/quickpay/helper.rb +1 -1
  60. data/lib/active_merchant/billing/integrations/two_checkout.rb +3 -3
  61. data/lib/active_merchant/lib/connection.rb +170 -0
  62. data/lib/active_merchant/lib/country.rb +4 -1
  63. data/lib/active_merchant/lib/posts_data.rb +22 -84
  64. data/test/fixtures.yml +39 -1
  65. data/test/remote/gateways/remote_authorize_net_cim_test.rb +2 -1
  66. data/test/remote/gateways/remote_authorize_net_test.rb +1 -1
  67. data/test/remote/gateways/remote_beanstream_interac_test.rb +1 -1
  68. data/test/remote/gateways/remote_beanstream_test.rb +1 -1
  69. data/test/remote/gateways/remote_braintree_test.rb +2 -9
  70. data/test/remote/gateways/remote_card_stream_test.rb +1 -1
  71. data/test/remote/gateways/remote_cyber_source_test.rb +1 -1
  72. data/test/remote/gateways/remote_data_cash_test.rb +1 -2
  73. data/test/remote/gateways/remote_efsnet_test.rb +1 -1
  74. data/test/remote/gateways/remote_elavon_test.rb +66 -0
  75. data/test/remote/gateways/remote_eway_test.rb +1 -1
  76. data/test/remote/gateways/remote_exact_test.rb +1 -1
  77. data/test/remote/gateways/remote_first_pay_test.rb +87 -0
  78. data/test/remote/gateways/remote_instapay_test.rb +61 -0
  79. data/test/remote/gateways/remote_jetpay_test.rb +103 -0
  80. data/test/remote/gateways/remote_linkpoint_test.rb +11 -2
  81. data/test/remote/gateways/remote_merchant_e_solutions_test.rb +173 -0
  82. data/test/remote/gateways/remote_merchant_ware_test.rb +113 -0
  83. data/test/remote/gateways/remote_modern_payments_cim_test.rb +1 -1
  84. data/test/remote/gateways/remote_modern_payments_test.rb +23 -9
  85. data/test/remote/gateways/remote_moneris_test.rb +1 -1
  86. data/test/remote/gateways/remote_net_registry_test.rb +1 -1
  87. data/test/remote/gateways/remote_netbilling_test.rb +1 -1
  88. data/test/remote/gateways/remote_ogone_test.rb +115 -0
  89. data/test/remote/gateways/remote_pay_junction_test.rb +1 -1
  90. data/test/remote/gateways/remote_pay_secure_test.rb +1 -1
  91. data/test/remote/gateways/remote_payflow_express_test.rb +1 -1
  92. data/test/remote/gateways/remote_payflow_test.rb +1 -1
  93. data/test/remote/gateways/remote_payflow_uk_test.rb +1 -1
  94. data/test/remote/gateways/remote_payment_express_test.rb +17 -7
  95. data/test/remote/gateways/remote_paypal_express_test.rb +1 -1
  96. data/test/remote/gateways/remote_paypal_test.rb +26 -2
  97. data/test/remote/gateways/remote_plugnpay_test.rb +1 -1
  98. data/test/remote/gateways/remote_psigate_test.rb +1 -1
  99. data/test/remote/gateways/remote_psl_card_test.rb +1 -3
  100. data/test/remote/gateways/remote_quickpay_test.rb +1 -1
  101. data/test/remote/gateways/remote_realex_test.rb +1 -1
  102. data/test/remote/gateways/remote_sage_bankcard_test.rb +1 -1
  103. data/test/remote/gateways/remote_sage_pay_test.rb +219 -0
  104. data/test/remote/gateways/remote_sage_test.rb +1 -1
  105. data/test/remote/gateways/remote_sage_virtual_check_test.rb +1 -1
  106. data/test/remote/gateways/remote_sallie_mae_test.rb +51 -0
  107. data/test/remote/gateways/remote_secure_pay_au_test.rb +1 -1
  108. data/test/remote/gateways/remote_secure_pay_tech_test.rb +1 -1
  109. data/test/remote/gateways/remote_secure_pay_test.rb +2 -2
  110. data/test/remote/gateways/remote_skipjack_test.rb +1 -1
  111. data/test/remote/gateways/remote_trans_first_test.rb +1 -1
  112. data/test/remote/gateways/remote_transax_test.rb +112 -0
  113. data/test/remote/gateways/remote_trust_commerce_test.rb +1 -1
  114. data/test/remote/gateways/remote_usa_epay_test.rb +1 -1
  115. data/test/remote/gateways/remote_verifi_test.rb +1 -1
  116. data/test/remote/gateways/remote_viaklix_test.rb +1 -1
  117. data/test/remote/gateways/remote_wirecard_test.rb +34 -0
  118. data/test/remote/integrations/remote_gestpay_integration_test.rb +1 -1
  119. data/test/remote/integrations/remote_paypal_integration_test.rb +1 -1
  120. data/test/test_helper.rb +81 -89
  121. data/test/unit/avs_result_test.rb +1 -1
  122. data/test/unit/base_test.rb +1 -2
  123. data/test/unit/check_test.rb +1 -1
  124. data/test/unit/connection_test.rb +129 -0
  125. data/test/unit/country_code_test.rb +1 -1
  126. data/test/unit/country_test.rb +1 -1
  127. data/test/unit/credit_card_formatting_test.rb +1 -1
  128. data/test/unit/credit_card_methods_test.rb +10 -1
  129. data/test/unit/credit_card_test.rb +1 -1
  130. data/test/unit/cvv_result_test.rb +1 -1
  131. data/test/unit/expiry_date_test.rb +13 -2
  132. data/test/unit/gateways/authorize_net_cim_test.rb +39 -1
  133. data/test/unit/gateways/authorize_net_test.rb +1 -1
  134. data/test/unit/gateways/beanstream_interac_test.rb +1 -1
  135. data/test/unit/gateways/beanstream_test.rb +1 -1
  136. data/test/unit/gateways/bogus_test.rb +1 -1
  137. data/test/unit/gateways/braintree_test.rb +16 -14
  138. data/test/unit/gateways/card_stream_test.rb +1 -1
  139. data/test/unit/gateways/cyber_source_test.rb +1 -1
  140. data/test/unit/gateways/data_cash_test.rb +2 -1
  141. data/test/unit/gateways/efsnet_test.rb +1 -1
  142. data/test/unit/gateways/elavon_test.rb +139 -0
  143. data/test/unit/gateways/eway_test.rb +1 -1
  144. data/test/unit/gateways/exact_test.rb +1 -1
  145. data/test/unit/gateways/first_pay_test.rb +125 -0
  146. data/test/unit/gateways/gateway_test.rb +1 -1
  147. data/test/unit/gateways/instapay_test.rb +102 -0
  148. data/test/unit/gateways/jetpay_test.rb +185 -0
  149. data/test/unit/gateways/linkpoint_test.rb +37 -7
  150. data/test/unit/gateways/merchant_e_solutions_test.rb +169 -0
  151. data/test/unit/gateways/merchant_ware_test.rb +188 -0
  152. data/test/unit/gateways/modern_payments_cim_test.rb +25 -34
  153. data/test/unit/gateways/moneris_test.rb +1 -1
  154. data/test/unit/gateways/net_registry_test.rb +1 -1
  155. data/test/unit/gateways/netbilling_test.rb +1 -1
  156. data/test/unit/gateways/ogone_test.rb +319 -0
  157. data/test/unit/gateways/pay_junction_test.rb +1 -1
  158. data/test/unit/gateways/pay_secure_test.rb +1 -1
  159. data/test/unit/gateways/payflow_express_test.rb +2 -2
  160. data/test/unit/gateways/payflow_express_uk_test.rb +73 -1
  161. data/test/unit/gateways/payflow_test.rb +1 -1
  162. data/test/unit/gateways/payflow_uk_test.rb +1 -1
  163. data/test/unit/gateways/payment_express_test.rb +3 -3
  164. data/test/unit/gateways/paypal_express_test.rb +1 -1
  165. data/test/unit/gateways/paypal_test.rb +50 -1
  166. data/test/unit/gateways/plugnpay_test.rb +1 -1
  167. data/test/unit/gateways/psigate_test.rb +1 -1
  168. data/test/unit/gateways/psl_card_test.rb +1 -1
  169. data/test/unit/gateways/quickpay_test.rb +1 -1
  170. data/test/unit/gateways/realex_test.rb +1 -1
  171. data/test/unit/gateways/sage_bankcard_test.rb +36 -2
  172. data/test/unit/gateways/{protx_test.rb → sage_pay_test.rb} +49 -32
  173. data/test/unit/gateways/sage_virtual_check_test.rb +1 -1
  174. data/test/unit/gateways/sallie_mae_test.rb +53 -0
  175. data/test/unit/gateways/secure_pay_au_test.rb +1 -1
  176. data/test/unit/gateways/secure_pay_tech_test.rb +1 -1
  177. data/test/unit/gateways/secure_pay_test.rb +24 -10
  178. data/test/unit/gateways/skip_jack_test.rb +81 -1
  179. data/test/unit/gateways/trans_first_test.rb +1 -1
  180. data/test/unit/gateways/trust_commerce_test.rb +1 -1
  181. data/test/unit/gateways/usa_epay_test.rb +1 -1
  182. data/test/unit/gateways/verifi_test.rb +1 -1
  183. data/test/unit/gateways/viaklix_test.rb +1 -1
  184. data/test/unit/gateways/wirecard_test.rb +19 -1
  185. data/test/unit/generators/test_generator_helper.rb +1 -1
  186. data/test/unit/integrations/action_view_helper_test.rb +1 -1
  187. data/test/unit/integrations/bogus_module_test.rb +1 -1
  188. data/test/unit/integrations/chronopay_module_test.rb +1 -1
  189. data/test/unit/integrations/gestpay_module_test.rb +1 -1
  190. data/test/unit/integrations/helpers/bogus_helper_test.rb +1 -1
  191. data/test/unit/integrations/helpers/chronopay_helper_test.rb +1 -1
  192. data/test/unit/integrations/helpers/gestpay_helper_test.rb +1 -1
  193. data/test/unit/integrations/helpers/hi_trust_helper_test.rb +1 -1
  194. data/test/unit/integrations/helpers/nochex_helper_test.rb +1 -1
  195. data/test/unit/integrations/helpers/paypal_helper_test.rb +11 -2
  196. data/test/unit/integrations/helpers/quickpay_helper_test.rb +1 -1
  197. data/test/unit/integrations/helpers/two_checkout_helper_test.rb +1 -1
  198. data/test/unit/integrations/hi_trust_module_test.rb +1 -1
  199. data/test/unit/integrations/nochex_module_test.rb +1 -1
  200. data/test/unit/integrations/notifications/chronopay_notification_test.rb +1 -1
  201. data/test/unit/integrations/notifications/gestpay_notification_test.rb +1 -1
  202. data/test/unit/integrations/notifications/hi_trust_notification_test.rb +1 -1
  203. data/test/unit/integrations/notifications/nochex_notification_test.rb +2 -2
  204. data/test/unit/integrations/notifications/notification_test.rb +1 -1
  205. data/test/unit/integrations/notifications/paypal_notification_test.rb +1 -1
  206. data/test/unit/integrations/notifications/quickpay_notification_test.rb +1 -1
  207. data/test/unit/integrations/notifications/two_checkout_notification_test.rb +1 -1
  208. data/test/unit/integrations/paypal_module_test.rb +1 -1
  209. data/test/unit/integrations/quickpay_module_test.rb +1 -1
  210. data/test/unit/integrations/returns/chronopay_return_test.rb +1 -1
  211. data/test/unit/integrations/returns/gestpay_return_test.rb +1 -1
  212. data/test/unit/integrations/returns/hi_trust_return_test.rb +1 -1
  213. data/test/unit/integrations/returns/nochex_return_test.rb +1 -1
  214. data/test/unit/integrations/returns/paypal_return_test.rb +1 -1
  215. data/test/unit/integrations/returns/return_test.rb +1 -1
  216. data/test/unit/integrations/returns/two_checkout_return_test.rb +1 -1
  217. data/test/unit/integrations/two_checkout_module_test.rb +1 -1
  218. data/test/unit/post_data_test.rb +1 -1
  219. data/test/unit/posts_data_test.rb +14 -66
  220. data/test/unit/response_test.rb +1 -1
  221. data/test/unit/utils_test.rb +1 -1
  222. data/test/unit/validateable_test.rb +1 -1
  223. metadata +41 -45
  224. metadata.gz.sig +0 -0
  225. data/test/extra/binding_of_caller.rb +0 -80
  226. data/test/extra/breakpoint.rb +0 -547
  227. data/test/remote/gateways/remote_protx_test.rb +0 -184
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,5 +1,81 @@
1
1
  = ActiveMerchant CHANGELOG
2
2
 
3
+ == Version 1.5.0 (February 2, 2010)
4
+
5
+ * Fix Gestpay notification to avoid Ruby 1.9 warnings [cody]
6
+ * Fix Chronopay notification time parsing for Ruby 1.9 [Joe Van Dyk]
7
+ * Set default currency of Braintree to USD [cody]
8
+ * Fix QuickPay helper for Ruby 1.9 compat [cody]
9
+ * Use String#each_line instead of collect in PaySecureGateway for Ruby 1.9 compat [cody]
10
+ * Use String#each_line instead of to_a in SagePayGateway for Ruby 1.9 compat [cody]
11
+ * Don't return an array when finding the country code. Fixes issue with Ruby 1.9 [cody]
12
+ * Fix custom assertions for Ruby 1.9 [cody]
13
+ * Deprecate Money objects [cody]
14
+ * Update JCB rejex to catch all valid PANs [pjhyett]
15
+ * Remove old TransaXGateway constant [cody]
16
+ * Remove old ProtxGateway constant [cody]
17
+ * Remove old BrainTree constant [cody]
18
+ * Remove AuthorizedNet constant [cody]
19
+ * SecurePay changed their delimeter from % to ,. Update gateway to handle changes [Soleone]
20
+ * Fix documentation typo in base.rb [mig-hub]
21
+ * Add capture test to Linkpoint [Dusty Doris]
22
+ * Fix bug in Linkpoint with ternary operator and Ruby 1.9.1 [Dusty Doris]
23
+ * Add currency and processor options to Braintree gateway [cbillen]
24
+ * Unify API to always look for billing_address/address hash inside of options [stopdropandrew]
25
+ * Fix bug with Modern Payments Gateway where failure authorizations appeared to be successful [cody]
26
+ * Fix Modern Payments Gateway [cody]
27
+ * Use basic SkipJack host for all non-authorization transactions. Fix status method [cody]
28
+ * Strip non alpha numeric chars out of MerchantWare order number [cody]
29
+ * Parse complete response of Authorize.net CIM gateway [Patrick Joyce]
30
+ * Update to PayPal Sandbox URL for testing Payflow Pro Express Checkout. See Express Checkout for Payflow Pro guide [cody]
31
+ * Provide a C_STATE value of "Outside United States" for SageGateway when processing international customers [cody]
32
+ * PayPal Website Payments Pro Canada supports Amex [cody]
33
+ * Add line item support for LinkpointGateway. [Tony Primerano]
34
+ * Add support for SallieMae gateway [iamjwc]
35
+ * Add support for the JetPay gateway [Phil Ripperger, Peter Williams, cody]
36
+ * Add support for advanced SkipJack processors. Pass :advanced => true when constructing gateway [cody]
37
+ * Support test option in AuthorizeNetCimGateway [Tim]
38
+ * Improve Ogone error messages [cody]
39
+ * Add support for :test => true option to OgoneGateway [cody]
40
+ * Bump PayPal Version to 59.0 [cody]
41
+ * Add amex support to eWay gateway [cody]
42
+ * Change Payflow header X-VPS-Timeout -> X-VPS-Client-Timeout [cody]
43
+ * Fix typo preventing OgoneGateway from working in production [Nicolas Jacobeus]
44
+ * Add support for the Elavon MyVirtualMerchant gateway [jstorimer]
45
+ * Fix recurring transactions in Ogone gateway [cody]
46
+ * Fix money formatting for Ogone gateway [cody]
47
+ * Tweak Ogone gateway to use ActiveMerchant conventions for reference transactions [cody, jstorimer]
48
+ * Add support for the Ogone DirectLink payment gateway [Nicolas Jacobeus]
49
+ * Add support for the Antigua based FirstPay payment gateway [Phil R]
50
+ * Add support for PayPal reference transactions [kevin, John, Rahsun McAfee]
51
+ * Add support for the MerchantWARE payment gateway [cody]
52
+ * Rename Protx to SagePay [jstorimer]
53
+ * Allow test mode for eWay gateway [Duff OMelia]
54
+ * Don't use Time.parse for the ExpiryDate [cody]
55
+ * Add support for CVV code to Authorize.net CIM [Guy Naor]
56
+ * Add shipping address to Authorize.net [Eric Tarn]
57
+ * Don't setup the logger by default [cody]
58
+ * Refactor ActiveMerchant::Connection out of the PostsData module. Add support for logging and wiredumping requests [cody]
59
+ * Assume a valid load path when running tests [cody]
60
+ * Use SHIPTOSTREET2 element instead of STREET2 element for Payflow Express Uk address [cody]
61
+ * Clean up the test helper [cody]
62
+ * Fix DataCash unit test that was making a remote call [cody]
63
+ * Don't check Request#test? for remote PaymentExpress tests because their test environment has changed [cody]
64
+ * Update Instapay gateway to support capture and add address, order, and invoice fields. Add support for CVV and AVS response [cody]
65
+ * Add support for Instapay gateway [brahma]
66
+ * Cleanup PaymentExpress reference purchases and turn on AVS [cody]
67
+ * Add reference purchases and authorizations to PaymentExpress [mocra]
68
+ * Add support for Merchant e-Solutions Gateway [Zac Williams, Robby Russell]
69
+ * Fix Braintree unit test [cody]
70
+ * Add support for checks to SmartPs gateways [jvoohris]
71
+ * Extract SmartPs for Braintree and Transax [mmangino]
72
+ * Ruby 1.9 compatibility [bschwartz]
73
+ * Update Payflow Express to handle Street2 element [James MacAulay]
74
+ * Fix typo in Protx DeliveryState field [cody]
75
+ * Ignore Wirecard state unless it is 2 characters [Cody]
76
+ * Update Wirecard to make country and state processing more robust [Soleone]
77
+ * Update ProTX to use the latest v2.23 protocol [Tekin]
78
+
3
79
  == Version 1.4.2 (April 24, 2009)
4
80
 
5
81
  * Fix typo in Authorize.net CIM [infused]
@@ -417,3 +493,5 @@
417
493
  * Credit card in memory object resembling a AR object
418
494
  * Credit card validation methods as static methods of the credit card object
419
495
 
496
+ == PlanetArgon fork for integrating Merchant eSolutions gateway
497
+
@@ -39,6 +39,14 @@ NetRegistry Gateway
39
39
 
40
40
  * Originally contributed by George Ogata (mailto: george.ogata@gmail.com)
41
41
 
42
+ DataCash Gateway (March 2, 2007)
43
+
44
+ * MoneySpyder, http://moneyspyder.co.uk and E-consultancy, http://www.e-consultancy.com
45
+
46
+ PSL Card Gateway (March 27, 2007)
47
+
48
+ * MoneySpyder, http://moneyspyder.co.uk
49
+
42
50
  Viaklix Gateway (Sep 3, 2007)
43
51
 
44
52
  * Originally contributed by Sal Scotto
@@ -88,3 +96,39 @@ Modern Payments (June 13, 2008)
88
96
  Wirecard Gateway (June 30, 2008)
89
97
 
90
98
  * Initial implementation by Soleone
99
+
100
+ Transax Gateway (May 3, 2009)
101
+
102
+ * Mike Mangino
103
+
104
+ Merchant E-Solutions Gateway (May 3, 2009)
105
+
106
+ * Zac Williams, Robby Russell
107
+
108
+ Instapay Gateway (May 3, 2009)
109
+
110
+ * Thomas Rideout
111
+
112
+ MerchantWARE (July 7, 2009)
113
+
114
+ * Cody Fauser
115
+
116
+ FirstPay (July 24, 2009)
117
+
118
+ * Phil R
119
+
120
+ Ogone (July 20, 2009)
121
+
122
+ * Nicolas Jacobeus
123
+
124
+ Elavon (August 09, 2009)
125
+
126
+ * Jesse Storimer
127
+
128
+ JetPay (September 29, 2009)
129
+
130
+ * Phil Ripperger, Peter Williams
131
+
132
+ SallieMae (October 2, 2009)
133
+
134
+ * iamjwc
@@ -22,9 +22,11 @@ The {ActiveMerchant Wiki}[http://github.com/Shopify/active_merchant/wikis] conta
22
22
  * {eWAY}[http://www.eway.com.au/] - AU
23
23
  * {E-xact}[http://www.e-xact.com] - CA, US
24
24
  * {LinkPoint}[http://www.linkpoint.com/] - US
25
+ * {Merchant e-Solutions}[http://merchante-solutions.com/] - US
25
26
  * {Modern Payments}[http://www.modpay.com] - US
26
27
  * {Moneris}[http://www.moneris.com/] - CA
27
28
  * {NetRegistry}[http://www.netregistry.com.au] - AU
29
+ * {NELiX TransaX Gateway}[http://www.nelixtransax.com] - US
28
30
  * {NETbilling}[http://www.netbilling.com] - US
29
31
  * {PayJunction}[http://www.payjunction.com/] - US
30
32
  * {PaySecure}[http://www.commsecure.com.au/paysecure.shtml] - AU
@@ -42,6 +44,7 @@ The {ActiveMerchant Wiki}[http://github.com/Shopify/active_merchant/wikis] conta
42
44
  * {Quickpay}[http://quickpay.dk/] - DK
43
45
  * {Realex}[http://www.realexpayments.com/] - IE, GB
44
46
  * {Sage Payment Solutions}[http://www.sagepayments.com] - US, CA
47
+ * {Sallie Mae}[http://www.salliemae.com] - US
45
48
  * {SecurePay}[http://securepay.com.au] - AU
46
49
  * {SecurePay}[http://www.securepay.com/] - US
47
50
  * {SecurePayTech}[http://www.securepaytech.com/] - NZ
@@ -130,4 +133,4 @@ Installation from RubyGems
130
133
 
131
134
  == Contributing
132
135
 
133
- Please see the {ActiveMerchant Guide to Contributing}[http://github.com/Shopify/active_merchant/wikis/contributing] for information on adding a new gateway to ActiveMerchant.
136
+ Please see the {ActiveMerchant Guide to Contributing}[http://github.com/Shopify/active_merchant/wikis/contributing] for information on adding a new gateway to ActiveMerchant.
data/Rakefile CHANGED
@@ -4,9 +4,10 @@ require 'rake/testtask'
4
4
  require 'rake/rdoctask'
5
5
  require 'rake/gempackagetask'
6
6
  require 'rake/contrib/rubyforgepublisher'
7
- require File.dirname(__FILE__) + '/lib/support/gateway_support'
7
+ require File.join(File.dirname(__FILE__), 'lib', 'support', 'gateway_support')
8
8
 
9
- PKG_VERSION = "1.4.2"
9
+
10
+ PKG_VERSION = "1.5.0"
10
11
  PKG_NAME = "activemerchant"
11
12
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
12
13
 
@@ -24,12 +25,14 @@ namespace :test do
24
25
  Rake::TestTask.new(:units) do |t|
25
26
  t.pattern = 'test/unit/**/*_test.rb'
26
27
  t.ruby_opts << '-rubygems'
28
+ t.libs << 'test'
27
29
  t.verbose = true
28
30
  end
29
31
 
30
32
  Rake::TestTask.new(:remote) do |t|
31
33
  t.pattern = 'test/remote/**/*_test.rb'
32
34
  t.ruby_opts << '-rubygems'
35
+ t.libs << 'test'
33
36
  t.verbose = true
34
37
  end
35
38
 
@@ -39,8 +42,8 @@ end
39
42
  Rake::RDocTask.new do |rdoc|
40
43
  rdoc.rdoc_dir = 'doc'
41
44
  rdoc.title = "ActiveMerchant library"
42
- rdoc.options << '--line-numbers' << '--inline-source' << '--main=README'
43
- rdoc.rdoc_files.include('README', 'CHANGELOG')
45
+ rdoc.options << '--line-numbers' << '--inline-source' << '--main=README.rdoc'
46
+ rdoc.rdoc_files.include('README.rdoc', 'CHANGELOG')
44
47
  rdoc.rdoc_files.include('lib/**/*.rb')
45
48
  rdoc.rdoc_files.exclude('lib/tasks')
46
49
  end
@@ -97,12 +100,6 @@ Rake::GemPackageTask.new(spec) do |p|
97
100
  p.need_zip = true
98
101
  end
99
102
 
100
- desc "Continuously watch unit tests"
101
- task :watch do
102
- system("clear")
103
- system("stakeout \"rake\" `find . -name '*.rb'`")
104
- end
105
-
106
103
  desc "Release the gems and docs to RubyForge"
107
104
  task :release => [ :publish, :upload_rdoc ]
108
105
 
@@ -154,6 +151,3 @@ namespace :gateways do
154
151
  end
155
152
  end
156
153
  end
157
-
158
-
159
-
@@ -21,20 +21,15 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  #++
23
23
 
24
- $:.unshift(File.dirname(__FILE__))
24
+ $:.unshift File.dirname(__FILE__)
25
25
 
26
26
  # Include rails' active support for all the core extensions we love
27
27
  begin
28
28
  require 'active_support'
29
29
  rescue LoadError
30
30
  require 'rubygems'
31
-
32
- if respond_to? :gem
33
- gem 'activesupport', ">=2.0.0"
34
- require 'active_support'
35
- else
36
- require_gem 'activesupport'
37
- end
31
+ gem 'activesupport', ">=2.0.0"
32
+ require 'active_support'
38
33
  end
39
34
 
40
35
  begin
@@ -45,32 +40,27 @@ rescue LoadError
45
40
  end
46
41
 
47
42
  require 'cgi'
48
-
43
+ require 'rexml/document'
49
44
  require 'active_merchant/lib/utils'
50
45
  require 'active_merchant/lib/error'
51
46
  require 'active_merchant/lib/validateable'
47
+ require 'active_merchant/lib/connection'
52
48
  require 'active_merchant/lib/posts_data'
53
49
  require 'active_merchant/lib/post_data'
54
50
  require 'active_merchant/lib/requires_parameters'
55
-
56
- # Require the country class
57
51
  require 'active_merchant/lib/country'
58
52
 
59
- # Address Verification
60
53
  require 'active_merchant/billing/avs_result'
61
-
62
- # Card Verfication Code
63
54
  require 'active_merchant/billing/cvv_result'
64
-
65
- # CreditCard Utility class.
66
55
  require 'active_merchant/billing/credit_card_methods'
67
56
  require 'active_merchant/billing/credit_card_formatting'
68
57
  require 'active_merchant/billing/credit_card'
69
-
70
58
  require 'active_merchant/billing/base'
71
-
72
- # Require the supported gateways
59
+ require 'active_merchant/billing/check'
73
60
  require 'active_merchant/billing/gateways'
74
61
 
75
- # Require the supported integrations
76
- require 'active_merchant/billing/integrations'
62
+ module ActiveMerchant #:nodoc:
63
+ module Billing #:nodoc:
64
+ autoload :Integrations, 'active_merchant/billing/integrations'
65
+ end
66
+ end
@@ -1,3 +1,6 @@
1
+ #!ruby19
2
+ # encoding: utf-8
3
+
1
4
  module ActiveMerchant
2
5
  module Billing
3
6
  # Implements the Address Verification System
@@ -13,23 +16,23 @@ module ActiveMerchant
13
16
  'C' => 'Street address and postal code do not match.',
14
17
  'D' => 'Street address and postal code match.',
15
18
  'E' => 'AVS data is invalid or AVS is not allowed for this card type.',
16
- 'F' => 'Card members name does not match, but billing postal code matches.',
19
+ 'F' => 'Card member\'s name does not match, but billing postal code matches.',
17
20
  'G' => 'Non-U.S. issuing bank does not support AVS.',
18
- 'H' => 'Card members name does not match. Street address and postal code match.',
21
+ 'H' => 'Card member\'s name does not match. Street address and postal code match.',
19
22
  'I' => 'Address not verified.',
20
- 'J' => 'Card members name, billing address, and postal code match. Shipping information verified and chargeback protection guaranteed through the Fraud Protection Program.',
21
- 'K' => 'Card members name matches but billing address and billing postal code do not match.',
22
- 'L' => 'Card members name and billing postal code match, but billing address does not match.',
23
+ 'J' => 'Card member\'s name, billing address, and postal code match. Shipping information verified and chargeback protection guaranteed through the Fraud Protection Program.',
24
+ 'K' => 'Card member\'s name matches but billing address and billing postal code do not match.',
25
+ 'L' => 'Card member\'s name and billing postal code match, but billing address does not match.',
23
26
  'M' => 'Street address and postal code match.',
24
27
  'N' => 'Street address and postal code do not match.',
25
- 'O' => 'Card members name and billing address match, but billing postal code does not match.',
28
+ 'O' => 'Card member\'s name and billing address match, but billing postal code does not match.',
26
29
  'P' => 'Postal code matches, but street address not verified.',
27
- 'Q' => 'Card members name, billing address, and postal code match. Shipping information verified but chargeback protection not guaranteed.',
30
+ 'Q' => 'Card member\'s name, billing address, and postal code match. Shipping information verified but chargeback protection not guaranteed.',
28
31
  'R' => 'System unavailable.',
29
32
  'S' => 'U.S.-issuing bank does not support AVS.',
30
- 'T' => 'Card members name does not match, but street address matches.',
33
+ 'T' => 'Card member\'s name does not match, but street address matches.',
31
34
  'U' => 'Address information unavailable.',
32
- 'V' => 'Card members name, billing address, and billing postal code match.',
35
+ 'V' => 'Card member\'s name, billing address, and billing postal code match.',
33
36
  'W' => 'Street address does not match, but 9-digit postal code matches.',
34
37
  'X' => 'Street address and 9-digit postal code match.',
35
38
  'Y' => 'Street address and 5-digit postal code match.',
@@ -92,4 +95,4 @@ module ActiveMerchant
92
95
  end
93
96
  end
94
97
  end
95
- end
98
+ end
@@ -6,9 +6,9 @@ module ActiveMerchant #:nodoc:
6
6
  # ActiveMerchant::Billing::Base.gateway_mode = :test
7
7
  mattr_accessor :gateway_mode
8
8
 
9
- # Set ActiveMerchant gateways in test mode.
9
+ # Set ActiveMerchant integrations in test mode.
10
10
  #
11
- # ActiveMerchant::Billing::Base.gateway_mode = :test
11
+ # ActiveMerchant::Billing::Base.integration_mode = :test
12
12
  mattr_accessor :integration_mode
13
13
 
14
14
  # Set both the mode of both the gateways and integrations
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
5
5
  # not backed by any database.
6
6
  #
7
7
  # You may use Check in place of CreditCard with any gateway that supports it. Currently, only
8
- # +BrainTreeGateway+ supports the Check object.
8
+ # +BraintreeGateway+ supports the Check object.
9
9
  class Check
10
10
  include Validateable
11
11
 
@@ -8,13 +8,13 @@ module ActiveMerchant #:nodoc:
8
8
  'discover' => /^(6011|65\d{2})\d{12}$/,
9
9
  'american_express' => /^3[47]\d{13}$/,
10
10
  'diners_club' => /^3(0[0-5]|[68]\d)\d{11}$/,
11
- 'jcb' => /^3528\d{12}$/,
11
+ 'jcb' => /^35(28|29|[3-8]\d)\d{12}$/,
12
12
  'switch' => /^6759\d{12}(\d{2,3})?$/,
13
13
  'solo' => /^6767\d{12}(\d{2,3})?$/,
14
14
  'dankort' => /^5019\d{12}$/,
15
15
  'maestro' => /^(5[06-8]|6\d)\d{10,17}$/,
16
16
  'forbrugsforeningen' => /^600722\d{10}$/,
17
- 'laser' => /^(6304[89]\d{11}(\d{2,3})?|670695\d{13})$/
17
+ 'laser' => /^(6304|6706|6771|6709)\d{8}(\d{4}|\d{6,7})?$/
18
18
  }
19
19
 
20
20
  def self.included(base)
@@ -1,19 +1,25 @@
1
+ require 'date'
2
+
1
3
  module ActiveMerchant
2
4
  module Billing
3
5
  class CreditCard
4
6
  class ExpiryDate #:nodoc:
5
7
  attr_reader :month, :year
6
8
  def initialize(month, year)
7
- @month = month
8
- @year = year
9
+ @month = month.to_i
10
+ @year = year.to_i
9
11
  end
10
12
 
11
13
  def expired? #:nodoc:
12
- Time.now > expiration rescue true
14
+ Time.now.utc > expiration
13
15
  end
14
16
 
15
17
  def expiration #:nodoc:
16
- Time.parse("#{month}/#{month_days}/#{year} 23:59:59") rescue Time.at(0)
18
+ begin
19
+ Time.utc(year, month, month_days, 23, 59, 59)
20
+ rescue ArgumentError
21
+ Time.at(0).utc
22
+ end
17
23
  end
18
24
 
19
25
  private
@@ -130,15 +130,17 @@ module ActiveMerchant #:nodoc:
130
130
  self.class.name.scan(/\:\:(\w+)Gateway/).flatten.first
131
131
  end
132
132
 
133
- # Return a String with the amount in the appropriate format
134
- #--
135
- # TODO Refactor this method. It's a tad on the ugly side.
136
133
  def amount(money)
137
134
  return nil if money.nil?
138
- cents = money.respond_to?(:cents) ? money.cents : money
135
+ cents = if money.respond_to?(:cents)
136
+ warn "Support for Money objects is deprecated and will be removed from a future release of ActiveMerchant. Please use an Integer value in cents"
137
+ money.cents
138
+ else
139
+ money
140
+ end
139
141
 
140
142
  if money.is_a?(String) or cents.to_i < 0
141
- raise ArgumentError, 'money amount must be either a Money object or a positive integer in cents.'
143
+ raise ArgumentError, 'money amount must be a positive Integer in cents.'
142
144
  end
143
145
 
144
146
  if self.money_format == :cents
@@ -148,7 +150,6 @@ module ActiveMerchant #:nodoc:
148
150
  end
149
151
  end
150
152
 
151
- # Ascertains the currency to be used on the money supplied.
152
153
  def currency(money)
153
154
  money.respond_to?(:currency) ? money.currency : self.default_currency
154
155
  end
@@ -1,3 +1,18 @@
1
- require 'active_merchant/billing/gateway'
2
-
3
- Dir[File.dirname(__FILE__) + '/gateways/*.rb'].each{|g| require g}
1
+ module ActiveMerchant
2
+ module Billing
3
+ autoload :Gateway, 'active_merchant/billing/gateway'
4
+
5
+ Dir[File.dirname(__FILE__) + '/gateways/**/*.rb'].each do |f|
6
+
7
+ # Get camelized class name
8
+ filename = File.basename(f, '.rb')
9
+ # Add _gateway suffix
10
+ gateway_name = filename + '_gateway'
11
+ # Camelize the string to get the class name
12
+ gateway_class = gateway_name.camelize
13
+
14
+ # Register for autoloading
15
+ autoload gateway_class, f
16
+ end
17
+ end
18
+ end