activemerchant 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +226 -0
  3. data/CONTRIBUTERS +52 -0
  4. data/README +34 -24
  5. data/Rakefile +152 -0
  6. data/gem-public_cert.pem +20 -0
  7. data/init.rb +3 -0
  8. data/lib/active_merchant.rb +3 -1
  9. data/lib/active_merchant/billing/credit_card.rb +21 -17
  10. data/lib/active_merchant/billing/credit_card_methods.rb +17 -19
  11. data/lib/active_merchant/billing/gateway.rb +160 -44
  12. data/lib/active_merchant/billing/gateways.rb +2 -15
  13. data/lib/active_merchant/billing/gateways/authorize_net.rb +21 -21
  14. data/lib/active_merchant/billing/gateways/bogus.rb +6 -6
  15. data/lib/active_merchant/billing/gateways/brain_tree.rb +191 -0
  16. data/lib/active_merchant/billing/gateways/card_stream.rb +207 -0
  17. data/lib/active_merchant/billing/gateways/cyber_source.rb +402 -0
  18. data/lib/active_merchant/billing/gateways/data_cash.rb +41 -97
  19. data/lib/active_merchant/billing/gateways/efsnet.rb +256 -0
  20. data/lib/active_merchant/billing/gateways/eway.rb +77 -29
  21. data/lib/active_merchant/billing/gateways/exact.rb +230 -0
  22. data/lib/active_merchant/billing/gateways/linkpoint.rb +6 -33
  23. data/lib/active_merchant/billing/gateways/moneris.rb +155 -125
  24. data/lib/active_merchant/billing/gateways/net_registry.rb +257 -0
  25. data/lib/active_merchant/billing/gateways/pay_junction.rb +407 -0
  26. data/lib/active_merchant/billing/gateways/payflow.rb +163 -25
  27. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +56 -38
  28. data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +10 -1
  29. data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +9 -0
  30. data/lib/active_merchant/billing/gateways/payflow_express.rb +36 -11
  31. data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +6 -0
  32. data/lib/active_merchant/billing/gateways/payflow_uk.rb +7 -3
  33. data/lib/active_merchant/billing/gateways/payment_express.rb +261 -0
  34. data/lib/active_merchant/billing/gateways/paypal.rb +18 -4
  35. data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +31 -15
  36. data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +8 -0
  37. data/lib/active_merchant/billing/gateways/paypal_express.rb +33 -8
  38. data/lib/active_merchant/billing/gateways/plugnpay.rb +300 -0
  39. data/lib/active_merchant/billing/gateways/protx.rb +285 -0
  40. data/lib/active_merchant/billing/gateways/psigate.rb +13 -12
  41. data/lib/active_merchant/billing/gateways/psl_card.rb +297 -0
  42. data/lib/active_merchant/billing/gateways/quickpay.rb +197 -0
  43. data/lib/active_merchant/billing/gateways/realex.rb +212 -0
  44. data/lib/active_merchant/billing/gateways/secure_pay.rb +31 -0
  45. data/lib/active_merchant/billing/gateways/trans_first.rb +136 -0
  46. data/lib/active_merchant/billing/gateways/trust_commerce.rb +43 -20
  47. data/lib/active_merchant/billing/gateways/usa_epay.rb +6 -5
  48. data/lib/active_merchant/billing/gateways/verifi.rb +235 -0
  49. data/lib/active_merchant/billing/gateways/viaklix.rb +171 -0
  50. data/lib/active_merchant/billing/integrations/gestpay/helper.rb +0 -2
  51. data/lib/active_merchant/billing/integrations/helper.rb +8 -1
  52. data/lib/active_merchant/billing/integrations/nochex.rb +62 -1
  53. data/lib/active_merchant/billing/integrations/nochex/notification.rb +9 -16
  54. data/lib/active_merchant/billing/integrations/notification.rb +1 -1
  55. data/lib/active_merchant/billing/integrations/paypal/helper.rb +59 -46
  56. data/lib/active_merchant/billing/integrations/paypal/notification.rb +14 -47
  57. data/lib/active_merchant/lib/error.rb +4 -0
  58. data/lib/active_merchant/lib/post_data.rb +22 -0
  59. data/lib/active_merchant/lib/posts_data.rb +23 -5
  60. data/lib/active_merchant/lib/requires_parameters.rb +2 -2
  61. data/lib/active_merchant/lib/validateable.rb +1 -1
  62. data/lib/support/gateway_support.rb +45 -0
  63. data/lib/tasks/cia.rb +1 -1
  64. data/script/generate +14 -0
  65. data/script/generator/base.rb +45 -0
  66. data/script/generator/generator.rb +24 -0
  67. data/script/generator/generators/gateway/gateway_generator.rb +14 -0
  68. data/script/generator/generators/gateway/templates/gateway.rb +73 -0
  69. data/script/generator/generators/gateway/templates/gateway_test.rb +41 -0
  70. data/script/generator/generators/gateway/templates/remote_gateway_test.rb +56 -0
  71. data/script/generator/generators/integration/integration_generator.rb +25 -0
  72. data/script/generator/generators/integration/templates/helper.rb +34 -0
  73. data/script/generator/generators/integration/templates/helper_test.rb +54 -0
  74. data/script/generator/generators/integration/templates/integration.rb +18 -0
  75. data/script/generator/generators/integration/templates/module_test.rb +9 -0
  76. data/script/generator/generators/integration/templates/notification.rb +100 -0
  77. data/script/generator/generators/integration/templates/notification_test.rb +41 -0
  78. data/script/generator/manifest.rb +20 -0
  79. data/test/extra/binding_of_caller.rb +80 -0
  80. data/test/extra/breakpoint.rb +547 -0
  81. data/test/fixtures.yml +251 -0
  82. data/test/remote_tests/remote_authorize_net_test.rb +113 -0
  83. data/test/remote_tests/remote_brain_tree_test.rb +78 -0
  84. data/test/remote_tests/remote_card_stream_test.rb +160 -0
  85. data/test/remote_tests/remote_cyber_source_test.rb +130 -0
  86. data/test/remote_tests/remote_data_cash_test.rb +155 -0
  87. data/test/remote_tests/remote_efsnet_test.rb +93 -0
  88. data/test/remote_tests/remote_eway_test.rb +71 -0
  89. data/test/remote_tests/remote_exact_test.rb +59 -0
  90. data/test/remote_tests/remote_gestpay_integration_test.rb +37 -0
  91. data/test/remote_tests/remote_linkpoint_test.rb +144 -0
  92. data/test/remote_tests/remote_moneris_test.rb +110 -0
  93. data/test/remote_tests/remote_net_registry_test.rb +120 -0
  94. data/test/remote_tests/remote_pay_junction_test.rb +162 -0
  95. data/test/remote_tests/remote_payflow_express_test.rb +50 -0
  96. data/test/remote_tests/remote_payflow_test.rb +241 -0
  97. data/test/remote_tests/remote_payflow_uk_test.rb +172 -0
  98. data/test/remote_tests/remote_payment_express_test.rb +136 -0
  99. data/test/remote_tests/remote_paypal_express_test.rb +49 -0
  100. data/test/remote_tests/remote_paypal_integration_test.rb +14 -0
  101. data/test/remote_tests/remote_paypal_test.rb +163 -0
  102. data/test/remote_tests/remote_plugnpay_test.rb +70 -0
  103. data/test/remote_tests/remote_protx_test.rb +184 -0
  104. data/test/remote_tests/remote_psigate_test.rb +87 -0
  105. data/test/remote_tests/remote_psl_card_test.rb +105 -0
  106. data/test/remote_tests/remote_quickpay_test.rb +182 -0
  107. data/test/remote_tests/remote_realex_test.rb +227 -0
  108. data/test/remote_tests/remote_secure_pay_test.rb +36 -0
  109. data/test/remote_tests/remote_trans_first_test.rb +37 -0
  110. data/test/remote_tests/remote_trust_commerce_test.rb +136 -0
  111. data/test/remote_tests/remote_usa_epay_test.rb +57 -0
  112. data/test/remote_tests/remote_verifi_test.rb +107 -0
  113. data/test/remote_tests/remote_viaklix_test.rb +53 -0
  114. data/test/test_helper.rb +132 -0
  115. data/test/unit/base_test.rb +61 -0
  116. data/test/unit/country_code_test.rb +33 -0
  117. data/test/unit/country_test.rb +64 -0
  118. data/test/unit/credit_card_formatting_test.rb +24 -0
  119. data/test/unit/credit_card_methods_test.rb +37 -0
  120. data/test/unit/credit_card_test.rb +365 -0
  121. data/test/unit/gateways/authorize_net_test.rb +140 -0
  122. data/test/unit/gateways/bogus_test.rb +43 -0
  123. data/test/unit/gateways/brain_tree_test.rb +77 -0
  124. data/test/unit/gateways/card_stream_test.rb +37 -0
  125. data/test/unit/gateways/cyber_source_test.rb +151 -0
  126. data/test/unit/gateways/data_cash_test.rb +23 -0
  127. data/test/unit/gateways/efsnet_test.rb +70 -0
  128. data/test/unit/gateways/eway_test.rb +105 -0
  129. data/test/unit/gateways/exact_test.rb +118 -0
  130. data/test/unit/gateways/gateway_test.rb +24 -0
  131. data/test/unit/gateways/linkpoint_test.rb +165 -0
  132. data/test/unit/gateways/moneris_test.rb +167 -0
  133. data/test/unit/gateways/net_registry_test.rb +478 -0
  134. data/test/unit/gateways/pay_junction_test.rb +61 -0
  135. data/test/unit/gateways/payflow_express_test.rb +165 -0
  136. data/test/unit/gateways/payflow_express_uk_test.rb +14 -0
  137. data/test/unit/gateways/payflow_test.rb +230 -0
  138. data/test/unit/gateways/payflow_uk_test.rb +68 -0
  139. data/test/unit/gateways/payment_express_test.rb +215 -0
  140. data/test/unit/gateways/paypal_express_test.rb +222 -0
  141. data/test/unit/gateways/paypal_test.rb +241 -0
  142. data/test/unit/gateways/plugnpay_test.rb +79 -0
  143. data/test/unit/gateways/protx_test.rb +110 -0
  144. data/test/unit/gateways/psigate_test.rb +110 -0
  145. data/test/unit/gateways/psl_card_test.rb +51 -0
  146. data/test/unit/gateways/quickpay_test.rb +125 -0
  147. data/test/unit/gateways/realex_test.rb +150 -0
  148. data/test/unit/gateways/secure_pay_test.rb +78 -0
  149. data/test/unit/gateways/trans_first_test.rb +125 -0
  150. data/test/unit/gateways/trust_commerce_test.rb +57 -0
  151. data/test/unit/gateways/usa_epay_test.rb +117 -0
  152. data/test/unit/gateways/verifi_test.rb +91 -0
  153. data/test/unit/gateways/viaklix_test.rb +72 -0
  154. data/test/unit/integrations/action_view_helper_test.rb +54 -0
  155. data/test/unit/integrations/bogus_module_test.rb +16 -0
  156. data/test/unit/integrations/chronopay_module_test.rb +9 -0
  157. data/test/unit/integrations/gestpay_module_test.rb +10 -0
  158. data/test/unit/integrations/helpers/bogus_helper_test.rb +28 -0
  159. data/test/unit/integrations/helpers/chronopay_helper_test.rb +67 -0
  160. data/test/unit/integrations/helpers/gestpay_helper_test.rb +100 -0
  161. data/test/unit/integrations/helpers/nochex_helper_test.rb +53 -0
  162. data/test/unit/integrations/helpers/paypal_helper_test.rb +162 -0
  163. data/test/unit/integrations/helpers/two_checkout_helper_test.rb +92 -0
  164. data/test/unit/integrations/nochex_module_test.rb +9 -0
  165. data/test/unit/integrations/notifications/chronopay_notification_test.rb +66 -0
  166. data/test/unit/integrations/notifications/gestpay_notification_test.rb +60 -0
  167. data/test/unit/integrations/notifications/nochex_notification_test.rb +51 -0
  168. data/test/unit/integrations/notifications/notification_test.rb +41 -0
  169. data/test/unit/integrations/notifications/paypal_notification_test.rb +85 -0
  170. data/test/unit/integrations/notifications/two_checkout_notification_test.rb +55 -0
  171. data/test/unit/integrations/paypal_module_test.rb +24 -0
  172. data/test/unit/integrations/two_checkout_module_test.rb +9 -0
  173. data/test/unit/post_data_test.rb +55 -0
  174. data/test/unit/response_test.rb +14 -0
  175. data/test/unit/validateable_test.rb +56 -0
  176. metadata +160 -7
  177. metadata.gz.sig +0 -0
  178. data/lib/active_merchant/billing/gateways/payflow/f73e89fd.0 +0 -17
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,5 +1,231 @@
1
1
  # CHANGELOG
2
2
  # ---
3
+ # * Update Linkpoint tests to remove useless pem file [cody]
4
+ #
5
+ # * Use symbols for CreditCard error messages, since errors have indifferent access [cody]
6
+ #
7
+ # * Improve CreditCard error messages [George Ogata]
8
+ #
9
+ # * Change deny to assert_false, and deny_success to assert_failure. Remove Gateway.gateway, as it is available from Base [cody]
10
+ #
11
+ # * Improve documentation, and test coverage [James Herdman]
12
+ #
13
+ # * Refactor MonerisGateway, improve test coverage and documentation [James Herdman]
14
+ #
15
+ # * Add support for crediting to Moneris [James Herdman]
16
+ #
17
+ # * Send state N/A in Payflow when the state is blank. Fixes UK PayPal Express payments when not providing a state [cody]
18
+ #
19
+ # * Load remote test credentials from a fixtures file. ActiveMerchant will look for a custom file ~/.active_merchant/fixtures.yml. If the file exists it will be loaded instead of the default fixtures provided by ActiveMerchant. This makes development easier, and removes the risk of committing non-public test account credentials to subversion. [cody]
20
+ #
21
+ # * Add support for password protected pem files [cody]
22
+ #
23
+ # * Add support for Concord Efsnet payment gateway [snacktime]
24
+ #
25
+ # * Fix dependency loading for gateways that are subclasses [cody]
26
+ #
27
+ # * Add Braintree payment gateway [Michael J. Mangino]
28
+ #
29
+ # * Add support for PayPal API signatures [Benjamin Curtis, cody]
30
+ #
31
+ # * Add payment gateway Viaklix [Sal Scotto, cody]
32
+ #
33
+ # * Add Australian payment gateway NetRegistry [George Ogata]
34
+ #
35
+ # * Take order email from the options hash instead of the address for CyberSource [cody]
36
+ #
37
+ # * Use an array for LineItems when calculating tax in CyberSource gateway [cody]
38
+ #
39
+ # * Add CyberSource gateway [Matt Margolis]
40
+ #
41
+ # * Sanitize Protx order id [cody]
42
+ #
43
+ # * Fix support for electron in Protx [cody]
44
+ #
45
+ # * Add support for Protx [shiftx, cody]
46
+ #
47
+ # * Use undef_method with a single argument in SecurePay to prevent JRuby from choking on it. [jonathan.l.bartlett]
48
+ #
49
+ # * Default address_override to 0 for PayPal Website Payments Standard payments. [cody]
50
+ #
51
+ # * Enhance credit card error messages [manfred]
52
+ #
53
+ # * Use HashWithIndifferentAccess for CreditCard for compatibility with Rails applications [michael.j.mangino]
54
+ #
55
+ # * Fix nil exception when no response reason text is found in Authorize.net [cody]
56
+ #
57
+ # * Add support for PayJunction [Matt Sanders]
58
+ #
59
+ # * Change billing_address to shipping_address in PayPal Integration helper, as billing_address was incorrect. Addresses passed to billing_address for the PayPal helper will no longer be added to the form. This will break existing code, as the address will not be passed.
60
+ #
61
+ # * Remove switch patterns from card detection that were eliminated on July 1, 2007 [cody]
62
+ #
63
+ # * Format the issue number in Payflow requests to always be 2 digits [cody]
64
+ #
65
+ # * Move application_id to Gateway and Helper class respectively [cody]
66
+ #
67
+ # * Improve TrustCommerce documentation [cody]
68
+ #
69
+ # * Add credit to Payflow [cody]
70
+ #
71
+ # * Add support for the Plug 'N Pay gateway [ryan.norbauer, cody]
72
+ #
73
+ # * Add support for ItemTotal, Shipping, Handling, and Tax amounts in the PayPal Express and PayPal gateways [baldwindavid, cody]
74
+ #
75
+ # * Add page customization options to the PaypalExpress, and PayflowExpress gateways [ cpjolicoeur, cody]
76
+ #
77
+ # * Add Verifi gateway [Paul Hepworth]
78
+ #
79
+ # * Add a PayflowResponse object with a profile_id accessor method. Return the correct authorization number on recurring actions [cody]
80
+ #
81
+ # * Add support for an initial transaction with recurring payments [findchris, cody]
82
+ #
83
+ # * Add support for email receipts to recurring Payflow Payments [Rick Olson]
84
+ #
85
+ # * Ensure the ButtonSource isn't too long [cody]
86
+ #
87
+ # * Add ButtonSource to Paypal and PaypalExpress gateways [cody]
88
+ #
89
+ # * Rename application to application_id and place it on Base, so it can be set once and forgotten about [cody]
90
+ #
91
+ # * Add ButtonSource field to PayflowExpress gateway [cody]
92
+ #
93
+ # * Add a field for the bn to the PayPal helper [cody]
94
+ #
95
+ # * Add remote secure pay test and correctly define test? [cody]
96
+ #
97
+ # * Undefine unsupported methods from SecurePay [cody]
98
+ #
99
+ # * Enhance the TransFirst error message for declined transactions [cody]
100
+ #
101
+ # * Add initial support for TransFirst gateway [cody]
102
+ #
103
+ # * Deprecate certification_id in Payflow gateways [cody]
104
+ #
105
+ # * Work around required PayPal state fields for countries that don't require states [cody]
106
+ #
107
+ # * Add metadata to SecurePay gateway [cody]
108
+ #
109
+ # * Add initial support for the SecurePay gateway using the Authorize.net translator [cody]
110
+ #
111
+ # * Add the homepage_url and display_name accessors to each gateway [cody]
112
+ #
113
+ # * Remove Money dependency from main gateways. Cleanup tests. Add supported_countries class accessor which returns an array of 2 digit iso country codes for which countries the gateway supports accounts in [cody]
114
+ #
115
+ # * Add American Express card to Psigate [cody]
116
+ #
117
+ # * Send N/A to PayPal in the PayPal Helper when we don't know the UK county [cody]
118
+ #
119
+ # * Actually pass the amount of the capture through to Payflow [cody]
120
+ #
121
+ # * Update ExactGateway test and test mode [cody]
122
+ #
123
+ # * Remove unused method in PslCardGateway [cody]
124
+ #
125
+ # * Add updated credit card tests [cody]
126
+ #
127
+ # * Update and test PslCardGateway [cody]
128
+ #
129
+ # * Add Laser card type [cody]
130
+ #
131
+ # * Update Nochex documentation [cody]
132
+ #
133
+ # * Sanitize the Realex order_id [cody]
134
+ #
135
+ # * Add support for Irish Realex payment gateway [John Ward, cody]
136
+ #
137
+ # * Move credit_card helper method to the test_helper [cody]
138
+ #
139
+ # * Update PayflowExpressResponse to match the interface of the PayflowExpressResponse. Add :no_shipping and :address_override options to PayflowExpress [cody]
140
+ #
141
+ # * Add a currency option to the Payflow and Paypal gateways [cody]
142
+ #
143
+ # * PaypalExpress should use the shipping address, not the billing address [cody]
144
+ #
145
+ # * Allow overriding the user with Payflow so that a vendor and user can be provided when making requests [cody]
146
+ #
147
+ # * PayPal DirectPayment API requires a UK County to be sent as the state or province. Return N/A as the state when one isn't provided to ensure that PayPal doesn't reject the payment [cody]
148
+ #
149
+ # * Add ability to perform reference transactions with Payflow [Al Evans, cody]
150
+ #
151
+ # * Enhance recurring Payflow tests and recurring_inquiry [Al Evans]
152
+ #
153
+ # * Add recurring payments to Payflow [Rick Olson]
154
+ #
155
+ # * Improve the error message generated by requires! [cody]
156
+ #
157
+ # * Update credit card regular expressions and update Quickpay gateway with tests for new cards [cody]
158
+ #
159
+ # * Add support for token based payments to PaymentExpress [Nik Wakelin]
160
+ #
161
+ # * Refactor default_currency to the base gateway class [cody]
162
+ #
163
+ # * Clean unsupported characters from the Quickpay ordernum [cody]
164
+ #
165
+ # * Call the :sale and :authorization in QuickpayGateway [cody]
166
+ #
167
+ # * Add Danish gateway Quickpay [cody]
168
+ #
169
+ # * Remove redundant hash brackets from generator template [cody]
170
+ #
171
+ # * Add additional options to the PayPal Website Payments Standard Helper [Rick Olson]
172
+ #
173
+ # * Move generate_unique_id method to Gateway class so other gateways can also use it [cody]
174
+ #
175
+ # * Allow notification name / value pairs to have a . in the name like checkout.x = 400 [cody]
176
+ #
177
+ # * Fix PaypalExpressGateway#purchase to have the same method signature as other gateways [cody]
178
+ #
179
+ # * Cargo cult off the rails unique id generator instead of UUID library [cody]
180
+ #
181
+ # * Add uuid-1.0.3 for generating random request UUIDs [cody]
182
+ #
183
+ # * Remove mock_methods and http mock from the library [cody]
184
+ #
185
+ # * PaypalExpress cannot setup a payment for 0 dollars. If the amount is zero then setup a payment for $1. [cody]
186
+ #
187
+ # * Small changes to PslCard gateway [cody]
188
+ #
189
+ # * Fix Money dependency with PslCard gateway [cody]
190
+ #
191
+ # * Add PslCard payment gateway [MoneySpyder http://moneyspyder.co.uk]
192
+ #
193
+ # * Scrub the card number, expiry, and CVV code from the response [cody]
194
+ #
195
+ # * Use test? query for checking test mode [cody]
196
+ #
197
+ # * Add support for the E-xact Payment Gateway [James Edward Gray II, cody]
198
+ #
199
+ # * Fix partially broken method of dealing with phone numbers in the PayPal Helper [cody]
200
+ #
201
+ # * Update remote tests for PaymentExpress [cody]
202
+ #
203
+ # * Add Content-Type header to PaymentExpress post [cody]
204
+ #
205
+ # * Use DECLINED as the message for declined transactions in the PaymentExpress remote tests [cody]
206
+ #
207
+ # * Add JCB as a supported card type for the PaymentExpressGateway [cody]
208
+ #
209
+ # * Rename DpsGateway to PaymentExpressGateway [cody]
210
+ #
211
+ # * Add DPS Payment Express gateway (NZ) [dgjones, cody]
212
+ #
213
+ # * Remove duplicate and incorrect expdate method from Authorize.net [cody]
214
+ #
215
+ # * Allow authorization and purchase using a billing_id retrieved from TrustCommerce citadel [jesse.c.scott]
216
+ #
217
+ # * Don't return a frozen string from CreditCard.type? [cody]
218
+ #
219
+ # * Update remote Psigate test to ensure using a verification value doesn't break anything [cody]
220
+ #
221
+ # * Update remote Moneris test to ensure using a verification value doesn't break anything [cody]
222
+ #
223
+ # * Fix Solo issue number with CardStream gateway and improve test coverage [cody]
224
+ #
225
+ # * Add CardStream gateway [Jonah Fox, Thomas Nichols, cody]
226
+ #
227
+ # * Verify Peer in PayPal notifications and add account method [cody]
228
+ #
3
229
  # * Mark 1.1.0 release
4
230
  #
5
231
  # * Add unique_id option to PayPal mass payments [Haig]
data/CONTRIBUTERS ADDED
@@ -0,0 +1,52 @@
1
+ Protx Gateway
2
+
3
+ * Contributed by shiftx (Vincent)
4
+
5
+ Verifi Gateway
6
+
7
+ * Contributed by Paul Hepworth on 2007-05-12.
8
+ * Portions of Verifi Gateway Copyright (c) 2007 Paul Hepworth
9
+
10
+ Plug 'N Pay Gateway
11
+
12
+ * Contributed by Ryan Norbauer
13
+
14
+ PayJunction Gateway
15
+
16
+ * Contributed by Matt Sanders
17
+
18
+ E-xact Gateway
19
+
20
+ * Contributed by James Edward Gray II
21
+
22
+ Linkpoint Gateway
23
+
24
+ * Portions of the LinkPoint Gateway by Ryan Heneise
25
+
26
+ eWay Gateway
27
+
28
+ * Originally contributed by Lucas Carlson (mailto:lucas@rufy.com)
29
+
30
+ CardStream Gateway
31
+
32
+ * Portions of the Cardstream gateway by Jonah Fox and Thomas Nichols
33
+
34
+ CyberSource Gateway
35
+
36
+ * Contributed by Matt Margolis (matt@mattmargolis.net)
37
+
38
+ NetRegistry Gateway
39
+
40
+ * Originally contributed by George Ogata (mailto: george.ogata@gmail.com)
41
+
42
+ Viaklix Gateway (Sep 3, 2007)
43
+
44
+ * Originally contributed by Sal Scotto
45
+
46
+ Braintree Gateway (Sep 4, 2007)
47
+
48
+ * Originally contributed by Michael J. Mangino
49
+
50
+ Concord Efsnet Gateway (Sep 7, 2007)
51
+
52
+ * Originally contributed by snacktime
data/README CHANGED
@@ -8,30 +8,38 @@ This library is the foundation of commerce for http://www.shopify.com.
8
8
  Please visit the {ActiveMerchant homepage}[http://activemerchant.org] for more resources, tutorials and other information about this project.
9
9
 
10
10
  == Supported Direct Payment Gateways
11
-
12
- * Bogus -- your trusty test gateway which does nothing. Great for testing your app!
13
-
14
- ==== Australia
15
-
16
- * eWay[http://www.eway.com.au]
17
-
18
- ==== Canada
19
-
20
- * Moneris[http://www.moneris.com]
21
- * Psigate[http://www.psigate.com]
22
-
23
- ==== United Kingdom
24
-
25
- * {PayPal Website Payments Pro UK}[https://www.paypal.com/uk/cgi-bin/webscr?cmd=_wp-pro-overview-outside]
26
-
27
- ==== USA
28
11
 
29
- * Authorize.net[http://www.authorize.net]
30
- * LinkPoint[http://www.linkpoint.com]
31
- * {PayPal Payflow Pro}[https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-gateway-overview-outside]
32
- * {PayPal Website Payments Pro US}[https://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside]
33
- * TrustCommerce[http://www.trustcommerce.com] - Requires the tclink ruby library from http://www.trustcommerce.com/tclink.html. Otherwise it will not be loaded.
34
- * {USA ePay}[www.usaepay.com/]
12
+ * {Authorize.net}[http://www.authorize.net/] - US
13
+ * {Braintree}[http://www.braintreepaymentsolutions.com] - US
14
+ * {CardStream}[http://www.cardstream.com/] - GB
15
+ * {CyberSource}[http://www.cybersource.com] - US
16
+ * {DataCash}[http://www.datacash.com/] - GB
17
+ * {Efsnet}[http://www.concordefsnet.com/] - US
18
+ * {eWAY}[http://www.eway.com.au/] - AU
19
+ * {E-xact}[http://www.e-xact.com] - CA, US
20
+ * {LinkPoint}[http://www.linkpoint.com/] - US
21
+ * {Moneris}[http://www.moneris.com/] - CA
22
+ * {NetRegistry}[http://www.netregistry.com.au] - AU
23
+ * {PayJunction}[http://www.payjunction.com/] - US
24
+ * {PayPal Express Checkout}[https://www.paypal.com/cgi-bin/webscr?cmd=xpt/merchant/ExpressCheckoutIntro-outside] - US, CA, SG, AU
25
+ * {PayPal Express Checkout (UK)}[https://www.paypal.com/uk/cgi-bin/webscr?cmd=_additional-payment-overview-outside] - GB
26
+ * {PayPal Payflow Pro}[https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-pro-overview-outside] - US, CA, SG, AU
27
+ * {PayPal Website Payments Pro (UK)}[https://www.paypal.com/uk/cgi-bin/webscr?cmd=_wp-pro-overview-outside] - GB
28
+ * {PaymentExpress}[http://www.paymentexpress.com/] - AU, MY, NZ, SG, ZA, GB, US
29
+ * {PayPal Express Checkout}[https://www.paypal.com/cgi-bin/webscr?cmd=xpt/merchant/ExpressCheckoutIntro-outside] - US
30
+ * {PayPal Website Payments Pro (US)}[https://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside] - US
31
+ * {Plug'n Pay}[http://www.plugnpay.com/] - US
32
+ * {Protx}[http://www.protx.com] - GB
33
+ * {Psigate}[http://www.psigate.com/] - CA
34
+ * {PSL Payment Solutions}[http://www.paymentsolutionsltd.com/] - GB
35
+ * {Quickpay}[http://quickpay.dk/] - DK
36
+ * {Realex}[http://www.realexpayments.com/] - IE, GB
37
+ * {SecurePay}[http://www.securepay.com/] - US
38
+ * {TransFirst}[http://www.transfirst.com/] - US
39
+ * {TrustCommerce}[http://www.trustcommerce.com/] - US
40
+ * {USA ePay}[http://www.usa_epay.com/] - US
41
+ * {Verifi}[http://www.verifi.com/] - US
42
+ * {ViaKLIX}[http://viaklix.com] - US
35
43
 
36
44
  == Supported Offsite Payment Gateways
37
45
 
@@ -39,6 +47,7 @@ Please visit the {ActiveMerchant homepage}[http://activemerchant.org] for more r
39
47
  * Chronopay[http://www.chronopay.com]
40
48
  * Nochex[http://www.nochex.com]
41
49
  * {Banca Sella GestPay}[https://www.sella.it/banca/ecommerce/gestpay/gestpay.jsp]
50
+ * {2 Checkout}[http://www.2checkout.com]
42
51
 
43
52
  == Download
44
53
 
@@ -68,7 +77,8 @@ Installation from RubyGems
68
77
 
69
78
  == Sample Usage
70
79
 
71
- ten_dollars = Money.new(1000, 'USD')
80
+ # 10 dollars in cents
81
+ ten_dollars = 1000
72
82
 
73
83
  credit_card = CreditCard.new(
74
84
  :number => '4242424242424242',
data/Rakefile ADDED
@@ -0,0 +1,152 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+ require 'rake/rdoctask'
5
+ require 'rake/gempackagetask'
6
+ require 'rake/contrib/rubyforgepublisher'
7
+ require File.dirname(__FILE__) + '/lib/tasks/cia'
8
+ require File.dirname(__FILE__) + '/lib/support/gateway_support'
9
+
10
+
11
+ PKG_VERSION = "1.2.0"
12
+ PKG_NAME = "activemerchant"
13
+ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
14
+
15
+ PKG_FILES = FileList[
16
+ "lib/**/*", "test/**/*", "script/**/*", "[a-zA-Z]*"
17
+ ].exclude(/\.svn$/)
18
+
19
+
20
+ desc "Default Task"
21
+ task :default => 'test:units'
22
+
23
+ # Run the unit tests
24
+ namespace :test do
25
+
26
+ Rake::TestTask.new(:units) do |t|
27
+ t.pattern = 'test/unit/**/*_test.rb'
28
+ t.ruby_opts << '-rubygems'
29
+ t.verbose = true
30
+ end
31
+
32
+ Rake::TestTask.new(:remote) do |t|
33
+ t.pattern = 'test/remote_tests/*_test.rb'
34
+ t.ruby_opts << '-rubygems'
35
+ t.verbose = true
36
+ end
37
+
38
+ end
39
+
40
+ # Genereate the RDoc documentation
41
+ Rake::RDocTask.new do |rdoc|
42
+ rdoc.rdoc_dir = 'doc'
43
+ rdoc.title = "ActiveMerchant library"
44
+ rdoc.options << '--line-numbers' << '--inline-source' << '--main=README'
45
+ rdoc.rdoc_files.include('README', 'CHANGELOG')
46
+ rdoc.rdoc_files.include('lib/**/*.rb')
47
+ rdoc.rdoc_files.exclude('lib/tasks')
48
+ end
49
+
50
+ task :install => [:package] do
51
+ `gem install pkg/#{PKG_FILE_NAME}.gem`
52
+ end
53
+
54
+ task :lines do
55
+ lines = 0
56
+ codelines = 0
57
+ Dir.foreach("lib") { |file_name|
58
+ next unless file_name =~ /.*rb/
59
+
60
+ f = File.open("lib/" + file_name)
61
+
62
+ while line = f.gets
63
+ lines += 1
64
+ next if line =~ /^\s*$/
65
+ next if line =~ /^\s*#/
66
+ codelines += 1
67
+ end
68
+ }
69
+ puts "Lines #{lines}, LOC #{codelines}"
70
+ end
71
+
72
+ desc "Delete tar.gz / zip / rdoc"
73
+ task :cleanup => [ :clobber_package, :clobber_rdoc ]
74
+
75
+ spec = Gem::Specification.new do |s|
76
+ s.name = PKG_NAME
77
+ s.version = PKG_VERSION
78
+ s.summary = "Framework and tools for dealing with credit card transactions."
79
+ s.has_rdoc = true
80
+
81
+ s.files = PKG_FILES
82
+
83
+ s.require_path = 'lib'
84
+ s.autorequire = 'active_merchant'
85
+ s.author = "Tobias Luetke"
86
+ s.email = "tobi@leetsoft.com"
87
+ s.homepage = "http://activemerchant.org/"
88
+
89
+ s.add_dependency('activesupport', '>= 1.4.1')
90
+ s.add_dependency('builder', '>= 2.0.0')
91
+
92
+ s.signing_key = ENV['GEM_PRIVATE_KEY']
93
+ s.cert_chain = ['gem-public_cert.pem']
94
+ end
95
+
96
+ Rake::GemPackageTask.new(spec) do |p|
97
+ p.gem_spec = spec
98
+ p.need_tar = true
99
+ p.need_zip = true
100
+ end
101
+
102
+ desc "Continuously watch unit tests"
103
+ task :watch do
104
+ system("clear")
105
+ system("stakeout \"rake\" `find . -name '*.rb'`")
106
+ end
107
+
108
+ desc "Release the gems and docs to RubyForge"
109
+ task :release => [ :publish, :upload_rdoc ]
110
+
111
+ desc "Publish the release files to RubyForge."
112
+ task :publish => [ :package ] do
113
+ require 'rubyforge'
114
+
115
+ packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
116
+
117
+ rubyforge = RubyForge.new
118
+ rubyforge.login
119
+ rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
120
+ end
121
+
122
+ desc 'Upload RDoc to RubyForge'
123
+ task :upload_rdoc => :rdoc do
124
+ user = ENV['RUBYFORGE_USER']
125
+ project = "/var/www/gforge-projects/#{PKG_NAME}"
126
+ local_dir = 'doc'
127
+ pub = Rake::SshDirPublisher.new user, project, local_dir
128
+ pub.upload
129
+ end
130
+
131
+ namespace :gateways do
132
+ desc 'Print the currently supported gateways in RDoc format'
133
+ task :print_support_rdoc do
134
+ support = GatewaySupport.new
135
+ support.to_rdoc
136
+ end
137
+
138
+ desc 'Print the currently supported gateways'
139
+ task :print_support do
140
+ support = GatewaySupport.new
141
+ support.to_s
142
+ end
143
+
144
+ desc 'Print the currently supported gateways'
145
+ task :print_support_textile do
146
+ support = GatewaySupport.new
147
+ support.to_textile
148
+ end
149
+ end
150
+
151
+
152
+