activemerchant 1.119.0 → 1.124.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +216 -1
  3. data/README.md +4 -2
  4. data/lib/active_merchant/billing/check.rb +19 -12
  5. data/lib/active_merchant/billing/credit_card.rb +3 -0
  6. data/lib/active_merchant/billing/credit_card_formatting.rb +1 -0
  7. data/lib/active_merchant/billing/credit_card_methods.rb +32 -14
  8. data/lib/active_merchant/billing/gateways/adyen.rb +94 -25
  9. data/lib/active_merchant/billing/gateways/authorize_net.rb +19 -11
  10. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -0
  11. data/lib/active_merchant/billing/gateways/blue_pay.rb +29 -0
  12. data/lib/active_merchant/billing/gateways/blue_snap.rb +2 -2
  13. data/lib/active_merchant/billing/gateways/braintree_blue.rb +52 -8
  14. data/lib/active_merchant/billing/gateways/card_stream.rb +17 -13
  15. data/lib/active_merchant/billing/gateways/cashnet.rb +7 -2
  16. data/lib/active_merchant/billing/gateways/checkout_v2.rb +31 -0
  17. data/lib/active_merchant/billing/gateways/credorax.rb +15 -9
  18. data/lib/active_merchant/billing/gateways/cyber_source.rb +53 -6
  19. data/lib/active_merchant/billing/gateways/d_local.rb +9 -2
  20. data/lib/active_merchant/billing/gateways/decidir.rb +7 -1
  21. data/lib/active_merchant/billing/gateways/elavon.rb +70 -28
  22. data/lib/active_merchant/billing/gateways/element.rb +2 -0
  23. data/lib/active_merchant/billing/gateways/forte.rb +12 -0
  24. data/lib/active_merchant/billing/gateways/global_collect.rb +24 -10
  25. data/lib/active_merchant/billing/gateways/hps.rb +55 -1
  26. data/lib/active_merchant/billing/gateways/kushki.rb +23 -0
  27. data/lib/active_merchant/billing/gateways/litle.rb +1 -1
  28. data/lib/active_merchant/billing/gateways/mercado_pago.rb +5 -4
  29. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +2 -0
  30. data/lib/active_merchant/billing/gateways/mit.rb +260 -0
  31. data/lib/active_merchant/billing/gateways/moka.rb +290 -0
  32. data/lib/active_merchant/billing/gateways/monei.rb +228 -144
  33. data/lib/active_merchant/billing/gateways/mundipagg.rb +14 -5
  34. data/lib/active_merchant/billing/gateways/netbanx.rb +26 -2
  35. data/lib/active_merchant/billing/gateways/nmi.rb +27 -9
  36. data/lib/active_merchant/billing/gateways/orbital.rb +99 -59
  37. data/lib/active_merchant/billing/gateways/pay_arc.rb +392 -0
  38. data/lib/active_merchant/billing/gateways/pay_conex.rb +3 -1
  39. data/lib/active_merchant/billing/gateways/pay_trace.rb +404 -0
  40. data/lib/active_merchant/billing/gateways/payeezy.rb +34 -6
  41. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -0
  42. data/lib/active_merchant/billing/gateways/payflow.rb +21 -4
  43. data/lib/active_merchant/billing/gateways/payment_express.rb +5 -5
  44. data/lib/active_merchant/billing/gateways/paymentez.rb +5 -0
  45. data/lib/active_merchant/billing/gateways/paypal_express.rb +1 -0
  46. data/lib/active_merchant/billing/gateways/paysafe.rb +376 -0
  47. data/lib/active_merchant/billing/gateways/payu_latam.rb +3 -3
  48. data/lib/active_merchant/billing/gateways/payway_dot_com.rb +253 -0
  49. data/lib/active_merchant/billing/gateways/qvalent.rb +23 -9
  50. data/lib/active_merchant/billing/gateways/realex.rb +18 -0
  51. data/lib/active_merchant/billing/gateways/redsys.rb +42 -24
  52. data/lib/active_merchant/billing/gateways/safe_charge.rb +25 -13
  53. data/lib/active_merchant/billing/gateways/spreedly_core.rb +13 -4
  54. data/lib/active_merchant/billing/gateways/stripe.rb +18 -8
  55. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +126 -48
  56. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +2 -1
  57. data/lib/active_merchant/billing/gateways/trust_commerce.rb +2 -1
  58. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +1 -1
  59. data/lib/active_merchant/billing/gateways/vpos.rb +220 -0
  60. data/lib/active_merchant/billing/gateways/worldpay.rb +78 -18
  61. data/lib/active_merchant/billing/response.rb +4 -0
  62. data/lib/active_merchant/billing/three_d_secure_eci_mapper.rb +27 -0
  63. data/lib/active_merchant/billing.rb +1 -0
  64. data/lib/active_merchant/version.rb +1 -1
  65. data/lib/certs/cacert.pem +1582 -2431
  66. metadata +11 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93f6306f4daee82e8458586cf10ba23a4b1cfa085c912430821bf583c789aded
4
- data.tar.gz: a943a31836368d69faf7c731dbc4c81d8b1a302b0fddd5cb4960c6714a88f11a
3
+ metadata.gz: 6af1ccdc1542e628e6825023b1d26d67177e6630e08b6b07896772bcf2ddde7b
4
+ data.tar.gz: ebeb390672f779ee8e660f5bac6baab8423fab0e4d8fb89d2ef626f5f5086c6f
5
5
  SHA512:
6
- metadata.gz: cb33c86a0b9f3be8186a69fe170656684a98f74dcd9597df7f70792e23050235a9774c4192f25a1700110315dd6a98afa4ef0c3b74e8ea495814146594c2746a
7
- data.tar.gz: 68729586be8247575dd96b6351db94f5b726338b92229cb49ddb82d6652ed93300049dd1edc18929a01850ec161cbe7574b0ceda0f1f233941019b7dfbca74f4
6
+ metadata.gz: a64e4885c13f8b95907d15058b6644b03f2baff32a5df8e54ea1d5ee968df7f50455f7dcab3cd07d5acacd7e940504bc728dfa9b39874b9f57ba7d9011617e38
7
+ data.tar.gz: dd867effc34ba7939ac9dbacfa5583ea199dd3eb1387e34c57101a5b9ef282d2562fe4b564109db6c5157fca5cc25c0981deec960a06c64d66ab3861f0d5df9d
data/CHANGELOG CHANGED
@@ -2,11 +2,225 @@
2
2
 
3
3
  == HEAD
4
4
 
5
+ == Version 1.124.0 (October 28th, 2021)
6
+ * Worldpay: Add Support for Submerchant Data on Worldpay [almalee24] #4147
7
+ * dlocal: Add device_id and ip to payer object and add additional_data [aenand] #4116
8
+ * Adyen: Add network tokenization support to Adyen gateway [mymir] #4101
9
+ * Adyen: Add ACH Support [almalee24] #4105
10
+ * Moka: Support 3DS endpoint and update test url [dsmcclain] #4110
11
+ * Paysafe: Adjust profile data [meagabeth] #4112
12
+ * Stripe Payment Intents: Add support for claim_without_transaction_id field [BritneyS] #4111
13
+ * Mit: Add New Gateway [EsporaInfra] #3820
14
+ * Routex: add card type [rachelkirk] #4115
15
+ * Orbital: Scrub Payment Cryptogram [naashton] #4121
16
+ * Paysafe: Add support for airline fields [meagabeth] #4120
17
+ * Stripe and Stripe PI: Add Radar Session Option [tatsianaclifton] #4119
18
+ * PayArc: Fix billing address nil and phone_number issues [dsmcclain] #4114
19
+ * Routex: Update BIN numbers [rachelkirk] #4123
20
+ * UnionPay: Add Stripe's UnionPay test card to UnionPay BIN range #4122
21
+ * GlobalCollect: Support URL override [naashton] #4127
22
+ * PayConex: scrub bank account info from transcripts [mbreenlyles] #4128
23
+ * Moka: Remove additional transaction data from subsequent calls [naashton] #4129
24
+ * Moka: Ensure CvcNumber can be an empty string [jessiagee] #4130
25
+ * Maestro: Allow more card lengths for Luhnless bins [therufs] #4131
26
+ * Paysafe: Update supported countries [meagabeth] #4135
27
+ * Paysafe: Update field mapping for split_pay [meagabeth] #4136
28
+ * SafeCharge: Add handling for non-fractional currencies [dsmcclain] #4137
29
+ * CardStream: Support passing country_code in request [dsmcclain] #4139
30
+ * Adyen: Adjust phone number mapping [aenand] #4138
31
+ * Mit: Change how parameters are converted to JSON [tatsianaclifton] #4140
32
+ * Stripe: Add account_number to scrubbing [aenand] #4145
33
+ * Stripe PI: add name on card to billing_details [dsmcclain] #4146
34
+ * TrustCommerce: Scrub bank account info [mbreenlyles] #4149
35
+ * TransFirst: Scrub account number [aenand] #4152
36
+ * Paysafe: Update supported countries list [meagabeth] #4154
37
+ * dLocal: Update supported countries list [mbreenlyles] #4155
38
+ * SafeCharge: Add support for email field in capture [rachelkirk] #4153
39
+ * Paysafe: Remove invalid code [meagabeth] #4156
40
+ * NMI: Add descriptor fields [ajawadmirza] #4157
41
+ * Authorize.net: Add tests for scrubbing banking account info (in addition to BluePay, BridgePay, Forte, HPS, and Vanco Gateways)[aenand] #4159
42
+ * Moka: Send refund amount with decimal [dsmcclain] #4160
43
+ * GlobalCollect: Append URI to the URL [naashton] #4162
44
+ * Adyen: Add application info fields [aenand] #4163
45
+ * Adyen: Send NTID from stored cred hash [curiousepic] #4164
46
+ * Payflow: use proper case for 3DS 2.x element names [bbraschi] #4113
47
+ * Realex: Add support for stored credentials [dsmcclain] #4170
48
+ * Moka: Add support for InstallmentNumber field [dsmcclain] #4172
49
+ * Payflow: include AuthenticationStatus for 3DS 2.x [bbraschi] #4168
50
+
51
+ == Version 1.123.0 (September 10th, 2021)
52
+ * Paysafe: Add gateway integration [meagabeth] #4085
53
+ * Elavon: Support recurring transactions with stored credentials [cdmackeyfree] #4086
54
+ * Orbital: Truncate three_d_secure[:version] [carrigan] #4087
55
+ * Credorax: Determine ISK decimal by datetime [curiousepic] #4088
56
+ * Moka: support new gateway type [dsmcclain] #4089
57
+ * Paymentez: Add more_info field [reblevins] #4091
58
+ * Worldpay: Support $0 auth [therufs] #4092
59
+ * Elavon: Support recurring transactions with token, revert stored credentials recurring [cdmackeyfree] #4089
60
+ * SafeCharge(Nuvei): Add support for product_id [rachelkirk] #4095
61
+ * NMI: Change cardholder_auth 3DS field population [carrigan] #4094
62
+ * Synchrony: add card type [therufs] #4096
63
+ * Maestro: support BINs without Luhn check [therufs] #4097
64
+ * Maestro: support BINs [therufs] #4098
65
+ * Redsys: Route MIT Exemptions to webservice endpoint [curiousepic] #4081
66
+ * Adyen: Update Classic Integration API to v64 and Recurring API to v49 [almalee24] #4090
67
+ * Payeezy: support soft_descriptor and merchant_ref [cdmackeyfree] #4099
68
+ * Elavon: add ssl_token field [cdmackeyfree] #4100
69
+ * Credorax: Remove special logic for ISK [curiousepic] #4102
70
+ * UnionPay: Pull UnionPay's 62* BIN ranges out of Discover's #4103
71
+ * Monei: Update Creation of Billing Details [tatsianaclifton] #4107
72
+ * Monei: Typo Correction on Billing Details [tatsianaclifton] #4108
73
+ * Paysafe: Add support for 3DS [meagabeth] #4109
74
+
75
+ == Version 1.122.0 (August 3rd, 2021)
76
+ * Orbital: Correct success logic for refund [tatsianaclifton] #4014
77
+ * usaepay: Added pin gateway setting [DustinHaefele] #4026
78
+ * MercadoPago: Added external_reference, more payer object options, and metadata field [DustinHaefele] #4020
79
+ * Element: Add duplicate_override_flag [almalee24] #4012
80
+ * PayTrace: Support gateway [meagabeth] #3985
81
+ * vPOS: Support credit + refund [therufs] #3998
82
+ * PayArc: Support gateway [senthil-code] #3974
83
+ * NMI: Support cardholder_auth field for 3DS2 [cdmackeyfree] #4002
84
+ * Confiable: Support cardtype [therufs] #4004
85
+ * Maestro: Add BIN [therufs] #4003
86
+ * PayULatam: Ensure phone number is pulled from shipping_address correctly [dsmcclain] #4005
87
+ * SafeCharge: Add challenge_preference for 3DS [klaiv] #3999
88
+ * Adyen: Pass networkTxReference in all transactions [naashton] #4006
89
+ * Adyen: Ensure correct transaction reference is selected [dsmcclain] #4007
90
+ * PayTrace: Support level_3_data fields [meagabeth] #4008
91
+ * BluePay: Add support for Stored Credentials [dsmcclain] #4009
92
+ * Orbital: Add support for SCARecurringPayment [jessiagee] #4010
93
+ * Braintree: Support recurring_first and moto reasons [curiousepic] #4013
94
+ * PayTrace: Adjust capture method [meagabeth] #4015
95
+ * BarclaysEpdqExtraPlus: updated custom_eci test + remote tests [yyapuncich] #4022
96
+ * CyberSource: Add customerID field [deemeyers] #4025
97
+ * CyberSource: Adjust Auth [naashton] #3956
98
+ * Valid Canadian Institution Numbers [naashton] #4024
99
+ * PayTrace: Adjust purchase and capture methods to handle MultiResponse scenarios [meagabeth] #4027
100
+ * Payflow: Add support for MERCHDESCR field [rachelkirk] #4028
101
+ * PayTrace: Support $0 authorize in verify method [meagabeth] #4030
102
+ * PayArc: Add error_code in response [cdm-83] #4021
103
+ * Update bank routing account validation check [jessiagee] #4029
104
+ * Kushki: Add 'contactDetails' fields [mbreenlyles] #4033
105
+ * Adyen: Truncating order_id and remote test [yyapuncich] #4036
106
+ * CyberSource: Allow string content for Ignore AVS/CVV flags [curiousepic] #4043
107
+ * Decidir: Update validation error message handling [arbianchi] #4042
108
+ * Authorize.net: Remove cardholderAuthentication for non-3DS transactions [BritneyS] #4045
109
+ * BlueSnap: Handle 429 errors [britth] #4044
110
+ * Orbital: Update unit test files [meagabeth] #4046
111
+ * Orbital: Strip null characters from responses [britth] #4041
112
+ * Merchant Warrior: Handle invalid XML responses [arbianchi] #4047
113
+ * Braintree: Fix NoMethodError for failed card verification [molbrown] #4048
114
+ * Worldpay: Accepting 3DS1 and 3DS2 authentication data from external MPI [chandan-PS] #4017
115
+ * PayArc: Currency and parameters updates [jessiagee] #4051
116
+ * Elavon: Add support for special characters [mbreenlyles] #4049
117
+ * PayArc: Formatting CC month, adding tax_rate, removing default void reason [jessiagee] #4053
118
+ * Kushki: Add support for fullResponse field [rachelkirk] #4057
119
+ * Element: Add support for `MerchantDescriptor` field [BritneyS] #4058
120
+ * PayArc: Added email and phone to credit and charge [jessiagee] #4056
121
+ * Mundipagg: Added support for 'authentication_secret_key' for 'api_key' overwrite [DustinHaefele] #4059
122
+ * Payflow: Raise an error if store method is called [dsmcclain] #4066
123
+ * Monei: JSON API implementation [jimmyn] #3613
124
+ * Maestro: Update BINs [therufs] #4067
125
+ * Monei: Change domain to monei.com [jimmyn] #4068
126
+ * Spreedly: Support gateway_specific_response_fields in response params [abarrak] #4064
127
+ * Payeezy: Add support for `add_soft_descriptors` [rachelkirk] #4069
128
+ * Stripe Payment Intents: Add support for network_transaction_id field [cdmackeyfree] #4060
129
+ * Worldpay: Support 'CAPTURED' response for authorize transactions [naashton] #4070
130
+ * Ingenico (Global Collect): New idempotence key header [BritneyS] #4073
131
+ * PayTrace: Adjust handling of line_items subfields [meagabeth] #4074
132
+ * Worldpay: Correct Expiration Year Format [tatsianaclifton] #4076
133
+ * Monei: Improve Scrub Regex [tatsianaclifton] #4072
134
+ * Payflow: add THREEDSVERSION and DSTRANSACTIONID when present [bbraschi] #4075
135
+ * CT Payments: update remote tests [cdmackeyfree] #3947
136
+ * Orbital: Ensure full e-check scrubbing [mbreenlyles] #4079
137
+
138
+ == Version 1.121 (June 8th, 2021)
139
+ * Braintree: Lift restriction on gem version to allow for backwards compatibility [naashton] #3993
140
+ * Payment Express/Windcave: Send amount on verify calls [cdmackeyfree] #3995
141
+ * Orbital: Use billing_address name as fallback [curiousepic] #3966
142
+ * vPOS: handle shop_process_id correctly [therufs] #3996
143
+ * Checkout v2: Support metadata field [saschakala] #3992
144
+ * Adyen: Support networkTxReference field [naashton] #3997
145
+ * Paypal Express: Enable PayPal express reference transaction request to send merchant session id [janees-e] #3994
146
+
147
+ == Version 1.120.0 (May 28th, 2021)
148
+ * Braintree: Bump required braintree gem version to 3.0.1
149
+ * Stripe PI: ensure `setup_future_sage` and `off_session` work when using SetupIntents.
150
+ * Orbital: Update commit to accept retry_logic in params [jessiagee] #3890
151
+ * Orbital: Update remote 3DS tests [jessiagee] #3892
152
+ * Mercado Pago: support Creditel card type [therufs] #3893
153
+ * Payeezy: Update error mapping [meagabeth] #3896
154
+ * HPS: Add support for stored_credential [cdmackeyfree] #3894
155
+ * Orbital: Ensure payment_detail sends for ECP [jessiagee] #3899
156
+ * Payeezy: Update `error_code_from` method [meagabeth] #3900
157
+ * Worldpay: Add support for `statementNarrative` field [meagabeth] #3901
158
+ * Mercado Pago: Give ability to pass capture option in authorize txn field [naashton] #3897
159
+ * Orbital: Ensure correct fields sent in refund [jessiagee] #3903
160
+ * WorldPay: remove some defaults in billing address [carrigan] #3902
161
+ * Adyen: Support for General Credit [naashton] #3904
162
+ * Worldpay: reintroduce address1 and city defaults [carrigan] #3905
163
+ * Stripe: ensure potentially nested data is scrubbed #3907
164
+ * Stripe PI: Send Validate on Payment Method Attach [tatsianaclifton] #3909
165
+ * Adyen: Update handling of authorization returned from gateway [meagabeth] #3910
166
+ * Update gateway templates for Rubocop compliance [therufs] #3912 #3895
167
+ * Orbital: Send AVSname for all eCheck transactions [jessiagee] #3911
168
+ * Litle: update support of customerId field [cdmackeyfree] #3913
169
+ * Payment Express: fix signature for `verify` [therufs] #3914
170
+ * Forte: Send xdata fields [dsmcclain] #3915
171
+ * PaywayDotCom: Add New Gateway [DanAtPayway] #3898
172
+ * Orbital: Remove unnecessary requirements [jessiagee] #3917
173
+ * SafeCharge (Nuvei): Add network tokenization support [DStoyanoff] #3847
174
+ * Stripe PI: Enhance testing of SetupIntents API #3908
175
+ * SafeCharge (Nuvei): Fix NT related bug [jimilpatel24] #3921
176
+ * Worldpay: Only override cardholdername for 3ds tests [curiousepic] #3918
177
+ * Orbital: Add support for general credit [meagabeth] #3922
178
+ * Banco Sabadell: Ensure sca_exemption field is used #3923
179
+ * Redsys: Refactor XML character escape logic #3925
180
+ * HPS: Strip zip codes of non-alphanumeric characters [dsmcclain] #3926
181
+ * Orbital: $0 PreNote using authorize for eCheck force_capture [jessiagee] #3927
182
+ * Worldpay: synchronous response changes [naashton] #3928
183
+ * PaywayDotCom: Add more thorough scrubbing [tatsianaclifton] #3929
184
+ * Remove CONTRIBUTING.md and update README.md to reflect new repository wiki [dsmcclain] #3930
185
+ * Qvalent: Add customer_reference_number [fredo-] #3931
186
+ * Orbital: Add 'ND' ECPActionCode to $0 Prenote Check [jessiagee] #3935
187
+ * Checkout: Add support for stored_credential [meagabeth] #3934
188
+ * Credorax: Add support for 3ds_reqchallengeind [dsmcclain] #3936
189
+ * Adyen: cancelOrRefund endpoint when passed as option [naashton] #3937
190
+ * Qvalent: Add customer reference number FIX [fredo-] #3939
191
+ * Orbital: Pass line_items in capture [jessiagee] #3941
192
+ * BraintreeBlue: Add support for $0 auth verification [meagabeth] #3944
193
+ * JCB: Add additional BIN ranges [dsmcclain] #3946
194
+ * vPOS: Support new gateway type [therufs] #3906
195
+ * Braintree: Add support for AVS and CVV results in $0 credit card verification transactions [meagabeth] #3951
196
+ * Braintree: Return cvv_code and avs_code in response [meagabeth] #3952
197
+ * vPOS: Stringify values [therufs] #3954
198
+ * Payeezy: Send level2 fields [dsmcclain] #3953
199
+ * Credorax: adjust logic for sending 3ds shipping address fields [dsmcclain] #3959
200
+ * Orbital: Ensure ECP always sends AVSName [jessiagee] #3963
201
+ * Orbital: Add middle name to EWSMiddleName for ECP [jessiagee] #3962
202
+ * Support Canadian Bank Accounts [naashton] #3964
203
+ * Windcave/Payment Express: Add support for AvsAction and EnableAVSData fields [meagabeth] #3967
204
+ * CyberSource: Update XML tag for merchantDefinedData [meagabeth] #3969
205
+ * Elavon: Send ssl_vendor_id field [dsmcclain] #3972
206
+ * Credorax: Add support for `echo` field [meagabeth] #3973
207
+ * Worldpay: support cancelOrRefund via options [therufs] #3975
208
+ * Payeezy: support general credit [cdmackeyfree] #3977
209
+ * Ripley and Hipercard: Add BIN ranges [naashton] #3978
210
+ * Adyen: Default card holder name for credit cards [shasum] #3980
211
+ * PaywayDotCom: make `source_id` a required field [dsmcclain] # 3981
212
+ * Qvalent: remove `pem_password` from required credentials [dsmcclain] #3982
213
+ * Authorize.net: Fix stored credentials [tatsianaclifton] #3971
214
+ * CyberSource: Add support for multiple new fields [dsmcclain] #3984
215
+ * CASHNet: Update gateway adapter [dsmcclain] #3986
216
+ * Elavon: Send `ssl_vendor_id` field via options on gateway initialization [dsmcclain] #3989
217
+
5
218
  == Version 1.119.0 (February 9th, 2021)
6
219
  * Payment Express: support verify/validate [therufs] #3874
7
220
  * GlobalCollect: Truncate address fields [meagabeth] #3878
8
221
  * Litle: Truncate address fields [meagabeth] #3877
9
222
  * Netbanx: Add-customer-information(name,email,IP)-to-a-transaction [rockyhakjoong] #3754
223
+ * Netbanx: Adjust the avs and cvv return code in shopify [rockyhakjoong] #3833
10
224
  * Decidir: Improve error mapping [meagabeth] #3875
11
225
  * Worldpay: support `skip_capture` [therufs] #3879
12
226
  * Redsys: Add new response code text [britth] #3880
@@ -15,8 +229,9 @@
15
229
  * HPS: Update Add support for general credit [naashton] #3885
16
230
  * Elavon: Fix issue with encoding data sent in the request [naashton] #3865
17
231
  * Orbital: Update ECP to use EWS verification [jessiagee] #3886
18
- * Eway: Add 3ds field when do direct payment [GavinSun9527] #3860
232
+ * Eway: Add 3ds field when do direct payment [GavinSun9527] #3860
19
233
  * Support Creditel cardtype [therufs] #3883
234
+ * Elavon: Remove ampersand char from fields [naashton] #3891
20
235
 
21
236
  == Version 1.118.0 (January 22nd, 2021)
22
237
  * Worldpay: Add support for challengeWindowSize [carrigan] #3823
data/README.md CHANGED
@@ -17,7 +17,7 @@ from an ever-growing set of contributors.
17
17
  See [GettingStarted.md](GettingStarted.md) if you want to learn more about using Active Merchant in your
18
18
  applications.
19
19
 
20
- If you'd like to contribute to Active Merchant, please start with our [contribution guide](CONTRIBUTING.md).
20
+ If you'd like to contribute to Active Merchant, please start with our [Contribution Guide](https://github.com/activemerchant/active_merchant/wiki/Contributing).
21
21
 
22
22
  ## Installation
23
23
 
@@ -81,6 +81,8 @@ if credit_card.validate.empty?
81
81
  end
82
82
  ```
83
83
 
84
+ ## Contributing
85
+
84
86
  For more in-depth documentation and tutorials, see [GettingStarted.md](GettingStarted.md) and the
85
87
  [API documentation](http://www.rubydoc.info/github/activemerchant/active_merchant/).
86
88
 
@@ -158,7 +160,7 @@ The [ActiveMerchant Wiki](https://github.com/activemerchant/active_merchant/wiki
158
160
  * [Metrics Global](http://www.metricsglobal.com) - US
159
161
  * [MasterCard Internet Gateway Service (MiGS)](http://mastercard.com/mastercardsps) - AU, AE, BD, BN, EG, HK, ID, IN, JO, KW, LB, LK, MU, MV, MY, NZ, OM, PH, QA, SA, SG, TT, VN
160
162
  * [Modern Payments](http://www.modpay.com) - US
161
- * [MONEI](http://www.monei.net/) - AD, AT, BE, BG, CA, CH, CY, CZ, DE, DK, EE, ES, FI, FO, FR, GB, GI, GR, HU, IE, IL, IS, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SI, SK, TR, US, VA
163
+ * [MONEI](http://www.monei.com/) - AD, AT, BE, BG, CA, CH, CY, CZ, DE, DK, EE, ES, FI, FO, FR, GB, GI, GR, HU, IE, IL, IS, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SI, SK, TR, US, VA
162
164
  * [Moneris](http://www.moneris.com/) - CA
163
165
  * [MoneyMovers](http://mmoa.us/) - US
164
166
  * [NAB Transact](http://transact.nab.com.au) - AU
@@ -13,6 +13,16 @@ module ActiveMerchant #:nodoc:
13
13
  # Used for Canadian bank accounts
14
14
  attr_accessor :institution_number, :transit_number
15
15
 
16
+ # Canadian Institution Numbers
17
+ # Found here: https://en.wikipedia.org/wiki/Routing_number_(Canada)
18
+ CAN_INSTITUTION_NUMBERS = %w(
19
+ 001 002 003 004 006 010 016 030 039 117 127 177 219 245 260 269 270 308
20
+ 309 310 315 320 338 340 509 540 608 614 623 809 815 819 828 829 837 839
21
+ 865 879 889 899 241 242 248 250 265 275 277 290 294 301 303 307 311 314
22
+ 321 323 327 328 330 332 334 335 342 343 346 352 355 361 362 366 370 372
23
+ 376 378 807 853
24
+ )
25
+
16
26
  def name
17
27
  @name ||= "#{first_name} #{last_name}".strip
18
28
  end
@@ -56,20 +66,17 @@ module ActiveMerchant #:nodoc:
56
66
  # See http://en.wikipedia.org/wiki/Routing_transit_number#Internal_checksums
57
67
  def valid_routing_number?
58
68
  digits = routing_number.to_s.split('').map(&:to_i).select { |d| (0..9).cover?(d) }
59
- case digits.size
60
- when 9
69
+ if digits.size == 9
61
70
  checksum = ((3 * (digits[0] + digits[3] + digits[6])) +
62
- (7 * (digits[1] + digits[4] + digits[7])) +
63
- (digits[2] + digits[5] + digits[8])) % 10
64
- case checksum
65
- when 0
66
- true
67
- else
68
- false
69
- end
70
- else
71
- false
71
+ (7 * (digits[1] + digits[4] + digits[7])) +
72
+ (digits[2] + digits[5] + digits[8])) % 10
73
+
74
+ return checksum == 0
72
75
  end
76
+
77
+ return CAN_INSTITUTION_NUMBERS.include?(routing_number[0..2]) if digits.size == 8
78
+
79
+ false
73
80
  end
74
81
  end
75
82
  end
@@ -25,6 +25,8 @@ module ActiveMerchant #:nodoc:
25
25
  # * UnionPay
26
26
  # * Alia
27
27
  # * Olimpica
28
+ # * Creditel
29
+ # * Confiable
28
30
  #
29
31
  # For testing purposes, use the 'bogus' credit card brand. This skips the vast majority of
30
32
  # validations, allowing you to focus on your core concerns until you're ready to be more concerned
@@ -103,6 +105,7 @@ module ActiveMerchant #:nodoc:
103
105
  # * +'alia'+
104
106
  # * +'olimpica'+
105
107
  # * +'creditel'+
108
+ # * +'confiable'+
106
109
  #
107
110
  # Or, if you wish to test your implementation, +'bogus'+.
108
111
  #
@@ -15,6 +15,7 @@ module ActiveMerchant #:nodoc:
15
15
  case option
16
16
  when :two_digits then sprintf('%.2i', number.to_i)[-2..-1]
17
17
  when :four_digits then sprintf('%.4i', number.to_i)[-4..-1]
18
+ when :four_digits_year then number.to_s.length == 2 ? '20' + number.to_s : format(number, :four_digits)
18
19
  else number
19
20
  end
20
21
  end
@@ -1,3 +1,5 @@
1
+ require 'set'
2
+
1
3
  module ActiveMerchant #:nodoc:
2
4
  module Billing #:nodoc:
3
5
  # Convenience methods that can be included into a custom Credit Card object, such as an ActiveRecord based Credit Card object.
@@ -7,11 +9,11 @@ module ActiveMerchant #:nodoc:
7
9
  'master' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), MASTERCARD_RANGES) },
8
10
  'elo' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), ELO_RANGES) },
9
11
  'alelo' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), ALELO_RANGES) },
10
- 'discover' => ->(num) { num =~ /^(6011|65\d{2}|64[4-9]\d)\d{12,15}|(62\d{14,17})$/ },
12
+ 'discover' => ->(num) { num =~ /^(6011|65\d{2}|64[4-9]\d)\d{12,15}$/ },
11
13
  'american_express' => ->(num) { num =~ /^3[47]\d{13}$/ },
12
14
  'naranja' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), NARANJA_RANGES) },
13
15
  'diners_club' => ->(num) { num =~ /^3(0[0-5]|[68]\d)\d{11,16}$/ },
14
- 'jcb' => ->(num) { num =~ /^35(28|29|[3-8]\d)\d{12}$/ },
16
+ 'jcb' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 4), JCB_RANGES) },
15
17
  'dankort' => ->(num) { num =~ /^5019\d{12}$/ },
16
18
  'maestro' => lambda { |num|
17
19
  (12..19).cover?(num&.size) && (
@@ -19,6 +21,7 @@ module ActiveMerchant #:nodoc:
19
21
  MAESTRO_BINS.any? { |bin| num.slice(0, bin.size) == bin }
20
22
  )
21
23
  },
24
+ 'maestro_no_luhn' => ->(num) { num =~ /^(501080|501081|501082)\d{6,13}$/ },
22
25
  'forbrugsforeningen' => ->(num) { num =~ /^600722\d{10}$/ },
23
26
  'sodexo' => ->(num) { num =~ /^(606071|603389|606070|606069|606068|600818)\d{10}$/ },
24
27
  'alia' => ->(num) { num =~ /^(504997|505878|601030|601073|505874)\d{10}$/ },
@@ -32,7 +35,10 @@ module ActiveMerchant #:nodoc:
32
35
  )
33
36
  },
34
37
  'olimpica' => ->(num) { num =~ /^636853\d{10}$/ },
35
- 'creditel' => ->(num) { num =~ /^601933\d{10}$/ }
38
+ 'creditel' => ->(num) { num =~ /^601933\d{10}$/ },
39
+ 'confiable' => ->(num) { num =~ /^560718\d{10}$/ },
40
+ 'synchrony' => ->(num) { num =~ /^700600\d{10}$/ },
41
+ 'routex' => ->(num) { num =~ /^(700676|700678)\d{13}$/ }
36
42
  }
37
43
 
38
44
  # http://www.barclaycard.co.uk/business/files/bin_rules.pdf
@@ -71,11 +77,17 @@ module ActiveMerchant #:nodoc:
71
77
  MASTERCARD_RANGES = [
72
78
  (222100..272099),
73
79
  (510000..559999),
80
+ [605272],
81
+ [606282],
82
+ [637095],
83
+ [637568],
84
+ (637599..637600),
85
+ [637609],
74
86
  ]
75
87
 
76
88
  MAESTRO_BINS = Set.new(
77
89
  %w[ 500057
78
- 501018 501043 501045 501047 501049 501051 501072 501075 501087 501089 501095
90
+ 501018 501043 501045 501047 501049 501051 501072 501075 501083 501087 501089 501095
79
91
  501500
80
92
  501879 502113 502301 503175
81
93
  503645 503670
@@ -100,16 +112,16 @@ module ActiveMerchant #:nodoc:
100
112
  597077 597094 597143 597370 597410 597765 597855 597862
101
113
  598053 598054 598395 598585 598793 598794 598815 598835 598838 598880 598889
102
114
  599000 599069 599089 599148 599191 599310 599741 599742 599867
103
- 601070
115
+ 601070 601638
104
116
  604983
105
117
  606126
106
118
  636380 636422 636502 636639
107
119
  637046 637756
108
- 639130
120
+ 639130 639229
109
121
  690032]
110
122
  )
111
123
 
112
- # https://www.mastercard.us/content/dam/mccom/global/documents/mastercard-rules.pdf, page 73
124
+ # https://www.mastercard.us/content/dam/mccom/global/documents/mastercard-rules.pdf, page 79
113
125
  MAESTRO_RANGES = [
114
126
  (500032..500033),
115
127
  (501015..501016),
@@ -119,17 +131,20 @@ module ActiveMerchant #:nodoc:
119
131
  (501053..501058),
120
132
  (501060..501063),
121
133
  (501066..501067),
122
- (501080..501083),
123
134
  (501091..501092),
124
135
  (501104..501105),
125
136
  (501107..501108),
126
137
  (501104..501105),
127
138
  (501107..501108),
139
+ (501800..501899),
140
+ (502000..502099),
141
+ (503800..503899),
128
142
  (561200..561269),
129
143
  (561271..561299),
130
144
  (561320..561356),
131
145
  (581700..581751),
132
146
  (581753..581800),
147
+ (589300..589399),
133
148
  (589998..591259),
134
149
  (591261..596770),
135
150
  (596772..598744),
@@ -143,6 +158,7 @@ module ActiveMerchant #:nodoc:
143
158
  (601640..601652),
144
159
  (601689..601700),
145
160
  (602011..602050),
161
+ (630400..630499),
146
162
  (639000..639099),
147
163
  (670000..679999),
148
164
  ]
@@ -183,14 +199,16 @@ module ActiveMerchant #:nodoc:
183
199
  589562..589562
184
200
  ]
185
201
 
186
- # In addition to the BIN ranges listed here that all begin with 81, UnionPay cards
187
- # include many ranges that start with 62.
188
- # Prior to adding UnionPay, cards that start with 62 were all classified as Discover.
189
- # Because UnionPay cards are able to run on Discover rails, this was kept the same.
202
+ # https://www.discoverglobalnetwork.com/content/dam/discover/en_us/dgn/pdfs/IPP-VAR-Enabler-Compliance.pdf
190
203
  UNIONPAY_RANGES = [
204
+ 62000000..62000000, 62212600..62379699, 62400000..62699999, 62820000..62889999,
191
205
  81000000..81099999, 81100000..81319999, 81320000..81519999, 81520000..81639999, 81640000..81719999
192
206
  ]
193
207
 
208
+ JCB_RANGES = [
209
+ 3528..3589, 3088..3094, 3096..3102, 3112..3120, 3158..3159, 3337..3349
210
+ ]
211
+
194
212
  def self.included(base)
195
213
  base.extend(ClassMethods)
196
214
  end
@@ -198,7 +216,7 @@ module ActiveMerchant #:nodoc:
198
216
  def self.in_bin_range?(number, ranges)
199
217
  bin = number.to_i
200
218
  ranges.any? do |range|
201
- range.cover?(bin)
219
+ range.include?(bin)
202
220
  end
203
221
  end
204
222
 
@@ -349,7 +367,7 @@ module ActiveMerchant #:nodoc:
349
367
  valid_naranja_algo?(numbers)
350
368
  when 'creditel'
351
369
  valid_creditel_algo?(numbers)
352
- when 'alia'
370
+ when 'alia', 'confiable', 'maestro_no_luhn'
353
371
  true
354
372
  else
355
373
  valid_luhn?(numbers)