activemerchant 1.107.3 → 1.111.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +75 -0
- data/README.md +3 -3
- data/lib/active_merchant/billing/base.rb +0 -13
- data/lib/active_merchant/billing/check.rb +1 -1
- data/lib/active_merchant/billing/credit_card.rb +2 -0
- data/lib/active_merchant/billing/credit_card_methods.rb +9 -6
- data/lib/active_merchant/billing/gateways/adyen.rb +18 -12
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +8 -8
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -3
- data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
- data/lib/active_merchant/billing/gateways/balanced.rb +1 -1
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +2 -2
- data/lib/active_merchant/billing/gateways/bank_frick.rb +2 -2
- data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +1 -1
- data/lib/active_merchant/billing/gateways/be2bill.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -4
- data/lib/active_merchant/billing/gateways/blue_pay.rb +4 -4
- data/lib/active_merchant/billing/gateways/blue_snap.rb +1 -1
- data/lib/active_merchant/billing/gateways/borgun.rb +3 -3
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +84 -35
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/cams.rb +2 -2
- data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_stream.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardknox.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
- data/lib/active_merchant/billing/gateways/cashnet.rb +1 -1
- data/lib/active_merchant/billing/gateways/cecabank.rb +1 -1
- data/lib/active_merchant/billing/gateways/cenpos.rb +12 -12
- data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/clearhaus.rb +4 -4
- data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
- data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
- data/lib/active_merchant/billing/gateways/creditcall.rb +1 -1
- data/lib/active_merchant/billing/gateways/credorax.rb +7 -3
- data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
- data/lib/active_merchant/billing/gateways/culqi.rb +1 -1
- data/lib/active_merchant/billing/gateways/cyber_source.rb +67 -22
- data/lib/active_merchant/billing/gateways/d_local.rb +24 -8
- data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
- data/lib/active_merchant/billing/gateways/decidir.rb +24 -0
- data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
- data/lib/active_merchant/billing/gateways/digitzs.rb +2 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +6 -4
- data/lib/active_merchant/billing/gateways/efsnet.rb +2 -2
- data/lib/active_merchant/billing/gateways/elavon.rb +56 -9
- data/lib/active_merchant/billing/gateways/element.rb +16 -8
- data/lib/active_merchant/billing/gateways/epay.rb +3 -3
- data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +2 -2
- data/lib/active_merchant/billing/gateways/exact.rb +3 -3
- data/lib/active_merchant/billing/gateways/ezic.rb +1 -1
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +9 -7
- data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -1
- data/lib/active_merchant/billing/gateways/finansbank.rb +2 -2
- data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
- data/lib/active_merchant/billing/gateways/first_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +5 -5
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +12 -4
- data/lib/active_merchant/billing/gateways/flo2cash.rb +10 -10
- data/lib/active_merchant/billing/gateways/forte.rb +9 -8
- data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
- data/lib/active_merchant/billing/gateways/global_collect.rb +10 -5
- data/lib/active_merchant/billing/gateways/global_transport.rb +1 -1
- data/lib/active_merchant/billing/gateways/hdfc.rb +9 -9
- data/lib/active_merchant/billing/gateways/hps.rb +3 -3
- data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/inspire.rb +1 -1
- data/lib/active_merchant/billing/gateways/instapay.rb +1 -1
- data/lib/active_merchant/billing/gateways/ipp.rb +1 -1
- data/lib/active_merchant/billing/gateways/iridium.rb +3 -3
- data/lib/active_merchant/billing/gateways/itransact.rb +1 -1
- data/lib/active_merchant/billing/gateways/iveri.rb +2 -2
- data/lib/active_merchant/billing/gateways/ixopay.rb +1 -1
- data/lib/active_merchant/billing/gateways/jetpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/komoju.rb +1 -1
- data/lib/active_merchant/billing/gateways/kushki.rb +4 -4
- data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
- data/lib/active_merchant/billing/gateways/linkpoint.rb +2 -2
- data/lib/active_merchant/billing/gateways/litle.rb +10 -5
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +12 -6
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
- data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -1
- data/lib/active_merchant/billing/gateways/micropayment.rb +2 -2
- data/lib/active_merchant/billing/gateways/migs.rb +1 -1
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +1 -1
- data/lib/active_merchant/billing/gateways/monei.rb +2 -2
- data/lib/active_merchant/billing/gateways/moneris.rb +17 -17
- data/lib/active_merchant/billing/gateways/money_movers.rb +1 -1
- data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
- data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -2
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/net_registry.rb +2 -2
- data/lib/active_merchant/billing/gateways/netaxept.rb +3 -3
- data/lib/active_merchant/billing/gateways/netbanx.rb +51 -23
- data/lib/active_merchant/billing/gateways/netbilling.rb +2 -2
- data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/network_merchants.rb +1 -1
- data/lib/active_merchant/billing/gateways/nmi.rb +4 -4
- data/lib/active_merchant/billing/gateways/ogone.rb +2 -2
- data/lib/active_merchant/billing/gateways/omise.rb +1 -1
- data/lib/active_merchant/billing/gateways/openpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/opp.rb +2 -2
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +4 -4
- data/lib/active_merchant/billing/gateways/orbital.rb +49 -7
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
- data/lib/active_merchant/billing/gateways/pagarme.rb +2 -2
- data/lib/active_merchant/billing/gateways/pago_facil.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_conex.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_hub.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_junction.rb +3 -3
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +3 -3
- data/lib/active_merchant/billing/gateways/payeezy.rb +2 -2
- data/lib/active_merchant/billing/gateways/payex.rb +13 -13
- data/lib/active_merchant/billing/gateways/payflow.rb +5 -5
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -1
- data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymentez.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymill.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
- data/lib/active_merchant/billing/gateways/paystation.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_in.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_latam.rb +7 -8
- data/lib/active_merchant/billing/gateways/payway.rb +1 -1
- data/lib/active_merchant/billing/gateways/pin.rb +2 -2
- data/lib/active_merchant/billing/gateways/plugnpay.rb +5 -5
- data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/psigate.rb +1 -1
- data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +1 -1
- data/lib/active_merchant/billing/gateways/quantum.rb +4 -4
- data/lib/active_merchant/billing/gateways/quickbooks.rb +6 -6
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +4 -4
- data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
- data/lib/active_merchant/billing/gateways/realex.rb +5 -3
- data/lib/active_merchant/billing/gateways/redsys.rb +5 -5
- data/lib/active_merchant/billing/gateways/s5.rb +1 -1
- data/lib/active_merchant/billing/gateways/safe_charge.rb +2 -2
- data/lib/active_merchant/billing/gateways/sage.rb +3 -3
- data/lib/active_merchant/billing/gateways/sage_pay.rb +3 -3
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_net.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -2
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
- data/lib/active_merchant/billing/gateways/securion_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/skip_jack.rb +5 -5
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +13 -8
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +46 -3
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
- data/lib/active_merchant/billing/gateways/telr.rb +4 -4
- data/lib/active_merchant/billing/gateways/tns.rb +1 -1
- data/lib/active_merchant/billing/gateways/trans_first.rb +2 -2
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/transact_pro.rb +3 -3
- data/lib/active_merchant/billing/gateways/transax.rb +1 -1
- data/lib/active_merchant/billing/gateways/trexle.rb +2 -2
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +5 -5
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +6 -6
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +1 -1
- data/lib/active_merchant/billing/gateways/vanco.rb +1 -1
- data/lib/active_merchant/billing/gateways/verifi.rb +3 -3
- data/lib/active_merchant/billing/gateways/viaklix.rb +1 -1
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +3 -3
- data/lib/active_merchant/billing/gateways/webpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/wepay.rb +2 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +1 -1
- data/lib/active_merchant/billing/gateways/world_net.rb +35 -35
- data/lib/active_merchant/billing/gateways/worldpay.rb +8 -8
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +1 -1
- data/lib/active_merchant/connection.rb +40 -42
- data/lib/active_merchant/network_connection_retries.rb +10 -12
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/gateway_support.rb +1 -1
- metadata +46 -32
@@ -4,7 +4,7 @@ module ActiveMerchant
|
|
4
4
|
self.live_url = self.test_url = 'https://ccapi.client.qvalent.com/payway/ccapi'
|
5
5
|
|
6
6
|
self.supported_countries = ['AU']
|
7
|
-
self.supported_cardtypes = [
|
7
|
+
self.supported_cardtypes = %i[visa master diners_club american_express bankcard]
|
8
8
|
self.display_name = 'Pay Way'
|
9
9
|
self.homepage_url = 'http://www.payway.com.au'
|
10
10
|
self.default_currency = 'AUD'
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.default_currency = 'AUD'
|
8
8
|
self.money_format = :cents
|
9
9
|
self.supported_countries = ['AU']
|
10
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_cardtypes = %i[visa master american_express]
|
11
11
|
self.homepage_url = 'http://www.pinpayments.com/'
|
12
12
|
self.display_name = 'Pin Payments'
|
13
13
|
|
@@ -138,7 +138,7 @@ module ActiveMerchant #:nodoc:
|
|
138
138
|
name: creditcard.name
|
139
139
|
)
|
140
140
|
elsif creditcard.kind_of?(String)
|
141
|
-
if
|
141
|
+
if /^card_/.match?(creditcard)
|
142
142
|
post[:card_token] = get_card_token(creditcard)
|
143
143
|
else
|
144
144
|
post[:customer_token] = creditcard
|
@@ -3,8 +3,8 @@ module ActiveMerchant
|
|
3
3
|
class PlugnpayGateway < Gateway
|
4
4
|
class PlugnpayPostData < PostData
|
5
5
|
# Fields that will be sent even if they are blank
|
6
|
-
self.required_fields = [
|
7
|
-
|
6
|
+
self.required_fields = %i[publisher_name publisher_password
|
7
|
+
card_amount card_name card_number card_exp orderID]
|
8
8
|
end
|
9
9
|
self.live_url = self.test_url = 'https://pay1.plugnpay.com/payment/pnpremote.cgi'
|
10
10
|
|
@@ -88,12 +88,12 @@ module ActiveMerchant
|
|
88
88
|
credit: 'newreturn'
|
89
89
|
}
|
90
90
|
|
91
|
-
SUCCESS_CODES = [
|
92
|
-
FAILURE_CODES = [
|
91
|
+
SUCCESS_CODES = %w[pending success]
|
92
|
+
FAILURE_CODES = %w[badcard fraud]
|
93
93
|
|
94
94
|
self.default_currency = 'USD'
|
95
95
|
self.supported_countries = ['US']
|
96
|
-
self.supported_cardtypes = [
|
96
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
97
97
|
self.homepage_url = 'http://www.plugnpay.com/'
|
98
98
|
self.display_name = "Plug'n Pay"
|
99
99
|
|
@@ -6,10 +6,10 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
self.test_url = 'https://xmltest.propay.com/API/PropayAPI.aspx'
|
7
7
|
self.live_url = 'https://epay.propay.com/api/propayapi.aspx'
|
8
8
|
|
9
|
-
self.supported_countries = [
|
9
|
+
self.supported_countries = %w[US CA]
|
10
10
|
self.default_currency = 'USD'
|
11
11
|
self.money_format = :cents
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
13
13
|
|
14
14
|
self.homepage_url = 'https://www.propay.com/'
|
15
15
|
self.display_name = 'ProPay'
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
self.test_url = 'https://realtimestaging.psigate.com/xml'
|
39
39
|
self.live_url = 'https://realtime.psigate.com/xml'
|
40
40
|
|
41
|
-
self.supported_cardtypes = [
|
41
|
+
self.supported_cardtypes = %i[visa master american_express]
|
42
42
|
self.supported_countries = ['CA']
|
43
43
|
self.homepage_url = 'http://www.psigate.com/'
|
44
44
|
self.display_name = 'Psigate'
|
@@ -21,7 +21,7 @@ module ActiveMerchant
|
|
21
21
|
# American Express, Diners Club, JCB, International Maestro,
|
22
22
|
# Style, Clydesdale Financial Services, Other
|
23
23
|
|
24
|
-
self.supported_cardtypes = [
|
24
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb maestro]
|
25
25
|
self.homepage_url = 'http://www.paymentsolutionsltd.com/'
|
26
26
|
self.display_name = 'PSL Payment Solutions'
|
27
27
|
|
@@ -183,7 +183,7 @@ module ActiveMerchant
|
|
183
183
|
address = options[:billing_address] || options[:address]
|
184
184
|
return if address.nil?
|
185
185
|
|
186
|
-
post[:QAAddress] = [
|
186
|
+
post[:QAAddress] = %i[address1 address2 city state].collect { |a| address[a] }.reject(&:blank?).join(' ')
|
187
187
|
post[:QAPostcode] = address[:zip]
|
188
188
|
end
|
189
189
|
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
self.homepage_url = 'http://payments.intuit.com/'
|
12
12
|
self.display_name = 'QuickBooks Merchant Services'
|
13
13
|
self.default_currency = 'USD'
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master discover american_express diners_club jcb]
|
15
15
|
self.supported_countries = ['US']
|
16
16
|
|
17
17
|
TYPES = {
|
@@ -13,7 +13,7 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
self.live_url = self.test_url = 'https://secure.quantumgateway.com/cgi/xml_requester.php'
|
14
14
|
|
15
15
|
# visa, master, american_express, discover
|
16
|
-
self.supported_cardtypes = [
|
16
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
17
17
|
self.supported_countries = ['US']
|
18
18
|
self.default_currency = 'USD'
|
19
19
|
self.money_format = :dollars
|
@@ -95,7 +95,7 @@ module ActiveMerchant #:nodoc:
|
|
95
95
|
def build_capture_request(money, authorization, options)
|
96
96
|
xml = Builder::XmlMarkup.new
|
97
97
|
add_common_credit_card_info(xml, 'PREVIOUS_SALE')
|
98
|
-
transaction_id,
|
98
|
+
transaction_id, = authorization_parts_from(authorization)
|
99
99
|
add_transaction_id(xml, transaction_id)
|
100
100
|
xml.target!
|
101
101
|
end
|
@@ -116,7 +116,7 @@ module ActiveMerchant #:nodoc:
|
|
116
116
|
def build_void_request(authorization, options)
|
117
117
|
xml = Builder::XmlMarkup.new
|
118
118
|
add_common_credit_card_info(xml, 'VOID')
|
119
|
-
transaction_id,
|
119
|
+
transaction_id, = authorization_parts_from(authorization)
|
120
120
|
add_transaction_id(xml, transaction_id)
|
121
121
|
xml.target!
|
122
122
|
end
|
@@ -253,7 +253,7 @@ module ActiveMerchant #:nodoc:
|
|
253
253
|
if node.has_elements?
|
254
254
|
node.elements.each { |e| parse_element(reply, e) }
|
255
255
|
else
|
256
|
-
if node.parent.name
|
256
|
+
if /item/.match?(node.parent.name)
|
257
257
|
parent = node.parent.name + (node.parent.attributes['id'] ? '_' + node.parent.attributes['id'] : '')
|
258
258
|
reply[(parent + '_' + node.name).to_sym] = node.text
|
259
259
|
else
|
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
|
7
7
|
self.supported_countries = ['US']
|
8
8
|
self.default_currency = 'USD'
|
9
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_cardtypes = %i[visa master american_express discover diners]
|
10
10
|
|
11
11
|
self.homepage_url = 'http://payments.intuit.com'
|
12
12
|
self.display_name = 'QuickBooks Payments'
|
@@ -83,7 +83,7 @@ module ActiveMerchant #:nodoc:
|
|
83
83
|
|
84
84
|
def capture(money, authorization, options = {})
|
85
85
|
post = {}
|
86
|
-
authorization,
|
86
|
+
authorization, = split_authorization(authorization)
|
87
87
|
post[:amount] = localized_amount(money, currency(money))
|
88
88
|
add_context(post, options)
|
89
89
|
|
@@ -95,7 +95,7 @@ module ActiveMerchant #:nodoc:
|
|
95
95
|
post = {}
|
96
96
|
post[:amount] = localized_amount(money, currency(money))
|
97
97
|
add_context(post, options)
|
98
|
-
authorization,
|
98
|
+
authorization, = split_authorization(authorization)
|
99
99
|
|
100
100
|
response = commit(refund_uri(authorization), post)
|
101
101
|
check_token_response(response, refund_uri(authorization), post, options)
|
@@ -239,7 +239,7 @@ module ActiveMerchant #:nodoc:
|
|
239
239
|
def headers(method, uri)
|
240
240
|
return oauth_v2_headers if @options[:refresh_token]
|
241
241
|
|
242
|
-
raise ArgumentError, "Invalid HTTP method: #{method}. Valid methods are :post and :get" unless [
|
242
|
+
raise ArgumentError, "Invalid HTTP method: #{method}. Valid methods are :post and :get" unless %i[post get].include?(method)
|
243
243
|
|
244
244
|
request_uri = URI.parse(uri)
|
245
245
|
|
@@ -323,7 +323,7 @@ module ActiveMerchant #:nodoc:
|
|
323
323
|
def success?(response)
|
324
324
|
return FRAUD_WARNING_CODES.concat(['0']).include?(response['errors'].first['code']) if response['errors']
|
325
325
|
|
326
|
-
|
326
|
+
!%w[DECLINED CANCELLED].include?(response['status']) && !%w[AuthenticationFailed AuthorizationFailed].include?(response['code'])
|
327
327
|
end
|
328
328
|
|
329
329
|
def message_from(response)
|
@@ -331,7 +331,7 @@ module ActiveMerchant #:nodoc:
|
|
331
331
|
end
|
332
332
|
|
333
333
|
def errors_from(response)
|
334
|
-
if [
|
334
|
+
if %w[AuthenticationFailed AuthorizationFailed].include?(response['code'])
|
335
335
|
response['code']
|
336
336
|
else
|
337
337
|
response['errors'].present? ? STANDARD_ERROR_CODE_MAPPING[response['errors'].first['code']] : ''
|
@@ -168,9 +168,9 @@ module QuickpayCommon
|
|
168
168
|
base.default_currency = 'DKK'
|
169
169
|
base.money_format = :cents
|
170
170
|
|
171
|
-
base.
|
172
|
-
|
173
|
-
|
171
|
+
base.supported_countries = %w[DE DK ES FI FR FO GB IS NO SE]
|
172
|
+
base.supported_cardtypes = %i[dankort forbrugsforeningen visa master
|
173
|
+
american_express diners_club jcb maestro]
|
174
174
|
base.homepage_url = 'http://quickpay.net/'
|
175
175
|
base.display_name = 'QuickPay'
|
176
176
|
end
|
@@ -24,11 +24,11 @@ module ActiveMerchant
|
|
24
24
|
r.process {
|
25
25
|
post = authorization_params(money, credit_card_or_reference, options)
|
26
26
|
add_autocapture(post, false)
|
27
|
-
commit(synchronized_path("/payments/#{r.responses.last.params[
|
27
|
+
commit(synchronized_path("/payments/#{r.responses.last.params['id']}/authorize"), post)
|
28
28
|
}
|
29
29
|
r.process {
|
30
30
|
post = capture_params(money, credit_card_or_reference, options)
|
31
|
-
commit(synchronized_path("/payments/#{r.responses.last.params[
|
31
|
+
commit(synchronized_path("/payments/#{r.responses.last.params['id']}/capture"), post)
|
32
32
|
}
|
33
33
|
end
|
34
34
|
end
|
@@ -42,7 +42,7 @@ module ActiveMerchant
|
|
42
42
|
r.process { create_payment(money, options) }
|
43
43
|
r.process {
|
44
44
|
post = authorization_params(money, credit_card_or_reference, options)
|
45
|
-
commit(synchronized_path("/payments/#{r.responses.last.params[
|
45
|
+
commit(synchronized_path("/payments/#{r.responses.last.params['id']}/authorize"), post)
|
46
46
|
}
|
47
47
|
end
|
48
48
|
end
|
@@ -191,7 +191,7 @@ module ActiveMerchant
|
|
191
191
|
|
192
192
|
post[:shipping_address] = map_address(options[:shipping_address]) if options[:shipping_address]
|
193
193
|
|
194
|
-
[
|
194
|
+
%i[metadata branding_id variables].each do |field|
|
195
195
|
post[field] = options[field] if options[field]
|
196
196
|
end
|
197
197
|
end
|
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
self.supported_countries = ['AU']
|
11
11
|
self.default_currency = 'AUD'
|
12
12
|
self.money_format = :cents
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners]
|
14
14
|
|
15
15
|
CVV_CODE_MAPPING = {
|
16
16
|
'S' => 'D'
|
@@ -31,7 +31,7 @@ module ActiveMerchant
|
|
31
31
|
|
32
32
|
self.money_format = :cents
|
33
33
|
self.default_currency = 'EUR'
|
34
|
-
self.supported_cardtypes = [
|
34
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
35
35
|
self.supported_countries = %w(IE GB FR BE NL LU IT US CA ES)
|
36
36
|
self.homepage_url = 'http://www.realexpayments.com/'
|
37
37
|
self.display_name = 'Realex'
|
@@ -310,12 +310,13 @@ module ActiveMerchant
|
|
310
310
|
|
311
311
|
version = three_d_secure.fetch(:version, '')
|
312
312
|
xml.tag! 'mpi' do
|
313
|
-
if
|
313
|
+
if /^2/.match?(version)
|
314
314
|
xml.tag! 'authentication_value', three_d_secure[:cavv]
|
315
315
|
xml.tag! 'ds_trans_id', three_d_secure[:ds_transaction_id]
|
316
316
|
else
|
317
317
|
xml.tag! 'cavv', three_d_secure[:cavv]
|
318
318
|
xml.tag! 'xid', three_d_secure[:xid]
|
319
|
+
version = '1'
|
319
320
|
end
|
320
321
|
xml.tag! 'eci', three_d_secure[:eci]
|
321
322
|
xml.tag! 'message_version', version
|
@@ -373,7 +374,8 @@ module ActiveMerchant
|
|
373
374
|
|
374
375
|
def ipv4?(ip_address)
|
375
376
|
return false if ip_address.nil?
|
376
|
-
|
377
|
+
|
378
|
+
!ip_address.match(/\A\d+\.\d+\.\d+\.\d+\z/).nil?
|
377
379
|
end
|
378
380
|
end
|
379
381
|
end
|
@@ -44,7 +44,7 @@ module ActiveMerchant #:nodoc:
|
|
44
44
|
self.money_format = :cents
|
45
45
|
|
46
46
|
# Not all card types may be activated by the bank!
|
47
|
-
self.supported_cardtypes = [
|
47
|
+
self.supported_cardtypes = %i[visa master american_express jcb diners_club unionpay]
|
48
48
|
self.homepage_url = 'http://www.redsys.es/'
|
49
49
|
self.display_name = 'Redsys'
|
50
50
|
|
@@ -225,7 +225,7 @@ module ActiveMerchant #:nodoc:
|
|
225
225
|
data = {}
|
226
226
|
add_action(data, :capture)
|
227
227
|
add_amount(data, money, options)
|
228
|
-
order_id,
|
228
|
+
order_id, = split_authorization(authorization)
|
229
229
|
add_order(data, order_id)
|
230
230
|
data[:description] = options[:description]
|
231
231
|
|
@@ -247,7 +247,7 @@ module ActiveMerchant #:nodoc:
|
|
247
247
|
data = {}
|
248
248
|
add_action(data, :refund)
|
249
249
|
add_amount(data, money, options)
|
250
|
-
order_id,
|
250
|
+
order_id, = split_authorization(authorization)
|
251
251
|
add_order(data, order_id)
|
252
252
|
data[:description] = options[:description]
|
253
253
|
|
@@ -480,7 +480,7 @@ module ActiveMerchant #:nodoc:
|
|
480
480
|
else
|
481
481
|
message = 'Response failed validation check'
|
482
482
|
end
|
483
|
-
elsif [
|
483
|
+
elsif %w[iniciaPeticion trataPeticion].include?(action)
|
484
484
|
vxml = Nokogiri::XML(data).remove_namespaces!.xpath("//Envelope/Body/#{action}Response/#{action}Return").inner_text
|
485
485
|
xml = Nokogiri::XML(vxml)
|
486
486
|
node = (action == 'iniciaPeticion' ? 'INFOTARJETA' : 'OPERACION')
|
@@ -565,7 +565,7 @@ module ActiveMerchant #:nodoc:
|
|
565
565
|
|
566
566
|
def clean_order_id(order_id)
|
567
567
|
cleansed = order_id.gsub(/[^\da-zA-Z]/, '')
|
568
|
-
if
|
568
|
+
if /^\d{4}/.match?(cleansed)
|
569
569
|
cleansed[0..11]
|
570
570
|
else
|
571
571
|
'%04d%s' % [rand(0..9999), cleansed[0...8]]
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
|
9
9
|
self.supported_countries = ['DK']
|
10
10
|
self.default_currency = 'EUR'
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master maestro]
|
12
12
|
|
13
13
|
self.homepage_url = 'http://www.s5.dk/'
|
14
14
|
self.display_name = 'S5'
|
@@ -6,9 +6,9 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
self.test_url = 'https://process.sandbox.safecharge.com/service.asmx/Process'
|
7
7
|
self.live_url = 'https://process.safecharge.com/service.asmx/Process'
|
8
8
|
|
9
|
-
self.supported_countries = [
|
9
|
+
self.supported_countries = %w[AT BE BG CY CZ DE DK EE GR ES FI FR GI HK HR HU IE IS IT LI LT LU LV MT MX NL NO PL PT RO SE SG SI SK GB US]
|
10
10
|
self.default_currency = 'USD'
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master]
|
12
12
|
|
13
13
|
self.homepage_url = 'https://www.safecharge.com'
|
14
14
|
self.display_name = 'SafeCharge'
|
@@ -7,8 +7,8 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.homepage_url = 'Sage Payment Solutions'
|
8
8
|
self.live_url = 'https://www.sagepayments.net/cgi-bin'
|
9
9
|
|
10
|
-
self.supported_countries = [
|
11
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_countries = %w[US CA]
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
|
12
12
|
|
13
13
|
TRANSACTIONS = {
|
14
14
|
purchase: '01',
|
@@ -215,7 +215,7 @@ module ActiveMerchant #:nodoc:
|
|
215
215
|
end
|
216
216
|
|
217
217
|
def add_reference(post, reference)
|
218
|
-
ref,
|
218
|
+
ref, = reference.to_s.split(';')
|
219
219
|
post[:T_reference] = ref
|
220
220
|
end
|
221
221
|
|
@@ -69,8 +69,8 @@ module ActiveMerchant #:nodoc:
|
|
69
69
|
recipient_dob: :FIRecipientDoB
|
70
70
|
}
|
71
71
|
|
72
|
-
self.
|
73
|
-
self.
|
72
|
+
self.supported_countries = %w[GB IE]
|
73
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb maestro diners_club]
|
74
74
|
self.default_currency = 'GBP'
|
75
75
|
|
76
76
|
self.homepage_url = 'http://www.sagepay.com'
|
@@ -390,7 +390,7 @@ module ActiveMerchant #:nodoc:
|
|
390
390
|
end
|
391
391
|
|
392
392
|
def build_simulator_url(action)
|
393
|
-
endpoint = [
|
393
|
+
endpoint = %i[purchase authorization].include?(action) ? 'VSPDirectGateway.asp' : "VSPServerGateway.asp?Service=Vendor#{TRANSACTIONS[action].capitalize}Tx"
|
394
394
|
"#{self.simulator_url}/#{endpoint}"
|
395
395
|
end
|
396
396
|
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.supported_countries = ['US']
|
8
8
|
|
9
9
|
# The card types supported by the payment gateway
|
10
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
11
11
|
|
12
12
|
# The homepage URL of the gateway
|
13
13
|
self.homepage_url = 'http://www.salliemae.com/'
|
@@ -18,7 +18,7 @@ module ActiveMerchant #:nodoc:
|
|
18
18
|
NIL_ATTRIBUTE = { 'i:nil' => 'true' }
|
19
19
|
|
20
20
|
self.supported_countries = ['US']
|
21
|
-
self.supported_cardtypes = [
|
21
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
22
22
|
self.homepage_url = 'http://www.securenet.com/'
|
23
23
|
self.display_name = 'SecureNet'
|
24
24
|
|
@@ -17,7 +17,7 @@ module ActiveMerchant #:nodoc:
|
|
17
17
|
self.default_currency = 'USD'
|
18
18
|
|
19
19
|
self.supported_countries = %w(US CA GB AU)
|
20
|
-
self.supported_cardtypes = [
|
20
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
21
21
|
self.homepage_url = 'http://www.securepay.com/'
|
22
22
|
self.display_name = 'SecurePay'
|
23
23
|
|
@@ -15,7 +15,7 @@ module ActiveMerchant #:nodoc:
|
|
15
15
|
self.live_periodic_url = 'https://api.securepay.com.au/xmlapi/periodic'
|
16
16
|
|
17
17
|
self.supported_countries = ['AU']
|
18
|
-
self.supported_cardtypes = [
|
18
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
19
19
|
|
20
20
|
# The homepage URL of the gateway
|
21
21
|
self.homepage_url = 'http://securepay.com.au'
|
@@ -54,7 +54,7 @@ module ActiveMerchant #:nodoc:
|
|
54
54
|
trigger: nil
|
55
55
|
}
|
56
56
|
|
57
|
-
SUCCESS_CODES = [
|
57
|
+
SUCCESS_CODES = %w[00 08 11 16 77]
|
58
58
|
|
59
59
|
def initialize(options = {})
|
60
60
|
requires!(options, :login, :password)
|
@@ -2,7 +2,7 @@ module ActiveMerchant #:nodoc:
|
|
2
2
|
module Billing #:nodoc:
|
3
3
|
class SecurePayTechGateway < Gateway
|
4
4
|
class SecurePayTechPostData < PostData
|
5
|
-
self.required_fields = [
|
5
|
+
self.required_fields = %i[OrderReference CardNumber CardExpiry CardHolderName CardType MerchantID MerchantKey Amount Currency]
|
6
6
|
end
|
7
7
|
|
8
8
|
self.live_url = self.test_url = 'https://tx.securepaytech.com/web/HttpPostPurchase'
|
@@ -21,7 +21,7 @@ module ActiveMerchant #:nodoc:
|
|
21
21
|
|
22
22
|
self.default_currency = 'NZD'
|
23
23
|
self.supported_countries = ['NZ']
|
24
|
-
self.supported_cardtypes = [
|
24
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
25
25
|
self.homepage_url = 'http://www.securepaytech.com/'
|
26
26
|
self.display_name = 'SecurePayTech'
|
27
27
|
|