activemerchant 1.108.0 → 1.113.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +69 -0
  3. data/README.md +2 -2
  4. data/lib/active_merchant/billing/base.rb +0 -13
  5. data/lib/active_merchant/billing/check.rb +1 -1
  6. data/lib/active_merchant/billing/credit_card.rb +3 -1
  7. data/lib/active_merchant/billing/credit_card_methods.rb +10 -7
  8. data/lib/active_merchant/billing/gateway.rb +1 -1
  9. data/lib/active_merchant/billing/gateways/adyen.rb +25 -14
  10. data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
  11. data/lib/active_merchant/billing/gateways/authorize_net.rb +13 -13
  12. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
  13. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +4 -4
  14. data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
  15. data/lib/active_merchant/billing/gateways/balanced.rb +2 -2
  16. data/lib/active_merchant/billing/gateways/bambora_apac.rb +3 -3
  17. data/lib/active_merchant/billing/gateways/bank_frick.rb +3 -3
  18. data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
  19. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -2
  20. data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +1 -1
  21. data/lib/active_merchant/billing/gateways/be2bill.rb +1 -1
  22. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -4
  23. data/lib/active_merchant/billing/gateways/blue_pay.rb +2 -2
  24. data/lib/active_merchant/billing/gateways/blue_snap.rb +50 -13
  25. data/lib/active_merchant/billing/gateways/borgun.rb +4 -4
  26. data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
  27. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -1
  28. data/lib/active_merchant/billing/gateways/braintree_blue.rb +85 -35
  29. data/lib/active_merchant/billing/gateways/bridge_pay.rb +2 -2
  30. data/lib/active_merchant/billing/gateways/cams.rb +2 -2
  31. data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
  32. data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
  33. data/lib/active_merchant/billing/gateways/card_stream.rb +4 -4
  34. data/lib/active_merchant/billing/gateways/cardknox.rb +5 -5
  35. data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
  36. data/lib/active_merchant/billing/gateways/cashnet.rb +1 -1
  37. data/lib/active_merchant/billing/gateways/cecabank.rb +1 -1
  38. data/lib/active_merchant/billing/gateways/cenpos.rb +13 -13
  39. data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
  40. data/lib/active_merchant/billing/gateways/checkout_v2.rb +3 -3
  41. data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
  42. data/lib/active_merchant/billing/gateways/clearhaus.rb +3 -3
  43. data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
  44. data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
  45. data/lib/active_merchant/billing/gateways/creditcall.rb +1 -1
  46. data/lib/active_merchant/billing/gateways/credorax.rb +13 -3
  47. data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
  48. data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
  49. data/lib/active_merchant/billing/gateways/cyber_source.rb +66 -20
  50. data/lib/active_merchant/billing/gateways/d_local.rb +7 -3
  51. data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
  52. data/lib/active_merchant/billing/gateways/decidir.rb +1 -1
  53. data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
  54. data/lib/active_merchant/billing/gateways/digitzs.rb +3 -3
  55. data/lib/active_merchant/billing/gateways/ebanx.rb +4 -4
  56. data/lib/active_merchant/billing/gateways/efsnet.rb +3 -3
  57. data/lib/active_merchant/billing/gateways/elavon.rb +1 -1
  58. data/lib/active_merchant/billing/gateways/element.rb +7 -3
  59. data/lib/active_merchant/billing/gateways/epay.rb +3 -3
  60. data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
  61. data/lib/active_merchant/billing/gateways/eway.rb +1 -1
  62. data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
  63. data/lib/active_merchant/billing/gateways/eway_rapid.rb +4 -4
  64. data/lib/active_merchant/billing/gateways/exact.rb +3 -3
  65. data/lib/active_merchant/billing/gateways/ezic.rb +2 -2
  66. data/lib/active_merchant/billing/gateways/fat_zebra.rb +9 -7
  67. data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -1
  68. data/lib/active_merchant/billing/gateways/finansbank.rb +2 -2
  69. data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
  70. data/lib/active_merchant/billing/gateways/first_pay.rb +1 -1
  71. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +4 -4
  72. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +11 -3
  73. data/lib/active_merchant/billing/gateways/flo2cash.rb +11 -11
  74. data/lib/active_merchant/billing/gateways/forte.rb +2 -2
  75. data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
  76. data/lib/active_merchant/billing/gateways/global_collect.rb +10 -5
  77. data/lib/active_merchant/billing/gateways/global_transport.rb +1 -1
  78. data/lib/active_merchant/billing/gateways/hdfc.rb +10 -10
  79. data/lib/active_merchant/billing/gateways/hps.rb +10 -7
  80. data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
  81. data/lib/active_merchant/billing/gateways/inspire.rb +1 -1
  82. data/lib/active_merchant/billing/gateways/instapay.rb +1 -1
  83. data/lib/active_merchant/billing/gateways/ipp.rb +3 -3
  84. data/lib/active_merchant/billing/gateways/iridium.rb +5 -5
  85. data/lib/active_merchant/billing/gateways/itransact.rb +1 -1
  86. data/lib/active_merchant/billing/gateways/iveri.rb +2 -2
  87. data/lib/active_merchant/billing/gateways/ixopay.rb +1 -1
  88. data/lib/active_merchant/billing/gateways/jetpay.rb +2 -2
  89. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +2 -2
  90. data/lib/active_merchant/billing/gateways/komoju.rb +1 -1
  91. data/lib/active_merchant/billing/gateways/kushki.rb +4 -4
  92. data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
  93. data/lib/active_merchant/billing/gateways/linkpoint.rb +3 -3
  94. data/lib/active_merchant/billing/gateways/litle.rb +5 -5
  95. data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
  96. data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
  97. data/lib/active_merchant/billing/gateways/mercado_pago.rb +12 -7
  98. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -1
  99. data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
  100. data/lib/active_merchant/billing/gateways/merchant_partners.rb +1 -1
  101. data/lib/active_merchant/billing/gateways/merchant_ware.rb +1 -1
  102. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +1 -1
  103. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +2 -2
  104. data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
  105. data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -1
  106. data/lib/active_merchant/billing/gateways/micropayment.rb +2 -2
  107. data/lib/active_merchant/billing/gateways/migs.rb +1 -1
  108. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +1 -1
  109. data/lib/active_merchant/billing/gateways/monei.rb +2 -2
  110. data/lib/active_merchant/billing/gateways/moneris.rb +17 -17
  111. data/lib/active_merchant/billing/gateways/money_movers.rb +1 -1
  112. data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
  113. data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -2
  114. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
  115. data/lib/active_merchant/billing/gateways/net_registry.rb +2 -2
  116. data/lib/active_merchant/billing/gateways/netaxept.rb +2 -2
  117. data/lib/active_merchant/billing/gateways/netbanx.rb +53 -23
  118. data/lib/active_merchant/billing/gateways/netbilling.rb +2 -2
  119. data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
  120. data/lib/active_merchant/billing/gateways/network_merchants.rb +1 -1
  121. data/lib/active_merchant/billing/gateways/nmi.rb +4 -4
  122. data/lib/active_merchant/billing/gateways/ogone.rb +2 -2
  123. data/lib/active_merchant/billing/gateways/omise.rb +1 -1
  124. data/lib/active_merchant/billing/gateways/openpay.rb +2 -2
  125. data/lib/active_merchant/billing/gateways/opp.rb +4 -4
  126. data/lib/active_merchant/billing/gateways/optimal_payment.rb +5 -5
  127. data/lib/active_merchant/billing/gateways/orbital.rb +14 -7
  128. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
  129. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
  130. data/lib/active_merchant/billing/gateways/pagarme.rb +3 -3
  131. data/lib/active_merchant/billing/gateways/pago_facil.rb +1 -1
  132. data/lib/active_merchant/billing/gateways/pay_conex.rb +1 -1
  133. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +2 -2
  134. data/lib/active_merchant/billing/gateways/pay_hub.rb +1 -1
  135. data/lib/active_merchant/billing/gateways/pay_junction.rb +5 -5
  136. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +2 -2
  137. data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
  138. data/lib/active_merchant/billing/gateways/paybox_direct.rb +3 -3
  139. data/lib/active_merchant/billing/gateways/payeezy.rb +5 -5
  140. data/lib/active_merchant/billing/gateways/payex.rb +18 -18
  141. data/lib/active_merchant/billing/gateways/payflow.rb +8 -5
  142. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +2 -2
  143. data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
  144. data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -1
  145. data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
  146. data/lib/active_merchant/billing/gateways/paymentez.rb +1 -1
  147. data/lib/active_merchant/billing/gateways/paymill.rb +4 -4
  148. data/lib/active_merchant/billing/gateways/paypal.rb +2 -2
  149. data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
  150. data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
  151. data/lib/active_merchant/billing/gateways/paystation.rb +1 -1
  152. data/lib/active_merchant/billing/gateways/payu_in.rb +1 -1
  153. data/lib/active_merchant/billing/gateways/payu_latam.rb +10 -8
  154. data/lib/active_merchant/billing/gateways/payway.rb +1 -1
  155. data/lib/active_merchant/billing/gateways/pin.rb +1 -1
  156. data/lib/active_merchant/billing/gateways/plugnpay.rb +6 -6
  157. data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
  158. data/lib/active_merchant/billing/gateways/psigate.rb +2 -2
  159. data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
  160. data/lib/active_merchant/billing/gateways/qbms.rb +4 -4
  161. data/lib/active_merchant/billing/gateways/quantum.rb +3 -3
  162. data/lib/active_merchant/billing/gateways/quickbooks.rb +9 -8
  163. data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +3 -3
  164. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +4 -4
  165. data/lib/active_merchant/billing/gateways/qvalent.rb +2 -2
  166. data/lib/active_merchant/billing/gateways/realex.rb +2 -1
  167. data/lib/active_merchant/billing/gateways/redsys.rb +7 -7
  168. data/lib/active_merchant/billing/gateways/s5.rb +1 -1
  169. data/lib/active_merchant/billing/gateways/safe_charge.rb +2 -2
  170. data/lib/active_merchant/billing/gateways/sage.rb +3 -3
  171. data/lib/active_merchant/billing/gateways/sage_pay.rb +7 -7
  172. data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -1
  173. data/lib/active_merchant/billing/gateways/secure_net.rb +1 -1
  174. data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
  175. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -2
  176. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
  177. data/lib/active_merchant/billing/gateways/securion_pay.rb +1 -1
  178. data/lib/active_merchant/billing/gateways/skip_jack.rb +6 -6
  179. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
  180. data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
  181. data/lib/active_merchant/billing/gateways/stripe.rb +8 -8
  182. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +20 -1
  183. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
  184. data/lib/active_merchant/billing/gateways/telr.rb +5 -5
  185. data/lib/active_merchant/billing/gateways/tns.rb +1 -1
  186. data/lib/active_merchant/billing/gateways/trans_first.rb +3 -3
  187. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +3 -3
  188. data/lib/active_merchant/billing/gateways/transact_pro.rb +1 -1
  189. data/lib/active_merchant/billing/gateways/transax.rb +1 -1
  190. data/lib/active_merchant/billing/gateways/trexle.rb +1 -1
  191. data/lib/active_merchant/billing/gateways/trust_commerce.rb +12 -12
  192. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +10 -10
  193. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +2 -2
  194. data/lib/active_merchant/billing/gateways/vanco.rb +1 -1
  195. data/lib/active_merchant/billing/gateways/verifi.rb +3 -3
  196. data/lib/active_merchant/billing/gateways/viaklix.rb +1 -1
  197. data/lib/active_merchant/billing/gateways/visanet_peru.rb +3 -3
  198. data/lib/active_merchant/billing/gateways/webpay.rb +1 -1
  199. data/lib/active_merchant/billing/gateways/wepay.rb +2 -2
  200. data/lib/active_merchant/billing/gateways/wirecard.rb +1 -1
  201. data/lib/active_merchant/billing/gateways/world_net.rb +35 -35
  202. data/lib/active_merchant/billing/gateways/worldpay.rb +6 -6
  203. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
  204. data/lib/active_merchant/billing/gateways/worldpay_us.rb +3 -3
  205. data/lib/active_merchant/version.rb +1 -1
  206. data/lib/support/gateway_support.rb +1 -1
  207. metadata +45 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11b837a742d2fd39e941f6aa861b3c3557fe2ddb6142b2e119c48d22e7b39749
4
- data.tar.gz: 3aa9e72328ca32c4e84c2919dc61f3b58350d806f49fe2ea342fc9acb19a8056
3
+ metadata.gz: e55d83260a0ec7b9a824a6313782d8c2b086d55aeb33d99554a09a18836f40a5
4
+ data.tar.gz: 35b24d3dd8e61c096ec4f5ef5d241a5ae3f905f32ba159e4332be36942cd3c56
5
5
  SHA512:
6
- metadata.gz: c5454b152692725df9ee05bf8cfc202642ca7fb535950996d5c521c76788f0bec214f707596293185fac78d38785ef1a53924f3b99fd38137f09014c4339d92d
7
- data.tar.gz: d724f10b88a939d856454396e0a1b9a80d975fd40d0fe2db4e8a8c0da7cdc434f4fe8c2117f86e16acb40479295d8ba766a691e6accf059973e6af1359b26387
6
+ metadata.gz: 337249552ee4b5fd33ff2ca257cfcc90265e9aff657b5c42f42563aae070fd583308f5e6cfe05ed5ba1d23a791bac04edf50d0b8afce796c051d36f0b0dca256
7
+ data.tar.gz: d21728f2c2448e36842ccf5c38d64bf21ace79bd61ddf37367cf08f62ec98d33e0e277d5c5d21adb32ae7db4b03b15fa8e9f6d18b3acdf2be46ac153141585da
data/CHANGELOG CHANGED
@@ -2,6 +2,75 @@
2
2
 
3
3
  == HEAD
4
4
 
5
+ == Version 1.113.0
6
+ * Orbital: Add cardIndicators field [meagabeth] #3734
7
+ * Openpay: Add Colombia to supported countries [molbrown] #3740
8
+ * Mercado Pago: Update Device Id Header field [cdmackeyfree] #3741
9
+ * RuboCop: Fix Style/TrailingCommaInHashLiteral [leila-alderman] #3718
10
+ * RuboCop: Fix Naming/PredicateName [leila-alderman] #3724
11
+ * RuboCop: Fix Style/Attr [leila-alderman] #3728
12
+ * Payflow: Use application_id to set buttonsource [britth] #3737
13
+ * HPS: Enable refunds using capture transaction [britth] #3738
14
+ * Quickbooks: Omit empty strings in address [leila-alderman] #3743
15
+ * BlueSnap: Add transactionMetaData support #3745
16
+ * Orbital: Fix typo in PC3DtlLineTot field [naashton] #3736
17
+ * Credorax: Send first and last name parameters for CFT transactions [britth] #3748
18
+ * Orbital: Update CardIndicators field to fix bug [meagabeth] #3746
19
+ * CyberSource: Always send default address [leila-alderman] #3747
20
+ * Netbanx: Reject partial refund on pending status [rockyhakjoong] #3735
21
+
22
+ == Version 1.112.0
23
+ * Cybersource: add `maestro` and `diners_club` eci brand mapping [bbraschi] #3708
24
+ * Cybersource: Ensure Partner Solution Id placement conforms to schema [britth] #3715
25
+ * Adyen: Adyen: Pass `subMerchantId` as `additionalData` [naashton] #3714
26
+ * Litle: Omit checkNum when nil [leila-alderman] #3719
27
+ * PayU Latam: Improve error response [esmitperez] #3717
28
+ * Vantiv: Vantiv Express - CardPresentCode, PaymentType, SubmissionType, DuplicateCheckDisableFlag [esmitperez] #3730,#3731
29
+ * Cybersource: Ensure issueradditionaldata comes before partnerSolutionId [britth] #3733
30
+
31
+ == Version 1.111.0
32
+ * Fat Zebra: standardized 3DS fields and card on file extra data for Visa scheme rules [montdidier] #3409
33
+ * Realex: Change 3DSecure v1 message_version to a valid format [shuhala] #3702
34
+ * Ingenico/ GlobalCollect: Add field for installments [cdmackeyfree] #3707
35
+ * Cybersource: do not send 3DS fields if 'cavv` is missing and `commerceIndicator` is inferred [bbraschi] #3712
36
+
37
+ == Version 1.110.0
38
+ * FirstData e4 v27+: Strip linebreaks from address [curiousepic] #3693
39
+ * Adyen: Change shopper_email to email and shopper_ip to ip [rikterbeek] #3675
40
+ * FirstData e4 v27+ Fix strip_line_breaks method [carrigan] #3695
41
+ * Cybersource: Set authorization on the response even when in fraud review [pi3r] #3701
42
+ * Cybersource: Add fields to override stored creds [leila-alderman] #3689
43
+ * Cybersource: Conditionally find stored credentials [therufs] #3696 #3697
44
+ * Cybersource: Update logic to send cavv as xid for 3DS2 [douglas] #3699
45
+ * Credorax: Default 3ds_browsercolordepth to 32 when passed as 30 [britth] #3700
46
+
47
+ == Version 1.109.0
48
+ * Remove reference to `Billing::Integrations` [pi3r] #3692
49
+ * DLocal: Handle nil address1 [molbrown] #3661
50
+ * Braintree: Add travel and lodging fields [leila-alderman] #3668
51
+ * Stripe: strict_encode64 api key [britth] #3672
52
+ * Stripe PI: Implement verify action [leila-alderman] #3662
53
+ * Stripe, Stripe Payment Intents: Update supported countries [britth] #3684
54
+ * Forte: Use underscore for unused arguments in test [wsmoak] #3605
55
+ * Add Alia card type [therufs] #3673
56
+ * Element: Fix unit tests [leila-alderman] #3676
57
+ * PayU Latam: Fix store method [ccarruitero] #2590
58
+ * Adyen: Allow for executeThreeD to be passed as false [naashton] #3681
59
+ * WorldPay: Fix handling of `state` field for 3DS transactions [chinhle23] #3687
60
+ * Alia: Skip Luhn validation [therufs] #3673
61
+ * Diners Club: support 16 digit card numbers [therufs] #3682
62
+ * Cybersource: Update supported countries [britth] #3683
63
+ * Cybersource: pass reconciliation_id [therufs] #3688
64
+ * RuboCop: Fix Style/SpecialGlobalVars [leila-alderman] #3669
65
+ * RuboCop: Fix Style/StringLiteralsInInterpolation [leila-alderman] #3670
66
+ * RuboCop: Fix Layout/HeredocIndentation [leila-alderman] #3685
67
+ * RuboCop: Fix Gemspec/OrderedDependencies [leila-alderman] #3679
68
+ * RuboCop: Fix Style/TrailingUnderscoreVariable [leila-alderman] #3663
69
+ * RuboCop: Fix Style/WordArray [leila-alderman] #3664
70
+ * RuboCop: Fix Style/SymbolArray [leila-alderman] #3665
71
+ * Mercado-Pago: Notification url GSF [cdmackeyfree] #3678
72
+ * Credorax: Update logic for setting 3ds_homephonecountry [britth] #3691
73
+
5
74
  == Version 1.108.0 (Jun 9, 2020)
6
75
  * Cybersource: Send cavv as xid is xid is missing [pi3r] #3658
7
76
  * Forte: Change default sec_code value to PPD [molbrown] #3653
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Active Merchant
2
- [![Build Status](https://travis-ci.org/activemerchant/active_merchant.png?branch=master)](https://travis-ci.org/activemerchant/active_merchant)
3
- [![Code Climate](https://codeclimate.com/github/activemerchant/active_merchant.png)](https://codeclimate.com/github/activemerchant/active_merchant)
2
+ [![Build Status](https://travis-ci.org/activemerchant/active_merchant.svg?branch=master)](https://travis-ci.org/activemerchant/active_merchant)
3
+ [![Code Climate](https://codeclimate.com/github/activemerchant/active_merchant.svg)](https://codeclimate.com/github/activemerchant/active_merchant)
4
4
 
5
5
  Active Merchant is an extraction from the ecommerce system [Shopify](http://www.shopify.com).
6
6
  Shopify's requirements for a simple and unified API to access dozens of different payment
@@ -39,19 +39,6 @@ module ActiveMerchant #:nodoc:
39
39
  end
40
40
  end
41
41
 
42
- # Return the matching integration module
43
- # You can then get the notification from the module
44
- # * <tt>bogus</tt>: Bogus - Does nothing (for testing)
45
- # * <tt>chronopay</tt>: Chronopay
46
- # * <tt>paypal</tt>: Paypal
47
- #
48
- # chronopay = ActiveMerchant::Billing::Base.integration('chronopay')
49
- # notification = chronopay.notification(raw_post)
50
- #
51
- def self.integration(name)
52
- Billing::Integrations.const_get(name.to_s.downcase.camelize)
53
- end
54
-
55
42
  # A check to see if we're in test mode
56
43
  def self.test?
57
44
  mode == :test
@@ -29,7 +29,7 @@ module ActiveMerchant #:nodoc:
29
29
  def validate
30
30
  errors = []
31
31
 
32
- [:name, :routing_number, :account_number].each do |attr|
32
+ %i[name routing_number account_number].each do |attr|
33
33
  errors << [attr, 'cannot be empty'] if empty?(self.send(attr))
34
34
  end
35
35
 
@@ -23,6 +23,7 @@ module ActiveMerchant #:nodoc:
23
23
  # * Cabal
24
24
  # * Naranja
25
25
  # * UnionPay
26
+ # * Alia
26
27
  #
27
28
  # For testing purposes, use the 'bogus' credit card brand. This skips the vast majority of
28
29
  # validations, allowing you to focus on your core concerns until you're ready to be more concerned
@@ -98,6 +99,7 @@ module ActiveMerchant #:nodoc:
98
99
  # * +'cabal'+
99
100
  # * +'naranja'+
100
101
  # * +'union_pay'+
102
+ # * +'alia'+
101
103
  #
102
104
  # Or, if you wish to test your implementation, +'bogus'+.
103
105
  #
@@ -188,7 +190,7 @@ module ActiveMerchant #:nodoc:
188
190
  'contactless' => 'Data was read by a Contactless EMV kernel. Issuer script results are not available.',
189
191
  'contactless_magstripe' => 'Contactless data was read with a non-EMV protocol.',
190
192
  'contact' => 'Data was read using the EMV protocol. Issuer script results may follow.',
191
- 'contact_quickchip' => 'Data was read by the Quickchip EMV kernel. Issuer script results are not available.',
193
+ 'contact_quickchip' => 'Data was read by the Quickchip EMV kernel. Issuer script results are not available.'
192
194
  }
193
195
 
194
196
  # Returns the ciphertext of the card's encrypted PIN.
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
10
10
  'discover' => ->(num) { num =~ /^(6011|65\d{2}|64[4-9]\d)\d{12,15}|(62\d{14,17})$/ },
11
11
  'american_express' => ->(num) { num =~ /^3[47]\d{13}$/ },
12
12
  'naranja' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 6), NARANJA_RANGES) },
13
- 'diners_club' => ->(num) { num =~ /^3(0[0-5]|[68]\d)\d{11}$/ },
13
+ 'diners_club' => ->(num) { num =~ /^3(0[0-5]|[68]\d)\d{11,16}$/ },
14
14
  'jcb' => ->(num) { num =~ /^35(28|29|[3-8]\d)\d{12}$/ },
15
15
  'dankort' => ->(num) { num =~ /^5019\d{12}$/ },
16
16
  'maestro' => lambda { |num|
@@ -21,6 +21,7 @@ module ActiveMerchant #:nodoc:
21
21
  },
22
22
  'forbrugsforeningen' => ->(num) { num =~ /^600722\d{10}$/ },
23
23
  'sodexo' => ->(num) { num =~ /^(606071|603389|606070|606069|606068|600818)\d{10}$/ },
24
+ 'alia' => ->(num) { num =~ /^(504997|505878|601030|601073|505874)\d{10}$/ },
24
25
  'vr' => ->(num) { num =~ /^(627416|637036)\d{10}$/ },
25
26
  'cabal' => ->(num) { num&.size == 16 && in_bin_range?(num.slice(0, 8), CABAL_RANGES) },
26
27
  'unionpay' => ->(num) { (16..19).cover?(num&.size) && in_bin_range?(num.slice(0, 8), UNIONPAY_RANGES) },
@@ -57,10 +58,10 @@ module ActiveMerchant #:nodoc:
57
58
  ]
58
59
 
59
60
  CARNET_BINS = Set.new(
60
- [
61
- '286900', '502275', '606333', '627535', '636318', '636379', '639388',
62
- '639484', '639559', '50633601', '50633606', '58877274', '62753500',
63
- '60462203', '60462204', '588772'
61
+ %w[
62
+ 286900 502275 606333 627535 636318 636379 639388
63
+ 639484 639559 50633601 50633606 58877274 62753500
64
+ 60462203 60462204 588772
64
65
  ]
65
66
  )
66
67
 
@@ -71,7 +72,7 @@ module ActiveMerchant #:nodoc:
71
72
  ]
72
73
 
73
74
  MAESTRO_BINS = Set.new(
74
- ['500033', '581149']
75
+ %w[500033 581149]
75
76
  )
76
77
 
77
78
  # https://www.mastercard.us/content/dam/mccom/global/documents/mastercard-rules.pdf, page 73
@@ -297,6 +298,8 @@ module ActiveMerchant #:nodoc:
297
298
  case brand
298
299
  when 'naranja'
299
300
  valid_naranja_algo?(numbers)
301
+ when 'alia'
302
+ true
300
303
  else
301
304
  valid_luhn?(numbers)
302
305
  end
@@ -326,7 +329,7 @@ module ActiveMerchant #:nodoc:
326
329
  54 => 3, # 6 * 2 - 9
327
330
  55 => 5, # etc ...
328
331
  56 => 7,
329
- 57 => 9,
332
+ 57 => 9
330
333
  }.freeze
331
334
 
332
335
  # Checks the validity of a card number by use of the Luhn Algorithm.
@@ -95,7 +95,7 @@ module ActiveMerchant #:nodoc:
95
95
  pickup_card: 'pick_up_card',
96
96
  config_error: 'config_error',
97
97
  test_mode_live_card: 'test_mode_live_card',
98
- unsupported_feature: 'unsupported_feature',
98
+ unsupported_feature: 'unsupported_feature'
99
99
  }
100
100
 
101
101
  cattr_reader :implementations
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
9
9
  self.supported_countries = %w(AT AU BE BG BR CH CY CZ DE DK EE ES FI FR GB GI GR HK HU IE IS IT LI LT LU LV MC MT MX NL NO PL PT RO SE SG SK SI US)
10
10
  self.default_currency = 'USD'
11
11
  self.currencies_without_fractions = %w(CVE DJF GNF IDR JPY KMF KRW PYG RWF UGX VND VUV XAF XOF XPF)
12
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :jcb, :dankort, :maestro, :discover, :elo, :naranja, :cabal, :unionpay]
12
+ self.supported_cardtypes = %i[visa master american_express diners_club jcb dankort maestro discover elo naranja cabal unionpay]
13
13
 
14
14
  self.money_format = :cents
15
15
 
@@ -26,7 +26,7 @@ module ActiveMerchant #:nodoc:
26
26
  '132' => STANDARD_ERROR_CODE[:incorrect_address],
27
27
  '133' => STANDARD_ERROR_CODE[:incorrect_address],
28
28
  '134' => STANDARD_ERROR_CODE[:incorrect_address],
29
- '135' => STANDARD_ERROR_CODE[:incorrect_address],
29
+ '135' => STANDARD_ERROR_CODE[:incorrect_address]
30
30
  }
31
31
 
32
32
  def initialize(options={})
@@ -196,9 +196,6 @@ module ActiveMerchant #:nodoc:
196
196
 
197
197
  def add_extra_data(post, payment, options)
198
198
  post[:telephoneNumber] = options[:billing_address][:phone] if options.dig(:billing_address, :phone)
199
- post[:shopperEmail] = options[:shopper_email] if options[:shopper_email]
200
- post[:shopperIP] = options[:shopper_ip] if options[:shopper_ip]
201
- post[:shopperStatement] = options[:shopper_statement] if options[:shopper_statement]
202
199
  post[:fraudOffset] = options[:fraud_offset] if options[:fraud_offset]
203
200
  post[:selectedBrand] = options[:selected_brand] if options[:selected_brand]
204
201
  post[:selectedBrand] ||= NETWORK_TOKENIZATION_CARD_SOURCE[payment.source.to_s] if payment.is_a?(NetworkTokenizationCreditCard)
@@ -212,11 +209,25 @@ module ActiveMerchant #:nodoc:
212
209
  post[:additionalData][:authorisationType] = options[:authorisation_type] if options[:authorisation_type]
213
210
  post[:additionalData][:adjustAuthorisationData] = options[:adjust_authorisation_data] if options[:adjust_authorisation_data]
214
211
  post[:additionalData][:industryUsage] = options[:industry_usage] if options[:industry_usage]
215
- post[:additionalData][:updateShopperStatement] = options[:update_shopper_statement] if options[:update_shopper_statement]
216
212
  post[:additionalData][:RequestedTestAcquirerResponseCode] = options[:requested_test_acquirer_response_code] if options[:requested_test_acquirer_response_code] && test?
217
213
  post[:deviceFingerprint] = options[:device_fingerprint] if options[:device_fingerprint]
214
+ add_shopper_data(post, options)
218
215
  add_risk_data(post, options)
219
216
  add_shopper_reference(post, options)
217
+ add_merchant_data(post, options)
218
+ end
219
+
220
+ def add_shopper_data(post, options)
221
+ post[:shopperEmail] = options[:email] if options[:email]
222
+ post[:shopperEmail] = options[:shopper_email] if options[:shopper_email]
223
+ post[:shopperIP] = options[:ip] if options[:ip]
224
+ post[:shopperIP] = options[:shopper_ip] if options[:shopper_ip]
225
+ post[:shopperStatement] = options[:shopper_statement] if options[:shopper_statement]
226
+ post[:additionalData][:updateShopperStatement] = options[:update_shopper_statement] if options[:update_shopper_statement]
227
+ end
228
+
229
+ def add_merchant_data(post, options)
230
+ post[:additionalData][:subMerchantId] = options[:sub_merchant_id] if options[:sub_merchant_id]
220
231
  end
221
232
 
222
233
  def add_risk_data(post, options)
@@ -232,7 +243,7 @@ module ActiveMerchant #:nodoc:
232
243
  splits = []
233
244
  split_data.each do |split|
234
245
  amount = {
235
- value: split['amount']['value'],
246
+ value: split['amount']['value']
236
247
  }
237
248
  amount[:currency] = split['amount']['currency'] if split['amount']['currency']
238
249
 
@@ -366,12 +377,12 @@ module ActiveMerchant #:nodoc:
366
377
  end
367
378
 
368
379
  def add_reference(post, authorization, options = {})
369
- _, psp_reference, _ = authorization.split('#')
380
+ _, psp_reference, = authorization.split('#')
370
381
  post[:originalReference] = single_reference(authorization) || psp_reference
371
382
  end
372
383
 
373
384
  def add_original_reference(post, authorization, options = {})
374
- original_psp_reference, _, _ = authorization.split('#')
385
+ original_psp_reference, = authorization.split('#')
375
386
  post[:originalReference] = single_reference(authorization) || original_psp_reference
376
387
  end
377
388
 
@@ -418,10 +429,10 @@ module ActiveMerchant #:nodoc:
418
429
  post[:additionalData][:scaExemption] = options[:sca_exemption] if options[:sca_exemption]
419
430
  end
420
431
  else
421
- return unless options[:execute_threed] || options[:threed_dynamic]
432
+ return unless !options[:execute_threed].nil? || !options[:threed_dynamic].nil?
422
433
 
423
- post[:browserInfo] = { userAgent: options[:user_agent], acceptHeader: options[:accept_header] }
424
- post[:additionalData] = { executeThreeD: 'true' } if options[:execute_threed]
434
+ post[:browserInfo] = { userAgent: options[:user_agent], acceptHeader: options[:accept_header] } if options[:execute_threed] || options[:threed_dynamic]
435
+ post[:additionalData] = { executeThreeD: options[:execute_threed] } if !options[:execute_threed].nil?
425
436
  end
426
437
  end
427
438
 
@@ -527,14 +538,14 @@ module ActiveMerchant #:nodoc:
527
538
  end
528
539
 
529
540
  def success_from(action, response, options)
530
- if ['RedirectShopper', 'ChallengeShopper'].include?(response.dig('resultCode')) && !options[:execute_threed] && !options[:threed_dynamic]
541
+ if %w[RedirectShopper ChallengeShopper].include?(response.dig('resultCode')) && !options[:execute_threed] && !options[:threed_dynamic]
531
542
  response['refusalReason'] = 'Received unexpected 3DS authentication response. Use the execute_threed and/or threed_dynamic options to initiate a proper 3DS flow.'
532
543
  return false
533
544
  end
534
545
 
535
546
  case action.to_s
536
547
  when 'authorise', 'authorise3d'
537
- ['Authorised', 'Received', 'RedirectShopper'].include?(response['resultCode'])
548
+ %w[Authorised Received RedirectShopper].include?(response['resultCode'])
538
549
  when 'capture', 'refund', 'cancel'
539
550
  response['response'] == "[#{action}-received]"
540
551
  when 'adjustAuthorisation'
@@ -9,8 +9,8 @@ module ActiveMerchant #:nodoc:
9
9
  self.supported_countries = ['US']
10
10
  self.default_currency = 'USD'
11
11
  self.money_format = :dollars
12
- self.supported_cardtypes = [:visa, :master, :american_express, :discover,
13
- :diners_club, :jcb, :maestro]
12
+ self.supported_cardtypes = %i[visa master american_express discover
13
+ diners_club jcb maestro]
14
14
 
15
15
  def initialize(options={})
16
16
  requires!(options, :site_id, :merchant_id, :token)
@@ -11,7 +11,7 @@ module ActiveMerchant
11
11
  self.supported_countries = %w(AU CA US)
12
12
  self.default_currency = 'USD'
13
13
  self.money_format = :dollars
14
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb, :maestro]
14
+ self.supported_cardtypes = %i[visa master american_express discover diners_club jcb maestro]
15
15
 
16
16
  self.homepage_url = 'http://www.authorize.net/'
17
17
  self.display_name = 'Authorize.Net'
@@ -54,7 +54,7 @@ module ActiveMerchant
54
54
  '37' => STANDARD_ERROR_CODE[:invalid_expiry_date],
55
55
  '378' => STANDARD_ERROR_CODE[:invalid_cvc],
56
56
  '38' => STANDARD_ERROR_CODE[:expired_card],
57
- '384' => STANDARD_ERROR_CODE[:config_error],
57
+ '384' => STANDARD_ERROR_CODE[:config_error]
58
58
  }
59
59
 
60
60
  MARKET_TYPE = {
@@ -192,7 +192,7 @@ module ActiveMerchant
192
192
  end
193
193
 
194
194
  def unstore(authorization)
195
- customer_profile_id, _, _ = split_authorization(authorization)
195
+ customer_profile_id, = split_authorization(authorization)
196
196
 
197
197
  delete_customer_profile(customer_profile_id)
198
198
  end
@@ -311,7 +311,7 @@ module ActiveMerchant
311
311
  end
312
312
 
313
313
  def cim_refund(amount, authorization, options)
314
- transaction_id, card_number, _ = split_authorization(authorization)
314
+ transaction_id, card_number, = split_authorization(authorization)
315
315
 
316
316
  commit(:cim_refund, options) do |xml|
317
317
  add_order_id(xml, options)
@@ -331,7 +331,7 @@ module ActiveMerchant
331
331
  end
332
332
 
333
333
  def normal_refund(amount, authorization, options)
334
- transaction_id, card_number, _ = split_authorization(authorization)
334
+ transaction_id, card_number, = split_authorization(authorization)
335
335
 
336
336
  commit(:refund) do |xml|
337
337
  xml.transactionRequest do
@@ -500,7 +500,7 @@ module ActiveMerchant
500
500
  end
501
501
 
502
502
  def add_token_payment_method(xml, token, options)
503
- customer_profile_id, customer_payment_profile_id, _ = split_authorization(token)
503
+ customer_profile_id, customer_payment_profile_id, = split_authorization(token)
504
504
  customer_profile_id = options[:customer_profile_id] if options[:customer_profile_id]
505
505
  customer_payment_profile_id = options[:customer_payment_profile_id] if options[:customer_payment_profile_id]
506
506
  xml.customerProfileId(customer_profile_id)
@@ -755,7 +755,7 @@ module ActiveMerchant
755
755
  end
756
756
 
757
757
  def state_from(address, options)
758
- if ['US', 'CA'].include?(address[:country])
758
+ if %w[US CA].include?(address[:country])
759
759
  address[:state] || 'NC'
760
760
  else
761
761
  address[:state] || 'n/a'
@@ -771,7 +771,7 @@ module ActiveMerchant
771
771
  end
772
772
 
773
773
  def parse(action, raw_response, options = {})
774
- if is_cim_action?(action) || action == :verify_credentials
774
+ if cim_action?(action) || action == :verify_credentials
775
775
  parse_cim(raw_response, options)
776
776
  else
777
777
  parse_normal(action, raw_response)
@@ -802,7 +802,7 @@ module ActiveMerchant
802
802
  end
803
803
  end
804
804
 
805
- def is_cim_action?(action)
805
+ def cim_action?(action)
806
806
  action.to_s.start_with?('cim')
807
807
  end
808
808
 
@@ -824,7 +824,7 @@ module ActiveMerchant
824
824
  'deleteCustomerProfileRequest'
825
825
  elsif action == :verify_credentials
826
826
  'authenticateTestRequest'
827
- elsif is_cim_action?(action)
827
+ elsif cim_action?(action)
828
828
  'createCustomerProfileTransactionRequest'
829
829
  else
830
830
  'createTransactionRequest'
@@ -988,7 +988,7 @@ module ActiveMerchant
988
988
  end
989
989
 
990
990
  def transaction_id_from(authorization)
991
- transaction_id, _, _ = split_authorization(authorization)
991
+ transaction_id, = split_authorization(authorization)
992
992
  transaction_id
993
993
  end
994
994
 
@@ -1006,7 +1006,7 @@ module ActiveMerchant
1006
1006
 
1007
1007
  def auth_was_for_cim?(authorization)
1008
1008
  _, _, action = split_authorization(authorization)
1009
- action && is_cim_action?(action)
1009
+ action && cim_action?(action)
1010
1010
  end
1011
1011
 
1012
1012
  def parse_direct_response_elements(response, options)
@@ -1059,7 +1059,7 @@ module ActiveMerchant
1059
1059
  card_type: parts[51] || '',
1060
1060
  split_tender_id: parts[52] || '',
1061
1061
  requested_amount: parts[53] || '',
1062
- balance_on_card: parts[54] || '',
1062
+ balance_on_card: parts[54] || ''
1063
1063
  }
1064
1064
  end
1065
1065
  end