activemerchant 1.4.2 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +78 -0
- data/{CONTRIBUTERS → CONTRIBUTORS} +44 -0
- data/{README → README.rdoc} +4 -1
- data/Rakefile +7 -13
- data/lib/active_merchant.rb +11 -21
- data/lib/active_merchant/billing/avs_result.rb +13 -10
- data/lib/active_merchant/billing/base.rb +2 -2
- data/lib/active_merchant/billing/check.rb +1 -1
- data/lib/active_merchant/billing/credit_card_methods.rb +2 -2
- data/lib/active_merchant/billing/expiry_date.rb +10 -4
- data/lib/active_merchant/billing/gateway.rb +7 -6
- data/lib/active_merchant/billing/gateways.rb +18 -3
- data/lib/active_merchant/billing/gateways/authorize_net.rb +20 -12
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +40 -6
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb.orig +736 -0
- data/lib/active_merchant/billing/gateways/braintree.rb +6 -211
- data/lib/active_merchant/billing/gateways/data_cash.rb +5 -7
- data/lib/active_merchant/billing/gateways/elavon.rb +134 -0
- data/lib/active_merchant/billing/gateways/eway.rb +7 -2
- data/lib/active_merchant/billing/gateways/first_pay.rb +172 -0
- data/lib/active_merchant/billing/gateways/instapay.rb +164 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +270 -0
- data/lib/active_merchant/billing/gateways/linkpoint.rb +65 -12
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +154 -0
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +283 -0
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +12 -6
- data/lib/active_merchant/billing/gateways/ogone.rb +279 -0
- data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -1
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
- data/lib/active_merchant/billing/gateways/payflow_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/payment_express.rb +20 -32
- data/lib/active_merchant/billing/gateways/paypal.rb +22 -9
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +2 -1
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/psl_card.rb +4 -6
- data/lib/active_merchant/billing/gateways/sage/sage_core.rb +7 -1
- data/lib/active_merchant/billing/gateways/{protx.rb → sage_pay.rb} +60 -35
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +144 -0
- data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/skip_jack.rb +23 -10
- data/lib/active_merchant/billing/gateways/smart_ps.rb +265 -0
- data/lib/active_merchant/billing/gateways/transax.rb +25 -0
- data/lib/active_merchant/billing/gateways/viaklix.rb +38 -14
- data/lib/active_merchant/billing/gateways/wirecard.rb +15 -2
- data/lib/active_merchant/billing/integrations.rb +18 -11
- data/lib/active_merchant/billing/integrations/bogus.rb +4 -3
- data/lib/active_merchant/billing/integrations/chronopay.rb +4 -3
- data/lib/active_merchant/billing/integrations/chronopay/notification.rb +3 -1
- data/lib/active_merchant/billing/integrations/gestpay.rb +4 -5
- data/lib/active_merchant/billing/integrations/gestpay/notification.rb +3 -1
- data/lib/active_merchant/billing/integrations/hi_trust.rb +4 -3
- data/lib/active_merchant/billing/integrations/nochex.rb +4 -3
- data/lib/active_merchant/billing/integrations/nochex/notification.rb +1 -1
- data/lib/active_merchant/billing/integrations/paypal.rb +3 -4
- data/lib/active_merchant/billing/integrations/paypal/helper.rb +9 -8
- data/lib/active_merchant/billing/integrations/quickpay.rb +2 -3
- data/lib/active_merchant/billing/integrations/quickpay/helper.rb +1 -1
- data/lib/active_merchant/billing/integrations/two_checkout.rb +3 -3
- data/lib/active_merchant/lib/connection.rb +170 -0
- data/lib/active_merchant/lib/country.rb +4 -1
- data/lib/active_merchant/lib/posts_data.rb +22 -84
- data/test/fixtures.yml +39 -1
- data/test/remote/gateways/remote_authorize_net_cim_test.rb +2 -1
- data/test/remote/gateways/remote_authorize_net_test.rb +1 -1
- data/test/remote/gateways/remote_beanstream_interac_test.rb +1 -1
- data/test/remote/gateways/remote_beanstream_test.rb +1 -1
- data/test/remote/gateways/remote_braintree_test.rb +2 -9
- data/test/remote/gateways/remote_card_stream_test.rb +1 -1
- data/test/remote/gateways/remote_cyber_source_test.rb +1 -1
- data/test/remote/gateways/remote_data_cash_test.rb +1 -2
- data/test/remote/gateways/remote_efsnet_test.rb +1 -1
- data/test/remote/gateways/remote_elavon_test.rb +66 -0
- data/test/remote/gateways/remote_eway_test.rb +1 -1
- data/test/remote/gateways/remote_exact_test.rb +1 -1
- data/test/remote/gateways/remote_first_pay_test.rb +87 -0
- data/test/remote/gateways/remote_instapay_test.rb +61 -0
- data/test/remote/gateways/remote_jetpay_test.rb +103 -0
- data/test/remote/gateways/remote_linkpoint_test.rb +11 -2
- data/test/remote/gateways/remote_merchant_e_solutions_test.rb +173 -0
- data/test/remote/gateways/remote_merchant_ware_test.rb +113 -0
- data/test/remote/gateways/remote_modern_payments_cim_test.rb +1 -1
- data/test/remote/gateways/remote_modern_payments_test.rb +23 -9
- data/test/remote/gateways/remote_moneris_test.rb +1 -1
- data/test/remote/gateways/remote_net_registry_test.rb +1 -1
- data/test/remote/gateways/remote_netbilling_test.rb +1 -1
- data/test/remote/gateways/remote_ogone_test.rb +115 -0
- data/test/remote/gateways/remote_pay_junction_test.rb +1 -1
- data/test/remote/gateways/remote_pay_secure_test.rb +1 -1
- data/test/remote/gateways/remote_payflow_express_test.rb +1 -1
- data/test/remote/gateways/remote_payflow_test.rb +1 -1
- data/test/remote/gateways/remote_payflow_uk_test.rb +1 -1
- data/test/remote/gateways/remote_payment_express_test.rb +17 -7
- data/test/remote/gateways/remote_paypal_express_test.rb +1 -1
- data/test/remote/gateways/remote_paypal_test.rb +26 -2
- data/test/remote/gateways/remote_plugnpay_test.rb +1 -1
- data/test/remote/gateways/remote_psigate_test.rb +1 -1
- data/test/remote/gateways/remote_psl_card_test.rb +1 -3
- data/test/remote/gateways/remote_quickpay_test.rb +1 -1
- data/test/remote/gateways/remote_realex_test.rb +1 -1
- data/test/remote/gateways/remote_sage_bankcard_test.rb +1 -1
- data/test/remote/gateways/remote_sage_pay_test.rb +219 -0
- data/test/remote/gateways/remote_sage_test.rb +1 -1
- data/test/remote/gateways/remote_sage_virtual_check_test.rb +1 -1
- data/test/remote/gateways/remote_sallie_mae_test.rb +51 -0
- data/test/remote/gateways/remote_secure_pay_au_test.rb +1 -1
- data/test/remote/gateways/remote_secure_pay_tech_test.rb +1 -1
- data/test/remote/gateways/remote_secure_pay_test.rb +2 -2
- data/test/remote/gateways/remote_skipjack_test.rb +1 -1
- data/test/remote/gateways/remote_trans_first_test.rb +1 -1
- data/test/remote/gateways/remote_transax_test.rb +112 -0
- data/test/remote/gateways/remote_trust_commerce_test.rb +1 -1
- data/test/remote/gateways/remote_usa_epay_test.rb +1 -1
- data/test/remote/gateways/remote_verifi_test.rb +1 -1
- data/test/remote/gateways/remote_viaklix_test.rb +1 -1
- data/test/remote/gateways/remote_wirecard_test.rb +34 -0
- data/test/remote/integrations/remote_gestpay_integration_test.rb +1 -1
- data/test/remote/integrations/remote_paypal_integration_test.rb +1 -1
- data/test/test_helper.rb +81 -89
- data/test/unit/avs_result_test.rb +1 -1
- data/test/unit/base_test.rb +1 -2
- data/test/unit/check_test.rb +1 -1
- data/test/unit/connection_test.rb +129 -0
- data/test/unit/country_code_test.rb +1 -1
- data/test/unit/country_test.rb +1 -1
- data/test/unit/credit_card_formatting_test.rb +1 -1
- data/test/unit/credit_card_methods_test.rb +10 -1
- data/test/unit/credit_card_test.rb +1 -1
- data/test/unit/cvv_result_test.rb +1 -1
- data/test/unit/expiry_date_test.rb +13 -2
- data/test/unit/gateways/authorize_net_cim_test.rb +39 -1
- data/test/unit/gateways/authorize_net_test.rb +1 -1
- data/test/unit/gateways/beanstream_interac_test.rb +1 -1
- data/test/unit/gateways/beanstream_test.rb +1 -1
- data/test/unit/gateways/bogus_test.rb +1 -1
- data/test/unit/gateways/braintree_test.rb +16 -14
- data/test/unit/gateways/card_stream_test.rb +1 -1
- data/test/unit/gateways/cyber_source_test.rb +1 -1
- data/test/unit/gateways/data_cash_test.rb +2 -1
- data/test/unit/gateways/efsnet_test.rb +1 -1
- data/test/unit/gateways/elavon_test.rb +139 -0
- data/test/unit/gateways/eway_test.rb +1 -1
- data/test/unit/gateways/exact_test.rb +1 -1
- data/test/unit/gateways/first_pay_test.rb +125 -0
- data/test/unit/gateways/gateway_test.rb +1 -1
- data/test/unit/gateways/instapay_test.rb +102 -0
- data/test/unit/gateways/jetpay_test.rb +185 -0
- data/test/unit/gateways/linkpoint_test.rb +37 -7
- data/test/unit/gateways/merchant_e_solutions_test.rb +169 -0
- data/test/unit/gateways/merchant_ware_test.rb +188 -0
- data/test/unit/gateways/modern_payments_cim_test.rb +25 -34
- data/test/unit/gateways/moneris_test.rb +1 -1
- data/test/unit/gateways/net_registry_test.rb +1 -1
- data/test/unit/gateways/netbilling_test.rb +1 -1
- data/test/unit/gateways/ogone_test.rb +319 -0
- data/test/unit/gateways/pay_junction_test.rb +1 -1
- data/test/unit/gateways/pay_secure_test.rb +1 -1
- data/test/unit/gateways/payflow_express_test.rb +2 -2
- data/test/unit/gateways/payflow_express_uk_test.rb +73 -1
- data/test/unit/gateways/payflow_test.rb +1 -1
- data/test/unit/gateways/payflow_uk_test.rb +1 -1
- data/test/unit/gateways/payment_express_test.rb +3 -3
- data/test/unit/gateways/paypal_express_test.rb +1 -1
- data/test/unit/gateways/paypal_test.rb +50 -1
- data/test/unit/gateways/plugnpay_test.rb +1 -1
- data/test/unit/gateways/psigate_test.rb +1 -1
- data/test/unit/gateways/psl_card_test.rb +1 -1
- data/test/unit/gateways/quickpay_test.rb +1 -1
- data/test/unit/gateways/realex_test.rb +1 -1
- data/test/unit/gateways/sage_bankcard_test.rb +36 -2
- data/test/unit/gateways/{protx_test.rb → sage_pay_test.rb} +49 -32
- data/test/unit/gateways/sage_virtual_check_test.rb +1 -1
- data/test/unit/gateways/sallie_mae_test.rb +53 -0
- data/test/unit/gateways/secure_pay_au_test.rb +1 -1
- data/test/unit/gateways/secure_pay_tech_test.rb +1 -1
- data/test/unit/gateways/secure_pay_test.rb +24 -10
- data/test/unit/gateways/skip_jack_test.rb +81 -1
- data/test/unit/gateways/trans_first_test.rb +1 -1
- data/test/unit/gateways/trust_commerce_test.rb +1 -1
- data/test/unit/gateways/usa_epay_test.rb +1 -1
- data/test/unit/gateways/verifi_test.rb +1 -1
- data/test/unit/gateways/viaklix_test.rb +1 -1
- data/test/unit/gateways/wirecard_test.rb +19 -1
- data/test/unit/generators/test_generator_helper.rb +1 -1
- data/test/unit/integrations/action_view_helper_test.rb +1 -1
- data/test/unit/integrations/bogus_module_test.rb +1 -1
- data/test/unit/integrations/chronopay_module_test.rb +1 -1
- data/test/unit/integrations/gestpay_module_test.rb +1 -1
- data/test/unit/integrations/helpers/bogus_helper_test.rb +1 -1
- data/test/unit/integrations/helpers/chronopay_helper_test.rb +1 -1
- data/test/unit/integrations/helpers/gestpay_helper_test.rb +1 -1
- data/test/unit/integrations/helpers/hi_trust_helper_test.rb +1 -1
- data/test/unit/integrations/helpers/nochex_helper_test.rb +1 -1
- data/test/unit/integrations/helpers/paypal_helper_test.rb +11 -2
- data/test/unit/integrations/helpers/quickpay_helper_test.rb +1 -1
- data/test/unit/integrations/helpers/two_checkout_helper_test.rb +1 -1
- data/test/unit/integrations/hi_trust_module_test.rb +1 -1
- data/test/unit/integrations/nochex_module_test.rb +1 -1
- data/test/unit/integrations/notifications/chronopay_notification_test.rb +1 -1
- data/test/unit/integrations/notifications/gestpay_notification_test.rb +1 -1
- data/test/unit/integrations/notifications/hi_trust_notification_test.rb +1 -1
- data/test/unit/integrations/notifications/nochex_notification_test.rb +2 -2
- data/test/unit/integrations/notifications/notification_test.rb +1 -1
- data/test/unit/integrations/notifications/paypal_notification_test.rb +1 -1
- data/test/unit/integrations/notifications/quickpay_notification_test.rb +1 -1
- data/test/unit/integrations/notifications/two_checkout_notification_test.rb +1 -1
- data/test/unit/integrations/paypal_module_test.rb +1 -1
- data/test/unit/integrations/quickpay_module_test.rb +1 -1
- data/test/unit/integrations/returns/chronopay_return_test.rb +1 -1
- data/test/unit/integrations/returns/gestpay_return_test.rb +1 -1
- data/test/unit/integrations/returns/hi_trust_return_test.rb +1 -1
- data/test/unit/integrations/returns/nochex_return_test.rb +1 -1
- data/test/unit/integrations/returns/paypal_return_test.rb +1 -1
- data/test/unit/integrations/returns/return_test.rb +1 -1
- data/test/unit/integrations/returns/two_checkout_return_test.rb +1 -1
- data/test/unit/integrations/two_checkout_module_test.rb +1 -1
- data/test/unit/post_data_test.rb +1 -1
- data/test/unit/posts_data_test.rb +14 -66
- data/test/unit/response_test.rb +1 -1
- data/test/unit/utils_test.rb +1 -1
- data/test/unit/validateable_test.rb +1 -1
- metadata +41 -45
- metadata.gz.sig +0 -0
- data/test/extra/binding_of_caller.rb +0 -80
- data/test/extra/breakpoint.rb +0 -547
- 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
|
data/{README → README.rdoc}
RENAMED
@@ -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__)
|
7
|
+
require File.join(File.dirname(__FILE__), 'lib', 'support', 'gateway_support')
|
8
8
|
|
9
|
-
|
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
|
-
|
data/lib/active_merchant.rb
CHANGED
@@ -21,20 +21,15 @@
|
|
21
21
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
22
|
#++
|
23
23
|
|
24
|
-
$:.unshift
|
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
|
-
|
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
|
-
|
76
|
-
|
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 member
|
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 member
|
21
|
+
'H' => 'Card member\'s name does not match. Street address and postal code match.',
|
19
22
|
'I' => 'Address not verified.',
|
20
|
-
'J' => 'Card member
|
21
|
-
'K' => 'Card member
|
22
|
-
'L' => 'Card member
|
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 member
|
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 member
|
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 member
|
33
|
+
'T' => 'Card member\'s name does not match, but street address matches.',
|
31
34
|
'U' => 'Address information unavailable.',
|
32
|
-
'V' => 'Card member
|
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
|
9
|
+
# Set ActiveMerchant integrations in test mode.
|
10
10
|
#
|
11
|
-
# ActiveMerchant::Billing::Base.
|
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
|
-
# +
|
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' => /^
|
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
|
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
|
14
|
+
Time.now.utc > expiration
|
13
15
|
end
|
14
16
|
|
15
17
|
def expiration #:nodoc:
|
16
|
-
|
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)
|
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
|
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
|
-
|
2
|
-
|
3
|
-
|
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
|