activemerchant 1.133.0 → 1.137.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +240 -0
  3. data/lib/active_merchant/billing/check.rb +2 -2
  4. data/lib/active_merchant/billing/compatibility.rb +4 -4
  5. data/lib/active_merchant/billing/credit_card.rb +11 -8
  6. data/lib/active_merchant/billing/credit_card_formatting.rb +4 -0
  7. data/lib/active_merchant/billing/credit_card_methods.rb +59 -6
  8. data/lib/active_merchant/billing/gateway.rb +9 -0
  9. data/lib/active_merchant/billing/gateways/adyen.rb +162 -43
  10. data/lib/active_merchant/billing/gateways/airwallex.rb +26 -12
  11. data/lib/active_merchant/billing/gateways/alelo.rb +23 -5
  12. data/lib/active_merchant/billing/gateways/authorize_net.rb +43 -35
  13. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +10 -6
  14. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +1 -3
  15. data/lib/active_merchant/billing/gateways/axcessms.rb +6 -2
  16. data/lib/active_merchant/billing/gateways/banwire.rb +4 -2
  17. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +7 -3
  18. data/lib/active_merchant/billing/gateways/blue_pay.rb +13 -5
  19. data/lib/active_merchant/billing/gateways/blue_snap.rb +5 -5
  20. data/lib/active_merchant/billing/gateways/braintree/token_nonce.rb +65 -20
  21. data/lib/active_merchant/billing/gateways/braintree_blue.rb +226 -73
  22. data/lib/active_merchant/billing/gateways/braintree_orange.rb +1 -1
  23. data/lib/active_merchant/billing/gateways/card_connect.rb +5 -2
  24. data/lib/active_merchant/billing/gateways/card_stream.rb +4 -6
  25. data/lib/active_merchant/billing/gateways/cashnet.rb +1 -1
  26. data/lib/active_merchant/billing/gateways/cecabank/cecabank_common.rb +36 -0
  27. data/lib/active_merchant/billing/gateways/cecabank/cecabank_json.rb +316 -0
  28. data/lib/active_merchant/billing/gateways/cecabank/cecabank_xml.rb +220 -0
  29. data/lib/active_merchant/billing/gateways/cecabank.rb +7 -240
  30. data/lib/active_merchant/billing/gateways/checkout_v2.rb +238 -34
  31. data/lib/active_merchant/billing/gateways/commerce_hub.rb +63 -6
  32. data/lib/active_merchant/billing/gateways/credorax.rb +3 -5
  33. data/lib/active_merchant/billing/gateways/cyber_source.rb +185 -47
  34. data/lib/active_merchant/billing/gateways/cyber_source_rest.rb +102 -58
  35. data/lib/active_merchant/billing/gateways/d_local.rb +26 -15
  36. data/lib/active_merchant/billing/gateways/data_cash.rb +21 -17
  37. data/lib/active_merchant/billing/gateways/datatrans.rb +279 -0
  38. data/lib/active_merchant/billing/gateways/decidir.rb +53 -18
  39. data/lib/active_merchant/billing/gateways/decidir_plus.rb +4 -1
  40. data/lib/active_merchant/billing/gateways/deepstack.rb +382 -0
  41. data/lib/active_merchant/billing/gateways/ebanx.rb +40 -36
  42. data/lib/active_merchant/billing/gateways/efsnet.rb +6 -2
  43. data/lib/active_merchant/billing/gateways/elavon.rb +99 -33
  44. data/lib/active_merchant/billing/gateways/element.rb +36 -7
  45. data/lib/active_merchant/billing/gateways/epay.rb +6 -2
  46. data/lib/active_merchant/billing/gateways/evo_ca.rb +6 -2
  47. data/lib/active_merchant/billing/gateways/eway.rb +4 -2
  48. data/lib/active_merchant/billing/gateways/eway_managed.rb +6 -2
  49. data/lib/active_merchant/billing/gateways/exact.rb +6 -2
  50. data/lib/active_merchant/billing/gateways/fat_zebra.rb +31 -3
  51. data/lib/active_merchant/billing/gateways/federated_canada.rb +6 -2
  52. data/lib/active_merchant/billing/gateways/first_pay/first_pay_common.rb +15 -0
  53. data/lib/active_merchant/billing/gateways/first_pay/first_pay_json.rb +190 -0
  54. data/lib/active_merchant/billing/gateways/first_pay/first_pay_xml.rb +183 -0
  55. data/lib/active_merchant/billing/gateways/first_pay.rb +6 -172
  56. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +6 -2
  57. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +7 -3
  58. data/lib/active_merchant/billing/gateways/flex_charge.rb +347 -0
  59. data/lib/active_merchant/billing/gateways/garanti.rb +4 -2
  60. data/lib/active_merchant/billing/gateways/global_collect.rb +45 -37
  61. data/lib/active_merchant/billing/gateways/hi_pay.rb +286 -0
  62. data/lib/active_merchant/billing/gateways/hps.rb +1 -1
  63. data/lib/active_merchant/billing/gateways/iats_payments.rb +7 -2
  64. data/lib/active_merchant/billing/gateways/inspire.rb +6 -4
  65. data/lib/active_merchant/billing/gateways/instapay.rb +7 -4
  66. data/lib/active_merchant/billing/gateways/ipg.rb +9 -5
  67. data/lib/active_merchant/billing/gateways/iridium.rb +15 -5
  68. data/lib/active_merchant/billing/gateways/itransact.rb +6 -2
  69. data/lib/active_merchant/billing/gateways/iveri.rb +3 -3
  70. data/lib/active_merchant/billing/gateways/ixopay.rb +2 -2
  71. data/lib/active_merchant/billing/gateways/jetpay.rb +4 -2
  72. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +4 -2
  73. data/lib/active_merchant/billing/gateways/kushki.rb +72 -12
  74. data/lib/active_merchant/billing/gateways/linkpoint.rb +6 -2
  75. data/lib/active_merchant/billing/gateways/litle.rb +33 -50
  76. data/lib/active_merchant/billing/gateways/mastercard.rb +4 -4
  77. data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
  78. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +8 -5
  79. data/lib/active_merchant/billing/gateways/merchant_ware.rb +11 -4
  80. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +11 -4
  81. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +19 -3
  82. data/lib/active_merchant/billing/gateways/mercury.rb +6 -2
  83. data/lib/active_merchant/billing/gateways/metrics_global.rb +8 -6
  84. data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +1 -0
  85. data/lib/active_merchant/billing/gateways/migs.rb +6 -2
  86. data/lib/active_merchant/billing/gateways/mit.rb +8 -3
  87. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +18 -10
  88. data/lib/active_merchant/billing/gateways/monei.rb +1 -1
  89. data/lib/active_merchant/billing/gateways/moneris.rb +9 -3
  90. data/lib/active_merchant/billing/gateways/money_movers.rb +6 -2
  91. data/lib/active_merchant/billing/gateways/nab_transact.rb +12 -4
  92. data/lib/active_merchant/billing/gateways/net_registry.rb +6 -2
  93. data/lib/active_merchant/billing/gateways/netbanx.rb +1 -3
  94. data/lib/active_merchant/billing/gateways/netbilling.rb +6 -2
  95. data/lib/active_merchant/billing/gateways/network_merchants.rb +6 -2
  96. data/lib/active_merchant/billing/gateways/nmi.rb +18 -6
  97. data/lib/active_merchant/billing/gateways/ogone.rb +6 -2
  98. data/lib/active_merchant/billing/gateways/openpay.rb +4 -2
  99. data/lib/active_merchant/billing/gateways/opp.rb +1 -2
  100. data/lib/active_merchant/billing/gateways/optimal_payment.rb +6 -2
  101. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -3
  102. data/lib/active_merchant/billing/gateways/orbital.rb +83 -24
  103. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +7 -4
  104. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +6 -2
  105. data/lib/active_merchant/billing/gateways/pay_hub.rb +4 -2
  106. data/lib/active_merchant/billing/gateways/pay_junction.rb +6 -2
  107. data/lib/active_merchant/billing/gateways/pay_secure.rb +6 -2
  108. data/lib/active_merchant/billing/gateways/pay_trace.rb +31 -18
  109. data/lib/active_merchant/billing/gateways/payeezy.rb +19 -8
  110. data/lib/active_merchant/billing/gateways/payex.rb +4 -2
  111. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -1
  112. data/lib/active_merchant/billing/gateways/payflow.rb +1 -3
  113. data/lib/active_merchant/billing/gateways/payment_express.rb +8 -4
  114. data/lib/active_merchant/billing/gateways/paymentez.rb +23 -11
  115. data/lib/active_merchant/billing/gateways/paysafe.rb +12 -11
  116. data/lib/active_merchant/billing/gateways/payscout.rb +7 -4
  117. data/lib/active_merchant/billing/gateways/paystation.rb +7 -3
  118. data/lib/active_merchant/billing/gateways/payway.rb +6 -2
  119. data/lib/active_merchant/billing/gateways/payway_dot_com.rb +2 -2
  120. data/lib/active_merchant/billing/gateways/pin.rb +22 -4
  121. data/lib/active_merchant/billing/gateways/plexo.rb +49 -10
  122. data/lib/active_merchant/billing/gateways/plugnpay.rb +6 -2
  123. data/lib/active_merchant/billing/gateways/priority.rb +6 -5
  124. data/lib/active_merchant/billing/gateways/psigate.rb +6 -2
  125. data/lib/active_merchant/billing/gateways/psl_card.rb +6 -2
  126. data/lib/active_merchant/billing/gateways/qbms.rb +6 -2
  127. data/lib/active_merchant/billing/gateways/quantum.rb +6 -2
  128. data/lib/active_merchant/billing/gateways/quickbooks.rb +6 -5
  129. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +7 -4
  130. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +6 -2
  131. data/lib/active_merchant/billing/gateways/rapyd.rb +148 -46
  132. data/lib/active_merchant/billing/gateways/reach.rb +11 -4
  133. data/lib/active_merchant/billing/gateways/redsys.rb +2 -10
  134. data/lib/active_merchant/billing/gateways/redsys_rest.rb +507 -0
  135. data/lib/active_merchant/billing/gateways/s5.rb +3 -3
  136. data/lib/active_merchant/billing/gateways/safe_charge.rb +36 -16
  137. data/lib/active_merchant/billing/gateways/sage.rb +12 -4
  138. data/lib/active_merchant/billing/gateways/sage_pay.rb +79 -5
  139. data/lib/active_merchant/billing/gateways/sallie_mae.rb +6 -2
  140. data/lib/active_merchant/billing/gateways/secure_net.rb +6 -2
  141. data/lib/active_merchant/billing/gateways/secure_pay.rb +8 -6
  142. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +12 -4
  143. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +6 -2
  144. data/lib/active_merchant/billing/gateways/securion_pay.rb +24 -10
  145. data/lib/active_merchant/billing/gateways/shift4.rb +17 -20
  146. data/lib/active_merchant/billing/gateways/shift4_v2.rb +117 -0
  147. data/lib/active_merchant/billing/gateways/simetrik.rb +17 -11
  148. data/lib/active_merchant/billing/gateways/skip_jack.rb +6 -2
  149. data/lib/active_merchant/billing/gateways/smart_ps.rb +7 -4
  150. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +4 -2
  151. data/lib/active_merchant/billing/gateways/spreedly_core.rb +2 -4
  152. data/lib/active_merchant/billing/gateways/stripe.rb +53 -21
  153. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +199 -50
  154. data/lib/active_merchant/billing/gateways/sum_up.rb +223 -0
  155. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +4 -2
  156. data/lib/active_merchant/billing/gateways/telr.rb +3 -4
  157. data/lib/active_merchant/billing/gateways/trans_first.rb +1 -2
  158. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +8 -16
  159. data/lib/active_merchant/billing/gateways/transact_pro.rb +1 -1
  160. data/lib/active_merchant/billing/gateways/trust_commerce.rb +6 -2
  161. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +9 -8
  162. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +6 -2
  163. data/lib/active_merchant/billing/gateways/vanco.rb +2 -4
  164. data/lib/active_merchant/billing/gateways/vantiv_express.rb +587 -0
  165. data/lib/active_merchant/billing/gateways/verifi.rb +6 -2
  166. data/lib/active_merchant/billing/gateways/viaklix.rb +6 -2
  167. data/lib/active_merchant/billing/gateways/visanet_peru.rb +2 -2
  168. data/lib/active_merchant/billing/gateways/vpos.rb +3 -3
  169. data/lib/active_merchant/billing/gateways/wirecard.rb +7 -3
  170. data/lib/active_merchant/billing/gateways/wompi.rb +5 -0
  171. data/lib/active_merchant/billing/gateways/worldpay.rb +140 -73
  172. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +13 -10
  173. data/lib/active_merchant/billing/gateways/xpay.rb +242 -0
  174. data/lib/active_merchant/billing/network_tokenization_credit_card.rb +1 -1
  175. data/lib/active_merchant/billing/response.rb +2 -2
  176. data/lib/active_merchant/connection.rb +3 -17
  177. data/lib/active_merchant/country.rb +1 -0
  178. data/lib/active_merchant/errors.rb +10 -0
  179. data/lib/active_merchant/version.rb +1 -1
  180. data/lib/support/gateway_support.rb +2 -2
  181. data/lib/support/ssl_verify.rb +4 -4
  182. data/lib/support/ssl_version.rb +6 -6
  183. metadata +30 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d705df588bf311375b4dfc46da6912709e0aaecc7bd1800e69af7b61fcfa23b
4
- data.tar.gz: 80ae4869bcbf875c2ef0bd7b5b257641c1810bc5110958a66d1cda956e6a994a
3
+ metadata.gz: d71204a4cd8ef7e75b2c6f2116d56af1d2effc900cc89aa4946181d664a1ffb2
4
+ data.tar.gz: ead62c51a2d708e9e79e39fea62021dfdc72fbdaefad045099e4b9238d9ac355
5
5
  SHA512:
6
- metadata.gz: ba783e41a2872b825b73e5b20c6084e2d4b7200ab899a91ee6aa31977c6e4b3da651f96cd3c895417a8e3e70fdd84cd082a7450eb8a2d35c48b4fc2410ea2c02
7
- data.tar.gz: b6c1718e9160fdf16745eff1758f5ffc25cbdd6a4bb219c4e13510e3a40b998f9f01b1426985fcb8b987cf73c1c5e8a760a4ffb8b506459ce4501ddb242bedb4
6
+ metadata.gz: 1d029ce9b932cc72acd56799cfa4ed6debb36ce153290eb99c260a400abd08f108fd9f0ae547e558f009c0d37f49df5008c7b0bbc5adf5e4810ed562058d82bb
7
+ data.tar.gz: 1ecb1bc3e94611c3017f233ed3ea59efd91213ad07497aa2f38ec731536aec6bd518853d6cf044d7a9217a068c92f08e1df98cca29596d1005773bc2bdeb1692
data/CHANGELOG CHANGED
@@ -3,8 +3,247 @@
3
3
 
4
4
  == HEAD
5
5
 
6
+ = Version 1.137.0 (August 2, 2024)
7
+
8
+ * Unlock dependency on `rexml` to allow fixing a CVE (#5181).
9
+ * Bump Ruby version to 3.1 [dustinhaefele] #5104
10
+ * FlexCharge: Update inquire method to use the new orders end-point
11
+ * Worldpay: Prefer options for network_transaction_id [aenand] #5129
12
+ * Braintree: Prefer options for network_transaction_id [aenand] #5129
13
+ * Cybersource Rest: Update support for stored credentials [aenand] #5083
14
+ * Plexo: Add support to NetworkToken payments [euribe09] #5130
15
+ * Braintree: Update card verfification payload if billing address fields are not present [yunnydang] #5142
16
+ * DLocal: Update the phone and ip fields [yunnydang] #5143
17
+ * CheckoutV2: Add support for risk data fields [yunnydang] #5147
18
+ * Pin Payments: Add new 3DS params mentioned in Pin Payments docs [hudakh] #4720
19
+ * RedsysRest: Add support for stored credentials & 3DS exemptions [jherreraa] #5132
20
+ * CheckoutV2: Truncate the reference id for amex transactions [yunnydang] #5151
21
+ * CommerceHub: Add billing address name override [yunnydang] #5157
22
+ * StripePI: Add optional ability for 3DS exemption on verify calls [yunnydang] #5160
23
+ * CyberSource: Update stored credentials [sinourain] #5136
24
+ * Orbital: Update to accept UCAF Indicator GSF [almalee24] #5150
25
+ * CyberSource: Add addtional invoiceHeader fields [yunnydang] #5161
26
+ * MerchantWarrior: Update phone, email, ip and store ID [almalee24] #5158
27
+ * Credorax: Update 3DS version mapping [almalee24] #5159
28
+ * Add Maestro card bins [yunnydang] #5172
29
+ * Braintree: Remove stored credential v1 [almalee24] #5175
30
+ * Braintree Blue: Pass overridden mid into client token for GS 3DS [sinourain] #5166
31
+ * Moneris: Update crypt_type for 3DS [almalee24] #5162
32
+ * CheckoutV2: Update 3DS message & error code [almalee24] #5177
33
+ * DecicirPlus: Update error_message to add safety navigator [almalee24] #5187
34
+ * Elavon: Add updated stored credential version [almalee24] #5170
35
+ * Adyen: Add header fields to response body [yunnydang] #5184
36
+ * Stripe and Stripe PI: Add header fields to response body [yunnydang] #5185
37
+
38
+ == Version 1.136.0 (June 3, 2024)
39
+ * Shift4V2: Add new gateway based on SecurionPay adapter [heavyblade] #4860
40
+ * TNS: Use the specified order_id in request if available [yunnydang] #4880
41
+ * Cybersource: Support recurring apple pay [aenand] #4874
42
+ * Verve BIN ranges and add card type to Rapyd gateway [jherreraa] #4875
43
+ * Rapyd: Add network_reference_id, initiation_type, and update stored credential method [yunnydang] #4877
44
+ * Adyen: Add the store field [yunnydang] #4878
45
+ * Stripe Payment Intents: Expand balance txns for regular transactions [yunnydang] #4882
46
+ * CyberSource (SOAP): Added support for 3DS exemption request fields [BritneyS] #4881
47
+ * StripePI: Adding network tokenization fields to Stripe PaymentIntents [BritneyS] #4867
48
+ * Shift4: Fixing currency bug [Heavyblade] #4887
49
+ * Rapyd: fixing issue with json encoding and signatures [Heavyblade] #4892
50
+ * SumUp: Setup, Scrub and Purchase build [sinourain] #4890
51
+ * XpayGateway: Initial setup [javierpedrozaing] #4889
52
+ * Rapyd: Add validation to not send cvv and network_reference_id [javierpedrozaing] #4895
53
+ * Ebanx: Add Ecuador and Bolivia as supported countries [almalee24] #4893
54
+ * Decidir: Add support for network tokens [almalee24] #4870
55
+ * Element: Fix credit card name bug [almalee24] #4898
56
+ * Adyen: Add payout endpoint [almalee24] #4885
57
+ * Adding Oauth Response for access tokens [almalee24] #4851
58
+ * CheckoutV2: Update stored credentials [almalee24] #4901
59
+ * Revert "Adding Oauth Response for access tokens" [almalee24] #4906
60
+ * Braintree: Create credit card nonce [gasb150] #4897
61
+ * Adyen: Fix shopperEmail bug [almalee24] #4904
62
+ * Add Cabal card bin ranges [yunnydang] #4908
63
+ * Kushki: Fixing issue with 3DS info on visa cc [heavyblade] #4899
64
+ * Adyen: Add MIT flagging for Network Tokens [aenand] #4905
65
+ * Moneris: Update sca actions [almalee24] #4902
66
+ * Ogone: Add gateway specific 3ds option with default options mapping [jherreraa] #4894
67
+ * Rapyd: Add recurrence_type field [yunnydang] #4912
68
+ * Revert "Adyen: Update MIT flagging for NT" [almalee24] #4914
69
+ * SumUp: Void and partial refund calls [sinourain] #4891
70
+ * SecurionPay/Shift4_v2: authorization from [gasb150] #4913
71
+ * Rapyd: Update recurrence_type field [yunnydang] #4922
72
+ * Element: Add lodging fields [yunnydang] #4813
73
+ * SafeCharge: Update sg_CreditType field on the credit method [yunnydang] #4918
74
+ * Rapyd: add force_3ds_secure flag [Heavyblade] #4927
75
+ * Beanstream: add alternate option for passing phone number [jcreiff] #4923
76
+ * AuthorizeNet: Update network token method [almalee24] #4852
77
+ * Adding Oauth Response for access tokens [almalee24] #4907
78
+ * GlobalCollect: Added support for 3DS exemption request field [almalee24] #4917
79
+ * NMI: Update supported countries list [jcreiff] #4931
80
+ * Adyen: Add mcc field [jcreiff] #4926
81
+ * Quickbooks: Remove raise OAuth from extract_response_body_or_raise [almalee24] #4935
82
+ * Cecabank: Add new Cecabank gateway to use the JSON REST API [sinourain] #4920
83
+ * Cecabank: Add 3DS Global to Cecabank REST JSON gateway [sinourain] #4940
84
+ * Cecabank: Add scrub implementation [sinourain] #4945
85
+ * GlobalCollect: Fix bug in success_from logic [DustinHaefele] #4939
86
+ * Worldpay: Update 3ds logic to accept df_reference_id directly [DustinHaefele] #4929
87
+ * Orbital: Enable Third Party Vaulting [javierpedrozaing] #4928
88
+ * Payeezy: Add the customer_ref and reference_3 fields [yunnydang] #4942
89
+ * Redsys Rest: Add support for new gateway type Redsys Rest [aenand] #4951
90
+ * CyberSource: Surface the reconciliationID2 field [yunnydang] #4934
91
+ * Worldpay: Update stored credentials logic [DustinHaefele] #4950
92
+ * Vantiv Express: New Xml gateway [DustinHaefele] #4956
93
+ * Shift4 V2: Add unstore function [javierpedrozaing] #4953
94
+ * CommerceHub: Add 3DS global support [sinourain] #4957
95
+ * SumUp Gateway: Fix refund method [sinourain] #4924
96
+ * Braintree: Add v2 stored credential option [aenand] #4937
97
+ * Cybersource REST: Remove request-target parens [curiousepic] #4960
98
+ * Ogone: Fix signature calulcation for blank fields [Heavyblade] #4963
99
+ * VisaNet Peru: Add purchaseNumber to response object [yunnydang] #4961
100
+ * SafeCharge: Support tokens [almalee24] #4948
101
+ * Redsys: Update to $0 verify [almalee24] #4944
102
+ * Litle: Update stored credentials [almalee24] #4903
103
+ * WorldPay: Accept GooglePay pan only [almalee24] #4943
104
+ * Braintree: Correct issue in v2 stored credentials [aenand] #4967
105
+ * Stripe Payment Intents: Add the card brand field [yunnydang] #4964
106
+ * Rapyd: Enable new auth mode payment_redirect [javierpedrozaing] #4970
107
+ * Cecabank: Fix exemption_type when it is blank and update the error code for some tests [sinourain] #4968
108
+ * RedsysRest: Update to $0 verify [almalee24] #4973
109
+ * CommerceHub: Add credit transaction [sinourain] #4965
110
+ * PayTrace: Send CSC value on gateway request. [DustinHaefele] #4974
111
+ * Orbital: Remove needless GSF for TPV [javierpedrozaing] #4959
112
+ * Adyen: Provide ZZ as default country code [jcreiff] #4971
113
+ * MIT: Add test_url [jcreiff] #4977
114
+ * VantivExpress: Fix eci bug [almalee24] #4982
115
+ * IPG: Allow for Merchant Aggregator credential usage [DustinHaefele] #4986
116
+ * Adyen: Add support for `metadata` object [rachelkirk] #4987
117
+ * Xpay: New adapter basic operations added [jherreraa] #4669
118
+ * Rapyd: Enable idempotent request support [javierpedrozaing] #4980
119
+ * Litle: Update account type [almalee24] #4976
120
+ * Wompi: Add support for `tip_in_cents` [rachelkirk] #4983
121
+ * HiPay: Add Gateway [gasb150] #4979
122
+ * Xpay: New adapter basic operations added [jherreraa] #4669
123
+ * Braintree: Add support for more payment details fields in response [yunnydang] #4992
124
+ * CyberSource: Add the first_recurring_payment auth service field [yunnydang] #4989
125
+ * CommerceHub: Add dynamic descriptors [jcreiff] #4994
126
+ * Rapyd: Update email mapping [javierpedrozaing] #4996
127
+ * SagePay: Add support for v4 [aenand] #4990
128
+ * Braintree: Send merchant_account_id when generating client token [almalee24] #4991
129
+ * CheckoutV2: Update reponse message for 3DS transactions [almalee24] #4975
130
+ * HiPay: Scrub/Refund/Void [gasb150] #4995
131
+ * Rapyd: Adding fixed_side and requested_currency options [Heavyblade] #4962
132
+ * Add new card type Tuya. GlobalCollect & Decidir: Improve support for Tuya card type [sinourain] #4993
133
+ * Cecabank: Encrypt credit card fields [sinourain] #4998
134
+ * HiPay: Add unstore [gasb150] #4999
135
+ * Rapyd: Fix transaction with two digits in month and year [javierpedrozaing] #5008
136
+ * SagePay: Add support for stored credentials [almalee24] #5007
137
+ * Payeezy: Pull cardholer name from billing address [almalee24] #5006
138
+ * HiPay: Add 3ds params [gasb150] #5012
139
+ * Cecabank: Fix gateway scrub method [sinourain] #5009
140
+ * Pin: Add the platform_adjustment field [yunnydang] #5011
141
+ * Priority: Allow gateway fields to be available on capture [yunnydang] #5010
142
+ * Add payment_data to NetworkTokenizationCreditCard [almalee24] #4888
143
+ * IPG: Update handling of ChargeTotal [jcreiff] #5017
144
+ * Plexo: Add the invoice_number field [yunnydang] #5019
145
+ * CheckoutV2: Handle empty address in payout destination data [jcreiff] #5024
146
+ * CyberSource: Add the auth service aggregator_id field [yunnydang] #5026
147
+ * Cecabank: exclude 3ds empty parameter [jherreraa] #5021
148
+ * Moneris: Add the customer id field [yunnydang] #5028
149
+ * Kushki: Add the product_details field [yunnydang] #5027
150
+ * GlobalCollect: Add support for encryptedPaymentData [almalee24] #5015
151
+ * Rapyd: Adding 500 errors handling [Heavyblade] #5029
152
+ * SumUp: Add 3DS fields [sinourain] #5030
153
+ * Cecabank: Enable network_transaction_id as GSF [javierpedrozaing] #5034
154
+ * Braintree: Surface the paypal_details in response object [yunnydang] #5043
155
+ * Worldline (formerly GlobalCollect): Update API endpoints [deemeyers] #5049
156
+ * Quickbooks: Update scrub method [almalee24] #5049
157
+ * Worldline (formerly GlobalCollect):Remove decrypted payment data [almalee24] #5032
158
+ * StripePI: Update authorization_from [almalee24] #5048
159
+ * FirstPay: Add REST JSON transaction methods [sinourain] #5035
160
+ * Braintree: Add payment details to failed transaction hash [yunnydang] #5050
161
+ * Cecabank: Amex CVV Update [sinourain] #5051
162
+ * FirstPay: Add support for ApplePay and GooglePay [sinourain] #5036
163
+ * XPay: Update 3DS to support 3 step process [sinourain] #5046
164
+ * SagePay: Update API endpoints [almalee24] #5057
165
+ * Bin Update: Add sodexo bins [yunnydang] #5061
166
+ * Authorize Net: Add the surcharge field [yunnydang] #5062
167
+ * Paymentez: Update field for reference_id [almalee24] #5065
168
+ * CyberSource: Extend support for `gratuity_amount` and update Mastercard NT field order [rachelkirk] #5063
169
+ * XPay: Refactor basic transactions after implement 3DS 3steps API [sinourain] #5058
170
+ * AuthorizeNet: Remove turn_on_nt flow [almalee24] #5056
171
+ * CheckoutV2: Add processing and recipient fields [yunnydang] #5068
172
+ * RedsysRest: Omit CVV from requests when not present [jcreiff] #5077
173
+ * Bin Update: Add Unionpay bin [yunnydang] #5079
174
+ * MerchantWarrior: Adding support for 3DS Global fields [Heavyblade] #5072
175
+ * FatZebra: Adding third-party 3DS params [Heavyblade] #5066
176
+ * SumUp: Remove Void method [sinourain] #5060
177
+ * StripePI: Add new ApplePay and GooglePay flow [almalee24] #5075
178
+ * Braintree: Add merchant_account_id to Verify [almalee24] #5070
179
+ * Paymentez: Update success_from [jherrera] #5082
180
+ * Update Rubocop to 1.14.0 [almalee24] #5069
181
+ * Adyen: Update error code mapping [dustinhaefele] #5085
182
+ * Updates to StripePI scrub and Paymentez success_from [almalee24] #5090
183
+ * Bin Update: Add Routex bin [yunnydang] #5089
184
+ * SumUp: Improve success_from and message_from methods [sinourain] #5087
185
+ * Adyen: Send new ignore_threed_dynamic for success_from [almalee24] #5078
186
+ * Plexo: Add flow field to capture, purchase, and auth [yunnydang] #5092
187
+ * PayTrace: Always send name in billing_address [almalee24] #5086
188
+ * StripePI: Update eci format [almalee24] #5097
189
+ * Paymentez: Remove reference_id flag [almalee24] #5081
190
+ * Cybersource Rest: Add support for normalized three ds [aenand] #5105
191
+ * Braintree: Add additional data to response [aenand] #5084
192
+ * CheckoutV2: Retain and refresh OAuth access token [sinourain] #5098
193
+ * Worldpay: Remove default ECI value [aenand] #5103
194
+ * DataTrans: Add Gateway [gasb150] #5108
195
+ * CyberSource: Update NT flow [almalee24] #5106
196
+ * FlexCharge: Add Gateway [Heavyblade] #5108
197
+ * Litle: Update enhanced data fields to pass integers [yunnydang] #5113
198
+ * Litle: Update commodity code and line item total fields [yunnydang] #5115
199
+ * Cybersource Rest: Add support for network tokens [aenand] #5107
200
+ * Decidir: Add support for customer object [rachelkirk] #5071
201
+ * Worldpay: Add support for stored credentials with network tokens [aenand] #5114
202
+ * Paymentez: Update success_from method for refunds [almalee24] #5116
203
+ * DataTrans: Add ThirdParty 3DS params [gasb150] #5118
204
+ * FlexCharge: Add ThirdParty 3DS params [javierpedrozaing] #5121
205
+ * FlexCharge: Add support for TPV store [edgarv09] #5120
206
+ * CheckoutV2: Add sender payment fields to purchase and auth [yunnydang] #5124
207
+ * HiPay: Fix parse authorization string [javierpedrozaing] #5119
208
+ * Worldpay: Add support for deafult ECI value [aenand] #5126
209
+ * DLocal: Update stored credentials [sinourain] #5112
210
+ * NMI: Add NTID override [yunnydang] #5134
211
+ * Cybersource Rest: Support L2/L3 data [aenand] #5117
212
+ * Worldpay: Support L2/L3 data [aenand] #5117
213
+ * Support UATP cardtype [javierpedrozaing] #5137
214
+ * Litle: Add 141 and 142 as successful responses [almalee24] #5135
215
+
216
+ == Version 1.135.0 (August 24, 2023)
217
+ * PaymentExpress: Correct endpoints [steveh] #4827
218
+ * Adyen: Add option to elect which error message [aenand] #4843
219
+ * Reach: Update list of supported countries [jcreiff] #4842
220
+ * Paysafe: Truncate address fields [jcreiff] #4841
221
+ * Braintree: Support third party Network Tokens [aenand] #4775
222
+ * Kushki: Fix add amount default method for subtotalIva and subtotalIva0 [yunnydang] #4845
223
+ * Rapyd: Add customer object to requests [aenand] #4838
224
+ * CyberSource: Add merchant_id [almalee24] #4844
225
+ * Global Collect: Add agent numeric code and house number field [yunnydang] #4847
226
+ * Deepstack: Add Deepstack Gateway [khoinguyendeepstack] #4830
227
+ * Braintree: Additional tests for credit transactions [jcreiff] #4848
228
+ * Rapyd: Change nesting of description, statement_descriptor, complete_payment_url, and error_payment_url [jcreiff] #4849
229
+ * Rapyd: Add merchant_reference_id [jcreiff] #4858
230
+ * Braintree: Return error for ACH on credit [jcreiff] #4859
231
+ * Rapyd: Update handling of ewallet and billing address phone [jcreiff] #4863
232
+ * IPG: Change credentials inputs to use a combined store and user ID string as the user ID input [kylene-spreedly] #4854
233
+ * Braintree Blue: Update the credit card details transaction hash [yunnydang] #4865
234
+ * VisaNet Peru: Update generate_purchase_number_stamp [almalee24] #4855
235
+ * Braintree: Add sca_exemption [almalee24] #4864
236
+ * Ebanx: Update Verify [almalee24] #4866
237
+ * Quickbooks: Remove OAuth response from refresh_access_token [almalee24] #4949
238
+
239
+ == Version 1.134.0 (July 25, 2023)
240
+ * Update required Ruby version [almalee24] #4823
241
+ * Kushki: Enable 3ds2 [jherreraa] #4832
242
+
6
243
  == Version 1.133.0 (July 20, 2023)
7
244
  * CyberSource: remove credentials from tests [bbraschi] #4836
245
+ * Paysafe: Map order_id to merchantRefNum [jcreiff] #4839
246
+ * Stripe PI: Gate sending NTID [almalee24] #4828
8
247
 
9
248
  == Version 1.132.0 (July 20, 2023)
10
249
  * Stripe Payment Intents: Add support for new card on file field [aenand] #4807
@@ -807,6 +1046,7 @@
807
1046
  * PayU Latam: Improve error response [esmitperez] #3717
808
1047
  * Vantiv: Vantiv Express - CardPresentCode, PaymentType, SubmissionType, DuplicateCheckDisableFlag [esmitperez] #3730,#3731
809
1048
  * Cybersource: Ensure issueradditionaldata comes before partnerSolutionId [britth] #3733
1049
+ * RedsysRest: Add support for 3DS [almalee24] #5042
810
1050
 
811
1051
  == Version 1.111.0
812
1052
  * Fat Zebra: standardized 3DS fields and card on file extra data for Visa scheme rules [montdidier] #3409
@@ -7,8 +7,8 @@ module ActiveMerchant #:nodoc:
7
7
  # You may use Check in place of CreditCard with any gateway that supports it.
8
8
  class Check < Model
9
9
  attr_accessor :first_name, :last_name,
10
- :bank_name, :routing_number, :account_number,
11
- :account_holder_type, :account_type, :number
10
+ :bank_name, :routing_number, :account_number,
11
+ :account_holder_type, :account_type, :number
12
12
 
13
13
  # Used for Canadian bank accounts
14
14
  attr_accessor :institution_number, :transit_number
@@ -29,7 +29,7 @@ module ActiveMerchant
29
29
  result = lower_case_and_underscored_word.to_s.dup
30
30
  result.gsub!(/_id$/, '')
31
31
  result.tr!('_', ' ')
32
- result.gsub(/([a-z\d]*)/i, &:downcase).gsub(/^\w/) { $&.upcase }
32
+ result.gsub(/([a-z\d]*)/i, &:downcase).gsub(/^\w/) { Regexp.last_match(0).upcase }
33
33
  end
34
34
  end
35
35
  end
@@ -90,8 +90,8 @@ module ActiveMerchant
90
90
  add(:base, error)
91
91
  end
92
92
 
93
- def each_full
94
- full_messages.each { |msg| yield msg }
93
+ def each_full(&block)
94
+ full_messages.each(&block)
95
95
  end
96
96
 
97
97
  def full_messages
@@ -113,6 +113,6 @@ module ActiveMerchant
113
113
  end
114
114
  end
115
115
 
116
- Compatibility::Model.send(:include, Rails::Model)
116
+ Compatibility::Model.include Rails::Model
117
117
  end
118
118
  end
@@ -39,6 +39,9 @@ module ActiveMerchant #:nodoc:
39
39
  # * Anda
40
40
  # * Creditos directos (Tarjeta D)
41
41
  # * Panal
42
+ # * Verve
43
+ # * Tuya
44
+ # * UATP
42
45
  #
43
46
  # For testing purposes, use the 'bogus' credit card brand. This skips the vast majority of
44
47
  # validations, allowing you to focus on your core concerns until you're ready to be more concerned
@@ -132,6 +135,9 @@ module ActiveMerchant #:nodoc:
132
135
  # * +'anda'+
133
136
  # * +'tarjeta-d'+
134
137
  # * +'panal'+
138
+ # * +'verve'+
139
+ # * +'tuya'+
140
+ # * +'uatp'+
135
141
  #
136
142
  # Or, if you wish to test your implementation, +'bogus'+.
137
143
  #
@@ -288,7 +294,7 @@ module ActiveMerchant #:nodoc:
288
294
  end
289
295
 
290
296
  %w(month year start_month start_year).each do |m|
291
- class_eval %(
297
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
292
298
  def #{m}=(v)
293
299
  @#{m} = case v
294
300
  when "", nil, 0
@@ -297,7 +303,7 @@ module ActiveMerchant #:nodoc:
297
303
  v.to_i
298
304
  end
299
305
  end
300
- )
306
+ RUBY
301
307
  end
302
308
 
303
309
  def verification_value?
@@ -395,9 +401,7 @@ module ActiveMerchant #:nodoc:
395
401
  def validate_card_brand_and_number #:nodoc:
396
402
  errors = []
397
403
 
398
- if !empty?(brand)
399
- errors << [:brand, 'is invalid'] if !CreditCard.card_companies.include?(brand)
400
- end
404
+ errors << [:brand, 'is invalid'] if !empty?(brand) && !CreditCard.card_companies.include?(brand)
401
405
 
402
406
  if empty?(number)
403
407
  errors << [:number, 'is required']
@@ -405,9 +409,7 @@ module ActiveMerchant #:nodoc:
405
409
  errors << [:number, 'is not a valid credit card number']
406
410
  end
407
411
 
408
- if errors.empty?
409
- errors << [:brand, 'does not match the card number'] if !CreditCard.matching_brand?(number, brand)
410
- end
412
+ errors << [:brand, 'does not match the card number'] if errors.empty? && !CreditCard.matching_brand?(number, brand)
411
413
 
412
414
  errors
413
415
  end
@@ -425,6 +427,7 @@ module ActiveMerchant #:nodoc:
425
427
 
426
428
  class ExpiryDate #:nodoc:
427
429
  attr_reader :month, :year
430
+
428
431
  def initialize(month, year)
429
432
  @month = month.to_i
430
433
  @year = year.to_i
@@ -5,6 +5,10 @@ module ActiveMerchant #:nodoc:
5
5
  "#{format(credit_card.month, :two_digits)}#{format(credit_card.year, :two_digits)}"
6
6
  end
7
7
 
8
+ def strftime_yyyymm(credit_card)
9
+ format(credit_card.year, :four_digits) + format(credit_card.month, :two_digits)
10
+ end
11
+
8
12
  # This method is used to format numerical information pertaining to credit cards.
9
13
  #
10
14
  # format(2005, :two_digits) # => "05"
@@ -24,7 +24,11 @@ module ActiveMerchant #:nodoc:
24
24
  },
25
25
  'maestro_no_luhn' => ->(num) { num =~ /^(501080|501081|501082)\d{6,13}$/ },
26
26
  'forbrugsforeningen' => ->(num) { num =~ /^600722\d{10}$/ },
27
- 'sodexo' => ->(num) { num =~ /^(606071|603389|606070|606069|606068|600818|505864|505865)\d{10}$/ },
27
+ 'sodexo' => lambda { |num|
28
+ num&.size == 16 && (
29
+ SODEXO_BINS.any? { |bin| num.slice(0, bin.size) == bin }
30
+ )
31
+ },
28
32
  'alia' => ->(num) { num =~ /^(504997|505878|601030|601073|505874)\d{10}$/ },
29
33
  'vr' => ->(num) { num =~ /^(627416|637036)\d{10}$/ },
30
34
  'unionpay' => ->(num) { (16..19).cover?(num&.size) && in_bin_range?(num.slice(0, 8), UNIONPAY_RANGES) },
@@ -39,7 +43,7 @@ module ActiveMerchant #:nodoc:
39
43
  'creditel' => ->(num) { num =~ /^601933\d{10}$/ },
40
44
  'confiable' => ->(num) { num =~ /^560718\d{10}$/ },
41
45
  'synchrony' => ->(num) { num =~ /^700600\d{10}$/ },
42
- 'routex' => ->(num) { num =~ /^(700676|700678)\d{13}$/ },
46
+ 'routex' => ->(num) { num =~ /^(700674|700676|700678)\d{13}$/ },
43
47
  'mada' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), MADA_RANGES) },
44
48
  'bp_plus' => ->(num) { num =~ /^(7050\d\s\d{9}\s\d{3}$|705\d\s\d{8}\s\d{5}$)/ },
45
49
  'passcard' => ->(num) { num =~ /^628026\d{10}$/ },
@@ -47,7 +51,10 @@ module ActiveMerchant #:nodoc:
47
51
  'anda' => ->(num) { num =~ /^603199\d{10}$/ },
48
52
  'tarjeta-d' => ->(num) { num =~ /^601828\d{10}$/ },
49
53
  'hipercard' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), HIPERCARD_RANGES) },
50
- 'panal' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), PANAL_RANGES) }
54
+ 'panal' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), PANAL_RANGES) },
55
+ 'verve' => ->(num) { (16..19).cover?(num&.size) && in_bin_range?(num.slice(0, 6), VERVE_RANGES) },
56
+ 'tuya' => ->(num) { num =~ /^588800\d{10}$/ },
57
+ 'uatp' => ->(num) { num =~ /^(1175|1290)\d{11}$/ }
51
58
  }
52
59
 
53
60
  SODEXO_NO_LUHN = ->(num) { num =~ /^(505864|505865)\d{10}$/ }
@@ -72,6 +79,13 @@ module ActiveMerchant #:nodoc:
72
79
  (491730..491759),
73
80
  ]
74
81
 
82
+ SODEXO_BINS = Set.new(
83
+ %w[
84
+ 606071 603389 606070 606069 606068 600818 505864 505865
85
+ 60607601 60607607 60894400 60894410 60894420 60607606
86
+ ]
87
+ )
88
+
75
89
  CARNET_RANGES = [
76
90
  (506199..506499),
77
91
  ]
@@ -114,6 +128,7 @@ module ActiveMerchant #:nodoc:
114
128
  501879 502113 502120 502121 502301
115
129
  503175 503337 503645 503670
116
130
  504310 504338 504363 504533 504587 504620 504639 504656 504738 504781 504910
131
+ 505616
117
132
  507001 507002 507004 507082 507090
118
133
  560014 560565 561033
119
134
  572402 572610 572626
@@ -161,7 +176,7 @@ module ActiveMerchant #:nodoc:
161
176
  (501104..501105),
162
177
  (501107..501108),
163
178
  (501104..501105),
164
- (501107..501108),
179
+ (501107..501109),
165
180
  (501800..501899),
166
181
  (502000..502099),
167
182
  (503800..503899),
@@ -221,7 +236,8 @@ module ActiveMerchant #:nodoc:
221
236
  58965700..58965799,
222
237
  60352200..60352299,
223
238
  65027200..65027299,
224
- 65008700..65008700
239
+ 65008700..65008700,
240
+ 65090000..65090099
225
241
  ]
226
242
 
227
243
  MADA_RANGES = [
@@ -236,7 +252,7 @@ module ActiveMerchant #:nodoc:
236
252
 
237
253
  # https://www.discoverglobalnetwork.com/content/dam/discover/en_us/dgn/pdfs/IPP-VAR-Enabler-Compliance.pdf
238
254
  UNIONPAY_RANGES = [
239
- 62000000..62000000, 62212600..62379699, 62400000..62699999, 62820000..62889999,
255
+ 62000000..62000000, 62178570..62178570, 62212600..62379699, 62400000..62699999, 62820000..62889999,
240
256
  81000000..81099999, 81100000..81319999, 81320000..81519999, 81520000..81639999, 81640000..81719999
241
257
  ]
242
258
 
@@ -251,6 +267,43 @@ module ActiveMerchant #:nodoc:
251
267
 
252
268
  PANAL_RANGES = [[602049]]
253
269
 
270
+ VERVE_RANGES = [
271
+ [506099],
272
+ [506101],
273
+ [506103],
274
+ (506111..506114),
275
+ [506116],
276
+ [506118],
277
+ [506124],
278
+ [506127],
279
+ [506130],
280
+ (506132..506139),
281
+ [506141],
282
+ [506144],
283
+ (506146..506152),
284
+ (506154..506161),
285
+ (506163..506164),
286
+ [506167],
287
+ (506169..506198),
288
+ (507865..507866),
289
+ (507868..507872),
290
+ (507874..507899),
291
+ (507901..507909),
292
+ (507911..507919),
293
+ [507921],
294
+ (507923..507925),
295
+ (507927..507962),
296
+ [507964],
297
+ [627309],
298
+ [627903],
299
+ [628051],
300
+ [636625],
301
+ [637058],
302
+ [637634],
303
+ [639245],
304
+ [639383]
305
+ ]
306
+
254
307
  def self.included(base)
255
308
  base.extend(ClassMethods)
256
309
  end
@@ -315,6 +315,15 @@ module ActiveMerchant #:nodoc:
315
315
  [first_name, last_name]
316
316
  end
317
317
 
318
+ def split_address(full_address)
319
+ address_parts = (full_address || '').split
320
+ return [nil, nil] if address_parts.size == 0
321
+
322
+ number = address_parts.shift
323
+ street = address_parts.join(' ')
324
+ [number, street]
325
+ end
326
+
318
327
  def requires!(hash, *params)
319
328
  params.each do |param|
320
329
  if param.is_a?(Array)