activemerchant 1.79.2 → 1.129.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG +1391 -0
- data/README.md +29 -14
- data/lib/active_merchant/billing/avs_result.rb +25 -28
- data/lib/active_merchant/billing/base.rb +0 -13
- data/lib/active_merchant/billing/check.rb +55 -22
- data/lib/active_merchant/billing/compatibility.rb +10 -12
- data/lib/active_merchant/billing/credit_card.rb +82 -62
- data/lib/active_merchant/billing/credit_card_formatting.rb +4 -4
- data/lib/active_merchant/billing/credit_card_methods.rb +328 -58
- data/lib/active_merchant/billing/cvv_result.rb +0 -1
- data/lib/active_merchant/billing/gateway.rb +61 -56
- data/lib/active_merchant/billing/gateways/adyen.rb +562 -87
- data/lib/active_merchant/billing/gateways/airwallex.rb +370 -0
- data/lib/active_merchant/billing/gateways/alelo.rb +256 -0
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +35 -36
- data/lib/active_merchant/billing/gateways/authorize_net.rb +297 -196
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +31 -24
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +94 -98
- data/lib/active_merchant/billing/gateways/axcessms.rb +64 -66
- data/lib/active_merchant/billing/gateways/balanced.rb +72 -65
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +222 -0
- data/lib/active_merchant/billing/gateways/bank_frick.rb +16 -16
- data/lib/active_merchant/billing/gateways/banwire.rb +12 -12
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +140 -69
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +7 -7
- data/lib/active_merchant/billing/gateways/be2bill.rb +7 -7
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +115 -115
- data/lib/active_merchant/billing/gateways/beanstream.rb +39 -13
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +1 -2
- data/lib/active_merchant/billing/gateways/blue_pay.rb +87 -58
- data/lib/active_merchant/billing/gateways/blue_snap.rb +405 -104
- data/lib/active_merchant/billing/gateways/bogus.rb +34 -30
- data/lib/active_merchant/billing/gateways/borgun.rb +97 -47
- data/lib/active_merchant/billing/gateways/bpoint.rb +20 -20
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +9 -3
- data/lib/active_merchant/billing/gateways/braintree/token_nonce.rb +113 -0
- data/lib/active_merchant/billing/gateways/braintree.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +561 -259
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +1 -1
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +53 -54
- data/lib/active_merchant/billing/gateways/cams.rb +31 -31
- data/lib/active_merchant/billing/gateways/card_connect.rb +85 -33
- data/lib/active_merchant/billing/gateways/card_save.rb +7 -9
- data/lib/active_merchant/billing/gateways/card_stream.rb +187 -169
- data/lib/active_merchant/billing/gateways/cardknox.rb +24 -25
- data/lib/active_merchant/billing/gateways/cardprocess.rb +9 -7
- data/lib/active_merchant/billing/gateways/cashnet.rb +43 -27
- data/lib/active_merchant/billing/gateways/cc5.rb +14 -17
- data/lib/active_merchant/billing/gateways/cecabank.rb +62 -52
- data/lib/active_merchant/billing/gateways/cenpos.rb +63 -62
- data/lib/active_merchant/billing/gateways/checkout.rb +21 -23
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +391 -113
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -3
- data/lib/active_merchant/billing/gateways/clearhaus.rb +40 -41
- data/lib/active_merchant/billing/gateways/commerce_hub.rb +361 -0
- data/lib/active_merchant/billing/gateways/commercegate.rb +11 -12
- data/lib/active_merchant/billing/gateways/conekta.rb +35 -30
- data/lib/active_merchant/billing/gateways/creditcall.rb +59 -59
- data/lib/active_merchant/billing/gateways/credorax.rb +326 -145
- data/lib/active_merchant/billing/gateways/ct_payment.rb +269 -0
- data/lib/active_merchant/billing/gateways/culqi.rb +53 -53
- data/lib/active_merchant/billing/gateways/cyber_source/cyber_source_common.rb +36 -0
- data/lib/active_merchant/billing/gateways/cyber_source.rb +566 -208
- data/lib/active_merchant/billing/gateways/cyber_source_rest.rb +456 -0
- data/lib/active_merchant/billing/gateways/d_local.rb +342 -0
- data/lib/active_merchant/billing/gateways/data_cash.rb +40 -56
- data/lib/active_merchant/billing/gateways/decidir.rb +358 -0
- data/lib/active_merchant/billing/gateways/decidir_plus.rb +344 -0
- data/lib/active_merchant/billing/gateways/dibs.rb +34 -40
- data/lib/active_merchant/billing/gateways/digitzs.rb +48 -45
- data/lib/active_merchant/billing/gateways/ebanx.rb +110 -60
- data/lib/active_merchant/billing/gateways/efsnet.rb +46 -50
- data/lib/active_merchant/billing/gateways/elavon.rb +351 -189
- data/lib/active_merchant/billing/gateways/element.rb +106 -56
- data/lib/active_merchant/billing/gateways/epay.rb +74 -64
- data/lib/active_merchant/billing/gateways/evo_ca.rb +13 -14
- data/lib/active_merchant/billing/gateways/eway.rb +74 -73
- data/lib/active_merchant/billing/gateways/eway_managed.rb +85 -87
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +105 -60
- data/lib/active_merchant/billing/gateways/exact.rb +29 -37
- data/lib/active_merchant/billing/gateways/ezic.rb +21 -22
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +70 -48
- data/lib/active_merchant/billing/gateways/federated_canada.rb +11 -13
- data/lib/active_merchant/billing/gateways/finansbank.rb +3 -4
- data/lib/active_merchant/billing/gateways/first_giving.rb +23 -23
- data/lib/active_merchant/billing/gateways/first_pay.rb +33 -13
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +106 -105
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +505 -0
- data/lib/active_merchant/billing/gateways/flo2cash.rb +36 -36
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +2 -2
- data/lib/active_merchant/billing/gateways/forte.rb +70 -40
- data/lib/active_merchant/billing/gateways/garanti.rb +24 -31
- data/lib/active_merchant/billing/gateways/global_collect.rb +378 -154
- data/lib/active_merchant/billing/gateways/global_transport.rb +12 -13
- data/lib/active_merchant/billing/gateways/hdfc.rb +55 -57
- data/lib/active_merchant/billing/gateways/hps.rb +236 -69
- data/lib/active_merchant/billing/gateways/iats_payments.rb +61 -39
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/inspire.rb +41 -47
- data/lib/active_merchant/billing/gateways/instapay.rb +10 -14
- data/lib/active_merchant/billing/gateways/ipg.rb +420 -0
- data/lib/active_merchant/billing/gateways/ipp.rb +25 -24
- data/lib/active_merchant/billing/gateways/iridium.rb +243 -244
- data/lib/active_merchant/billing/gateways/itransact.rb +14 -14
- data/lib/active_merchant/billing/gateways/iveri.rb +73 -34
- data/lib/active_merchant/billing/gateways/ixopay.rb +320 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +145 -152
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +154 -159
- data/lib/active_merchant/billing/gateways/komoju.rb +16 -16
- data/lib/active_merchant/billing/gateways/kushki.rb +127 -57
- data/lib/active_merchant/billing/gateways/latitude19.rb +111 -115
- data/lib/active_merchant/billing/gateways/linkpoint.rb +82 -85
- data/lib/active_merchant/billing/gateways/litle.rb +247 -53
- data/lib/active_merchant/billing/gateways/mastercard.rb +41 -23
- data/lib/active_merchant/billing/gateways/maxipago.rb +5 -5
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +135 -49
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +62 -29
- data/lib/active_merchant/billing/gateways/merchant_one.rb +16 -20
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +40 -40
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +54 -60
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +42 -44
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +52 -14
- data/lib/active_merchant/billing/gateways/mercury.rb +47 -51
- data/lib/active_merchant/billing/gateways/metrics_global.rb +32 -42
- data/lib/active_merchant/billing/gateways/micropayment.rb +42 -45
- data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +7 -7
- data/lib/active_merchant/billing/gateways/migs.rb +45 -40
- data/lib/active_merchant/billing/gateways/mit.rb +260 -0
- data/lib/active_merchant/billing/gateways/modern_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +29 -31
- data/lib/active_merchant/billing/gateways/moka.rb +290 -0
- data/lib/active_merchant/billing/gateways/monei.rb +255 -138
- data/lib/active_merchant/billing/gateways/moneris.rb +226 -88
- data/lib/active_merchant/billing/gateways/money_movers.rb +11 -13
- data/lib/active_merchant/billing/gateways/mundipagg.rb +117 -43
- data/lib/active_merchant/billing/gateways/nab_transact.rb +28 -31
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +13 -15
- data/lib/active_merchant/billing/gateways/net_registry.rb +12 -12
- data/lib/active_merchant/billing/gateways/netaxept.rb +33 -34
- data/lib/active_merchant/billing/gateways/netbanx.rb +167 -80
- data/lib/active_merchant/billing/gateways/netbilling.rb +27 -30
- data/lib/active_merchant/billing/gateways/netpay.rb +10 -10
- data/lib/active_merchant/billing/gateways/network_merchants.rb +7 -11
- data/lib/active_merchant/billing/gateways/nmi.rb +134 -48
- data/lib/active_merchant/billing/gateways/ogone.rb +88 -58
- data/lib/active_merchant/billing/gateways/omise.rb +30 -31
- data/lib/active_merchant/billing/gateways/openpay.rb +45 -26
- data/lib/active_merchant/billing/gateways/opp.rb +166 -144
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +67 -64
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +5 -7
- data/lib/active_merchant/billing/gateways/orbital.rb +726 -382
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +26 -27
- data/lib/active_merchant/billing/gateways/pagarme.rb +47 -56
- data/lib/active_merchant/billing/gateways/pago_facil.rb +12 -14
- data/lib/active_merchant/billing/gateways/pay_arc.rb +392 -0
- data/lib/active_merchant/billing/gateways/pay_conex.rb +39 -40
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +65 -65
- data/lib/active_merchant/billing/gateways/pay_hub.rb +39 -39
- data/lib/active_merchant/billing/gateways/pay_junction.rb +37 -37
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +70 -54
- data/lib/active_merchant/billing/gateways/pay_secure.rb +15 -17
- data/lib/active_merchant/billing/gateways/pay_trace.rb +450 -0
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +71 -47
- data/lib/active_merchant/billing/gateways/payeezy.rb +159 -32
- data/lib/active_merchant/billing/gateways/payex.rb +39 -42
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +41 -36
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +11 -8
- data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +3 -3
- data/lib/active_merchant/billing/gateways/payflow.rb +178 -54
- data/lib/active_merchant/billing/gateways/payflow_express.rb +61 -65
- data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +0 -1
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -2
- data/lib/active_merchant/billing/gateways/payment_express.rb +66 -58
- data/lib/active_merchant/billing/gateways/paymentez.rb +114 -25
- data/lib/active_merchant/billing/gateways/paymill.rb +134 -133
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +2 -1
- data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +4 -0
- data/lib/active_merchant/billing/gateways/paypal.rb +27 -14
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_express.rb +5 -2
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/paysafe.rb +420 -0
- data/lib/active_merchant/billing/gateways/payscout.rb +10 -13
- data/lib/active_merchant/billing/gateways/paystation.rb +79 -82
- data/lib/active_merchant/billing/gateways/payu_in.rb +59 -58
- data/lib/active_merchant/billing/gateways/payu_latam.rb +139 -97
- data/lib/active_merchant/billing/gateways/payway.rb +27 -27
- data/lib/active_merchant/billing/gateways/payway_dot_com.rb +253 -0
- data/lib/active_merchant/billing/gateways/pin.rb +87 -34
- data/lib/active_merchant/billing/gateways/plexo.rb +308 -0
- data/lib/active_merchant/billing/gateways/plugnpay.rb +82 -82
- data/lib/active_merchant/billing/gateways/priority.rb +392 -0
- data/lib/active_merchant/billing/gateways/pro_pay.rb +139 -140
- data/lib/active_merchant/billing/gateways/psigate.rb +44 -44
- data/lib/active_merchant/billing/gateways/psl_card.rb +29 -37
- data/lib/active_merchant/billing/gateways/qbms.rb +75 -76
- data/lib/active_merchant/billing/gateways/quantum.rb +21 -23
- data/lib/active_merchant/billing/gateways/quickbooks.rb +142 -55
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +103 -107
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +156 -158
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +7 -8
- data/lib/active_merchant/billing/gateways/quickpay.rb +1 -3
- data/lib/active_merchant/billing/gateways/qvalent.rb +137 -68
- data/lib/active_merchant/billing/gateways/rapyd.rb +319 -0
- data/lib/active_merchant/billing/gateways/reach.rb +277 -0
- data/lib/active_merchant/billing/gateways/realex.rb +132 -50
- data/lib/active_merchant/billing/gateways/redsys.rb +382 -186
- data/lib/active_merchant/billing/gateways/s5.rb +16 -16
- data/lib/active_merchant/billing/gateways/safe_charge.rb +83 -47
- data/lib/active_merchant/billing/gateways/sage.rb +49 -48
- data/lib/active_merchant/billing/gateways/sage_pay.rb +76 -83
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +13 -15
- data/lib/active_merchant/billing/gateways/secure_net.rb +32 -40
- data/lib/active_merchant/billing/gateways/secure_pay.rb +30 -40
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +23 -26
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +14 -16
- data/lib/active_merchant/billing/gateways/securion_pay.rb +69 -31
- data/lib/active_merchant/billing/gateways/shift4.rb +342 -0
- data/lib/active_merchant/billing/gateways/simetrik.rb +368 -0
- data/lib/active_merchant/billing/gateways/skip_jack.rb +52 -53
- data/lib/active_merchant/billing/gateways/smart_ps.rb +51 -60
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +29 -29
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +66 -47
- data/lib/active_merchant/billing/gateways/stripe.rb +309 -148
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +556 -0
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +18 -23
- data/lib/active_merchant/billing/gateways/telr.rb +46 -48
- data/lib/active_merchant/billing/gateways/tns.rb +8 -7
- data/lib/active_merchant/billing/gateways/trans_first.rb +37 -37
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +249 -245
- data/lib/active_merchant/billing/gateways/transact_pro.rb +25 -27
- data/lib/active_merchant/billing/gateways/transax.rb +6 -8
- data/lib/active_merchant/billing/gateways/transnational.rb +1 -2
- data/lib/active_merchant/billing/gateways/trexle.rb +22 -18
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +161 -88
- data/lib/active_merchant/billing/gateways/usa_epay.rb +5 -6
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +231 -238
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +129 -55
- data/lib/active_merchant/billing/gateways/vanco.rb +42 -33
- data/lib/active_merchant/billing/gateways/verifi.rb +52 -53
- data/lib/active_merchant/billing/gateways/viaklix.rb +18 -22
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +115 -74
- data/lib/active_merchant/billing/gateways/vpos.rb +223 -0
- data/lib/active_merchant/billing/gateways/webpay.rb +9 -9
- data/lib/active_merchant/billing/gateways/wepay.rb +38 -41
- data/lib/active_merchant/billing/gateways/wirecard.rb +36 -37
- data/lib/active_merchant/billing/gateways/wompi.rb +197 -0
- data/lib/active_merchant/billing/gateways/world_net.rb +39 -38
- data/lib/active_merchant/billing/gateways/worldpay.rb +756 -142
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +73 -83
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +31 -31
- data/lib/active_merchant/billing/model.rb +2 -2
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +3 -3
- data/lib/active_merchant/billing/rails.rb +1 -1
- data/lib/active_merchant/billing/response.rb +32 -13
- data/lib/active_merchant/billing/three_d_secure_eci_mapper.rb +27 -0
- data/lib/active_merchant/billing.rb +1 -0
- data/lib/active_merchant/connection.rb +24 -38
- data/lib/active_merchant/country.rb +9 -5
- data/lib/active_merchant/errors.rb +4 -1
- data/lib/active_merchant/net_http_ssl_connection.rb +2 -0
- data/lib/active_merchant/network_connection_retries.rb +28 -31
- data/lib/active_merchant/post_data.rb +5 -3
- data/lib/active_merchant/posts_data.rb +5 -7
- data/lib/active_merchant/version.rb +1 -1
- data/lib/active_merchant.rb +3 -3
- data/lib/activemerchant.rb +1 -1
- data/lib/certs/cacert.pem +1592 -2329
- data/lib/support/gateway_support.rb +8 -10
- data/lib/support/ssl_verify.rb +9 -14
- data/lib/support/ssl_version.rb +9 -10
- metadata +98 -37
- data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +0 -246
- data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +0 -13
- data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +0 -29
- data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +0 -66
- data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -309
@@ -6,8 +6,8 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
|
7
7
|
self.money_format = :cents
|
8
8
|
self.default_currency = 'USD'
|
9
|
-
self.supported_countries = [
|
10
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_countries = %w[US CA]
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
11
11
|
|
12
12
|
self.homepage_url = 'http://www.jetpay.com'
|
13
13
|
self.display_name = 'JetPay'
|
@@ -15,137 +15,137 @@ module ActiveMerchant #:nodoc:
|
|
15
15
|
API_VERSION = '2.2'
|
16
16
|
|
17
17
|
ACTION_CODE_MESSAGES = {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
nil =>
|
18
|
+
'000' => 'Approved.',
|
19
|
+
'001' => 'Refer to card issuer.',
|
20
|
+
'002' => 'Refer to card issuer, special condition.',
|
21
|
+
'003' => 'Invalid merchant or service provider.',
|
22
|
+
'004' => 'Pick up card.',
|
23
|
+
'005' => 'Do not honor.',
|
24
|
+
'006' => 'Error.',
|
25
|
+
'007' => 'Pick up card, special condition.',
|
26
|
+
'008' => 'Honor with ID (Show ID).',
|
27
|
+
'010' => 'Partial approval.',
|
28
|
+
'011' => 'VIP approval.',
|
29
|
+
'012' => 'Invalid transaction.',
|
30
|
+
'013' => 'Invalid amount or exceeds maximum for card program.',
|
31
|
+
'014' => 'Invalid account number (no such number).',
|
32
|
+
'015' => 'No such issuer.',
|
33
|
+
'019' => 'Re-enter Transaction.',
|
34
|
+
'021' => 'No action taken (unable to back out prior transaction).',
|
35
|
+
'025' => 'Transaction Not Found.',
|
36
|
+
'027' => 'File update field edit error.',
|
37
|
+
'028' => 'File is temporarily unavailable.',
|
38
|
+
'030' => 'Format error.',
|
39
|
+
'039' => 'No credit account.',
|
40
|
+
'041' => 'Pick up card (lost card).',
|
41
|
+
'043' => 'Pick up card (stolen card).',
|
42
|
+
'051' => 'Insufficient funds.',
|
43
|
+
'052' => 'No checking account.',
|
44
|
+
'053' => 'No savings account.',
|
45
|
+
'054' => 'Expired Card.',
|
46
|
+
'055' => 'Incorrect PIN.',
|
47
|
+
'057' => 'Transaction not permitted to cardholder.',
|
48
|
+
'058' => 'Transaction not allowed at terminal.',
|
49
|
+
'061' => 'Exceeds withdrawal limit.',
|
50
|
+
'062' => 'Restricted card (eg, Country Exclusion).',
|
51
|
+
'063' => 'Security violation.',
|
52
|
+
'065' => 'Activity count limit exceeded.',
|
53
|
+
'068' => 'Response late.',
|
54
|
+
'070' => 'Contact card issuer.',
|
55
|
+
'071' => 'PIN not changed.',
|
56
|
+
'075' => 'Allowable number of PIN-entry tries exceeded.',
|
57
|
+
'076' => 'Unable to locate previous message (no matching retrieval reference number).',
|
58
|
+
'077' => 'Repeat or reversal data are inconsistent with original message.',
|
59
|
+
'078' => 'Blocked (first use), or non-existent account.',
|
60
|
+
'079' => 'Key exchange validation failed.',
|
61
|
+
'080' => 'Credit issuer unavailable or invalid date.',
|
62
|
+
'081' => 'PIN cryptographic error found.',
|
63
|
+
'082' => 'Negative online CVV results.',
|
64
|
+
'084' => 'Invalid auth life cycle.',
|
65
|
+
'085' => 'No reason to decline - CVV or AVS approved.',
|
66
|
+
'086' => 'Cannot verify PIN.',
|
67
|
+
'087' => 'Cashback not allowed.',
|
68
|
+
'089' => 'Issuer Down.',
|
69
|
+
'091' => 'Issuer Down.',
|
70
|
+
'092' => 'Unable to route transaction.',
|
71
|
+
'093' => 'Transaction cannot be completed - violation of law.',
|
72
|
+
'094' => 'Duplicate transmission.',
|
73
|
+
'096' => 'System error.',
|
74
|
+
'100' => 'Deny.',
|
75
|
+
'101' => 'Expired Card.',
|
76
|
+
'103' => 'Deny - Invalid manual Entry 4DBC.',
|
77
|
+
'104' => 'Deny - New card issued.',
|
78
|
+
'105' => 'Deny - Account Cancelled.',
|
79
|
+
'106' => 'Exceeded PIN Attempts.',
|
80
|
+
'107' => 'Please Call Issuer.',
|
81
|
+
'109' => 'Invalid merchant.',
|
82
|
+
'110' => 'Invalid amount.',
|
83
|
+
'111' => 'Invalid account.',
|
84
|
+
'115' => 'Service not permitted.',
|
85
|
+
'117' => 'Invalid PIN.',
|
86
|
+
'119' => 'Card member not enrolled.',
|
87
|
+
'122' => 'Invalid card (CID) security code.',
|
88
|
+
'125' => 'Invalid effective date.',
|
89
|
+
'181' => 'Format error.',
|
90
|
+
'182' => 'Please wait.',
|
91
|
+
'183' => 'Invalid currency code.',
|
92
|
+
'187' => 'Deny - new card issued.',
|
93
|
+
'188' => 'Deny - Expiration date required.',
|
94
|
+
'189' => 'Deny - Cancelled or Closed Merchant/SE.',
|
95
|
+
'200' => 'Deny - Pick up card.',
|
96
|
+
'400' => 'Reversal accepted.',
|
97
|
+
'601' => 'Reject - EMV Chip Declined Transaction.',
|
98
|
+
'602' => 'Reject - Suspected Fraud.',
|
99
|
+
'603' => 'Reject - Communications Error.',
|
100
|
+
'604' => 'Reject - Insufficient Approval.',
|
101
|
+
'750' => 'Velocity Check Fail.',
|
102
|
+
'899' => 'Misc Decline.',
|
103
|
+
'900' => 'Invalid Message Type.',
|
104
|
+
'901' => 'Invalid Merchant ID.',
|
105
|
+
'903' => 'Debit not supported.',
|
106
|
+
'904' => 'Private label not supported.',
|
107
|
+
'905' => 'Invalid card type.',
|
108
|
+
'906' => 'Unit not active.',
|
109
|
+
'908' => 'Manual card entry invalid.',
|
110
|
+
'909' => 'Invalid track information.',
|
111
|
+
'911' => 'Master merchant not found.',
|
112
|
+
'912' => 'Invalid card format.',
|
113
|
+
'913' => 'Invalid card type.',
|
114
|
+
'914' => 'Invalid card length.',
|
115
|
+
'917' => 'Expired card.',
|
116
|
+
'919' => 'Invalid entry type.',
|
117
|
+
'920' => 'Invalid amount.',
|
118
|
+
'921' => 'Invalid messge format.',
|
119
|
+
'923' => 'Invalid ABA.',
|
120
|
+
'924' => 'Invalid DDA.',
|
121
|
+
'925' => 'Invalid TID.',
|
122
|
+
'926' => 'Invalid Password.',
|
123
|
+
'930' => 'Invalid zipcode.',
|
124
|
+
'931' => 'Invalid Address.',
|
125
|
+
'932' => 'Invalid ZIP and Address.',
|
126
|
+
'933' => 'Invalid CVV2.',
|
127
|
+
'934' => 'Program Not Allowed.',
|
128
|
+
'935' => 'Invalid Device/App.',
|
129
|
+
'940' => 'Record Not Found.',
|
130
|
+
'941' => 'Merchant ID error.',
|
131
|
+
'942' => 'Refund Not Allowed.',
|
132
|
+
'943' => 'Refund denied.',
|
133
|
+
'955' => 'Invalid PIN block.',
|
134
|
+
'956' => 'Invalid KSN.',
|
135
|
+
'958' => 'Bad Status.',
|
136
|
+
'959' => 'Seek Record limit exceeded.',
|
137
|
+
'960' => 'Internal Key Database Error.',
|
138
|
+
'961' => 'TRANS not Supported. Cash Disbursement required a specific MCC.',
|
139
|
+
'962' => 'Invalid PIN key (Unknown KSN).',
|
140
|
+
'981' => 'Invalid AVS.',
|
141
|
+
'987' => 'Issuer Unavailable.',
|
142
|
+
'988' => 'System error SD.',
|
143
|
+
'989' => 'Database Error.',
|
144
|
+
'992' => 'Transaction Timeout.',
|
145
|
+
'996' => 'Bad Terminal ID.',
|
146
|
+
'997' => 'Message rejected by association.',
|
147
|
+
'999' => 'Communication failure',
|
148
|
+
nil => 'No response returned (missing credentials?).'
|
149
149
|
}
|
150
150
|
|
151
151
|
def initialize(options = {})
|
@@ -162,12 +162,12 @@ module ActiveMerchant #:nodoc:
|
|
162
162
|
end
|
163
163
|
|
164
164
|
def capture(money, reference, options = {})
|
165
|
-
transaction_id, _, _, token = reference.split(
|
165
|
+
transaction_id, _, _, token = reference.split(';')
|
166
166
|
commit(money, build_capture_request(money, transaction_id, options), token)
|
167
167
|
end
|
168
168
|
|
169
169
|
def void(reference, options = {})
|
170
|
-
transaction_id, _, amount, token = reference.split(
|
170
|
+
transaction_id, _, amount, token = reference.split(';')
|
171
171
|
commit(amount.to_i, build_void_request(amount.to_i, transaction_id, options), token)
|
172
172
|
end
|
173
173
|
|
@@ -176,7 +176,7 @@ module ActiveMerchant #:nodoc:
|
|
176
176
|
end
|
177
177
|
|
178
178
|
def refund(money, reference, options = {})
|
179
|
-
transaction_id, _, _, token = reference.split(
|
179
|
+
transaction_id, _, _, token = reference.split(';')
|
180
180
|
commit(money, build_credit_request(money, transaction_id, token, options), token)
|
181
181
|
end
|
182
182
|
|
@@ -210,8 +210,8 @@ module ActiveMerchant #:nodoc:
|
|
210
210
|
xml.tag! 'TransactionID', transaction_id.nil? ? generate_unique_id.slice(0, 18) : transaction_id
|
211
211
|
xml.tag! 'Origin', options[:origin] || 'INTERNET'
|
212
212
|
xml.tag! 'IndustryInfo', 'Type' => options[:industry_info] || 'ECOMMERCE'
|
213
|
-
xml.tag! 'Application', (options[:application] || 'n/a'), {'Version' => options[:application_version] || '1.0'}
|
214
|
-
xml.tag! 'Device', (options[:device] || 'n/a'), {'Version' => options[:device_version] || '1.0'}
|
213
|
+
xml.tag! 'Application', (options[:application] || 'n/a'), { 'Version' => options[:application_version] || '1.0' }
|
214
|
+
xml.tag! 'Device', (options[:device] || 'n/a'), { 'Version' => options[:device_version] || '1.0' }
|
215
215
|
xml.tag! 'Library', 'VirtPOS SDK', 'Version' => '1.5'
|
216
216
|
xml.tag! 'Gateway', 'JetPay'
|
217
217
|
xml.tag! 'DeveloperID', options[:developer_id] || 'n/a'
|
@@ -298,12 +298,11 @@ module ActiveMerchant #:nodoc:
|
|
298
298
|
Response.new(success,
|
299
299
|
success ? 'APPROVED' : message_from(response),
|
300
300
|
response,
|
301
|
-
:
|
302
|
-
:
|
303
|
-
:
|
304
|
-
:
|
305
|
-
:
|
306
|
-
)
|
301
|
+
test: test?,
|
302
|
+
authorization: authorization_from(response, money, token),
|
303
|
+
avs_result: AVSResult.new(code: response[:avs]),
|
304
|
+
cvv_result: CVVResult.new(response[:cvv2]),
|
305
|
+
error_code: success ? nil : error_code_from(response))
|
307
306
|
end
|
308
307
|
|
309
308
|
def url
|
@@ -324,7 +323,7 @@ module ActiveMerchant #:nodoc:
|
|
324
323
|
|
325
324
|
def parse_element(response, node)
|
326
325
|
if node.has_elements?
|
327
|
-
node.elements.each{|element| parse_element(response, element) }
|
326
|
+
node.elements.each { |element| parse_element(response, element) }
|
328
327
|
else
|
329
328
|
response[node.name.underscore.to_sym] = node.text
|
330
329
|
end
|
@@ -335,7 +334,7 @@ module ActiveMerchant #:nodoc:
|
|
335
334
|
end
|
336
335
|
|
337
336
|
def success?(response)
|
338
|
-
response[:action_code] ==
|
337
|
+
response[:action_code] == '000'
|
339
338
|
end
|
340
339
|
|
341
340
|
def message_from(response)
|
@@ -344,7 +343,7 @@ module ActiveMerchant #:nodoc:
|
|
344
343
|
|
345
344
|
def authorization_from(response, money, previous_token)
|
346
345
|
original_amount = amount(money) if money
|
347
|
-
[
|
346
|
+
[response[:transaction_id], response[:approval], original_amount, (response[:token] || previous_token)].join(';')
|
348
347
|
end
|
349
348
|
|
350
349
|
def error_code_from(response)
|
@@ -356,7 +355,7 @@ module ActiveMerchant #:nodoc:
|
|
356
355
|
|
357
356
|
if payment.is_a? String
|
358
357
|
token = payment
|
359
|
-
_, _, _, token = payment.split(
|
358
|
+
_, _, _, token = payment.split(';') if payment.include? ';'
|
360
359
|
xml.tag! 'Token', token if token
|
361
360
|
else
|
362
361
|
add_credit_card(xml, payment)
|
@@ -364,23 +363,19 @@ module ActiveMerchant #:nodoc:
|
|
364
363
|
end
|
365
364
|
|
366
365
|
def add_credit_card(xml, credit_card)
|
367
|
-
xml.tag! 'CardNum', credit_card.number,
|
366
|
+
xml.tag! 'CardNum', credit_card.number, 'CardPresent' => false, 'Tokenize' => true
|
368
367
|
xml.tag! 'CardExpMonth', format_exp(credit_card.month)
|
369
368
|
xml.tag! 'CardExpYear', format_exp(credit_card.year)
|
370
369
|
|
371
|
-
if credit_card.first_name || credit_card.last_name
|
372
|
-
xml.tag! 'CardName', [credit_card.first_name,credit_card.last_name].compact.join(' ')
|
373
|
-
end
|
370
|
+
xml.tag! 'CardName', [credit_card.first_name, credit_card.last_name].compact.join(' ') if credit_card.first_name || credit_card.last_name
|
374
371
|
|
375
|
-
unless credit_card.verification_value.nil? || (credit_card.verification_value.length == 0)
|
376
|
-
xml.tag! 'CVV2', credit_card.verification_value
|
377
|
-
end
|
372
|
+
xml.tag! 'CVV2', credit_card.verification_value unless credit_card.verification_value.nil? || (credit_card.verification_value.length == 0)
|
378
373
|
end
|
379
374
|
|
380
375
|
def add_addresses(xml, options)
|
381
376
|
if billing_address = options[:billing_address] || options[:address]
|
382
377
|
xml.tag! 'Billing' do
|
383
|
-
xml.tag! 'Address', [billing_address[:address1], billing_address[:address2]].compact.join(
|
378
|
+
xml.tag! 'Address', [billing_address[:address1], billing_address[:address2]].compact.join(' ')
|
384
379
|
xml.tag! 'City', billing_address[:city]
|
385
380
|
xml.tag! 'StateProv', billing_address[:state]
|
386
381
|
xml.tag! 'PostalCode', billing_address[:zip]
|
@@ -393,7 +388,7 @@ module ActiveMerchant #:nodoc:
|
|
393
388
|
if shipping_address = options[:shipping_address]
|
394
389
|
xml.tag! 'Shipping' do
|
395
390
|
xml.tag! 'Name', shipping_address[:name]
|
396
|
-
xml.tag! 'Address', [shipping_address[:address1], shipping_address[:address2]].compact.join(
|
391
|
+
xml.tag! 'Address', [shipping_address[:address1], shipping_address[:address2]].compact.join(' ')
|
397
392
|
xml.tag! 'City', shipping_address[:city]
|
398
393
|
xml.tag! 'StateProv', shipping_address[:state]
|
399
394
|
xml.tag! 'PostalCode', shipping_address[:zip]
|
@@ -410,7 +405,7 @@ module ActiveMerchant #:nodoc:
|
|
410
405
|
def add_invoice_data(xml, options)
|
411
406
|
xml.tag! 'OrderNumber', options[:order_id] if options[:order_id]
|
412
407
|
if tax_amount = options[:tax_amount]
|
413
|
-
xml.tag! 'TaxAmount', tax_amount, {'ExemptInd' => options[:tax_exempt] ||
|
408
|
+
xml.tag! 'TaxAmount', tax_amount, { 'ExemptInd' => options[:tax_exempt] || 'false' }
|
414
409
|
end
|
415
410
|
end
|
416
411
|
|
@@ -430,7 +425,7 @@ module ActiveMerchant #:nodoc:
|
|
430
425
|
|
431
426
|
def lookup_country_code(code)
|
432
427
|
country = Country.find(code) rescue nil
|
433
|
-
country
|
428
|
+
country&.code(:alpha3)
|
434
429
|
end
|
435
430
|
end
|
436
431
|
end
|
@@ -3,20 +3,20 @@ require 'json'
|
|
3
3
|
module ActiveMerchant #:nodoc:
|
4
4
|
module Billing #:nodoc:
|
5
5
|
class KomojuGateway < Gateway
|
6
|
-
self.test_url =
|
7
|
-
self.live_url =
|
6
|
+
self.test_url = 'https://komoju.com/api/v1'
|
7
|
+
self.live_url = 'https://komoju.com/api/v1'
|
8
8
|
self.supported_countries = ['JP']
|
9
9
|
self.default_currency = 'JPY'
|
10
10
|
self.money_format = :cents
|
11
11
|
self.homepage_url = 'https://www.komoju.com/'
|
12
12
|
self.display_name = 'Komoju'
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express jcb]
|
14
14
|
|
15
15
|
STANDARD_ERROR_CODE_MAPPING = {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
'bad_verification_value' => 'incorrect_cvc',
|
17
|
+
'card_expired' => 'expired_card',
|
18
|
+
'card_declined' => 'card_declined',
|
19
|
+
'invalid_number' => 'invalid_number'
|
20
20
|
}
|
21
21
|
|
22
22
|
def initialize(options = {})
|
@@ -34,7 +34,7 @@ module ActiveMerchant #:nodoc:
|
|
34
34
|
post[:tax] = options[:tax] if options[:tax]
|
35
35
|
add_fraud_details(post, options)
|
36
36
|
|
37
|
-
commit(
|
37
|
+
commit('/payments', post)
|
38
38
|
end
|
39
39
|
|
40
40
|
def refund(money, identification, options = {})
|
@@ -82,15 +82,15 @@ module ActiveMerchant #:nodoc:
|
|
82
82
|
|
83
83
|
def commit(path, params)
|
84
84
|
response = api_request(path, params.to_json)
|
85
|
-
success = !response.key?(
|
86
|
-
message = (success ?
|
85
|
+
success = !response.key?('error')
|
86
|
+
message = (success ? 'Transaction succeeded' : response['error']['message'])
|
87
87
|
Response.new(
|
88
88
|
success,
|
89
89
|
message,
|
90
90
|
response,
|
91
91
|
test: test?,
|
92
|
-
error_code: (success ? nil : error_code(response[
|
93
|
-
authorization: (success ? response[
|
92
|
+
error_code: (success ? nil : error_code(response['error']['code'])),
|
93
|
+
authorization: (success ? response['id'] : nil)
|
94
94
|
)
|
95
95
|
end
|
96
96
|
|
@@ -104,10 +104,10 @@ module ActiveMerchant #:nodoc:
|
|
104
104
|
|
105
105
|
def headers
|
106
106
|
{
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
107
|
+
'Authorization' => 'Basic ' + Base64.encode64(@options[:login].to_s + ':').strip,
|
108
|
+
'Accept' => 'application/json',
|
109
|
+
'Content-Type' => 'application/json',
|
110
|
+
'User-Agent' => "Komoju/v1 ActiveMerchantBindings/#{ActiveMerchant::VERSION}"
|
111
111
|
}
|
112
112
|
end
|
113
113
|
end
|