activemerchant 1.108.0 → 1.113.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +69 -0
- data/README.md +2 -2
- 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 +3 -1
- data/lib/active_merchant/billing/credit_card_methods.rb +10 -7
- data/lib/active_merchant/billing/gateway.rb +1 -1
- data/lib/active_merchant/billing/gateways/adyen.rb +25 -14
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +13 -13
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +4 -4
- data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
- data/lib/active_merchant/billing/gateways/balanced.rb +2 -2
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +3 -3
- data/lib/active_merchant/billing/gateways/bank_frick.rb +3 -3
- 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 +2 -2
- data/lib/active_merchant/billing/gateways/blue_snap.rb +50 -13
- data/lib/active_merchant/billing/gateways/borgun.rb +4 -4
- 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 +85 -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 +5 -5
- 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 +13 -13
- data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +3 -3
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/clearhaus.rb +3 -3
- 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 +13 -3
- data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
- data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
- data/lib/active_merchant/billing/gateways/cyber_source.rb +66 -20
- data/lib/active_merchant/billing/gateways/d_local.rb +7 -3
- data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
- data/lib/active_merchant/billing/gateways/decidir.rb +1 -1
- data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
- data/lib/active_merchant/billing/gateways/digitzs.rb +3 -3
- data/lib/active_merchant/billing/gateways/ebanx.rb +4 -4
- data/lib/active_merchant/billing/gateways/efsnet.rb +3 -3
- data/lib/active_merchant/billing/gateways/elavon.rb +1 -1
- data/lib/active_merchant/billing/gateways/element.rb +7 -3
- 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 +4 -4
- data/lib/active_merchant/billing/gateways/exact.rb +3 -3
- data/lib/active_merchant/billing/gateways/ezic.rb +2 -2
- 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 +4 -4
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +11 -3
- data/lib/active_merchant/billing/gateways/flo2cash.rb +11 -11
- data/lib/active_merchant/billing/gateways/forte.rb +2 -2
- 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 +10 -10
- data/lib/active_merchant/billing/gateways/hps.rb +10 -7
- 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 +3 -3
- data/lib/active_merchant/billing/gateways/iridium.rb +5 -5
- 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 +3 -3
- data/lib/active_merchant/billing/gateways/litle.rb +5 -5
- data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +12 -7
- 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 +2 -2
- data/lib/active_merchant/billing/gateways/netbanx.rb +53 -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 +2 -2
- data/lib/active_merchant/billing/gateways/opp.rb +4 -4
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +5 -5
- data/lib/active_merchant/billing/gateways/orbital.rb +14 -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 +3 -3
- 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 +5 -5
- 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 +5 -5
- data/lib/active_merchant/billing/gateways/payex.rb +18 -18
- data/lib/active_merchant/billing/gateways/payflow.rb +8 -5
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
- 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 +4 -4
- 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 +10 -8
- data/lib/active_merchant/billing/gateways/payway.rb +1 -1
- data/lib/active_merchant/billing/gateways/pin.rb +1 -1
- data/lib/active_merchant/billing/gateways/plugnpay.rb +6 -6
- data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/psigate.rb +2 -2
- data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +4 -4
- data/lib/active_merchant/billing/gateways/quantum.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickbooks.rb +9 -8
- 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 +2 -2
- data/lib/active_merchant/billing/gateways/realex.rb +2 -1
- data/lib/active_merchant/billing/gateways/redsys.rb +7 -7
- 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 +7 -7
- 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 +6 -6
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +8 -8
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +20 -1
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
- data/lib/active_merchant/billing/gateways/telr.rb +5 -5
- data/lib/active_merchant/billing/gateways/tns.rb +1 -1
- data/lib/active_merchant/billing/gateways/trans_first.rb +3 -3
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +3 -3
- data/lib/active_merchant/billing/gateways/transact_pro.rb +1 -1
- data/lib/active_merchant/billing/gateways/transax.rb +1 -1
- data/lib/active_merchant/billing/gateways/trexle.rb +1 -1
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +12 -12
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +10 -10
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +2 -2
- 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 +6 -6
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +3 -3
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/gateway_support.rb +1 -1
- metadata +45 -31
@@ -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 = {
|
@@ -20,7 +20,7 @@ module ActiveMerchant #:nodoc:
|
|
20
20
|
purchase: 'CustomerCreditCardCharge',
|
21
21
|
refund: 'CustomerCreditCardTxnVoidOrRefund',
|
22
22
|
void: 'CustomerCreditCardTxnVoid',
|
23
|
-
query: 'MerchantAccountQuery'
|
23
|
+
query: 'MerchantAccountQuery'
|
24
24
|
}
|
25
25
|
|
26
26
|
# Creates a new QbmsGateway
|
@@ -168,7 +168,7 @@ module ActiveMerchant #:nodoc:
|
|
168
168
|
if status_code != 0
|
169
169
|
return {
|
170
170
|
status_code: status_code,
|
171
|
-
status_message: signon.attributes['statusMessage']
|
171
|
+
status_message: signon.attributes['statusMessage']
|
172
172
|
}
|
173
173
|
end
|
174
174
|
|
@@ -176,7 +176,7 @@ module ActiveMerchant #:nodoc:
|
|
176
176
|
|
177
177
|
results = {
|
178
178
|
status_code: response.attributes['statusCode'].to_i,
|
179
|
-
status_message: response.attributes['statusMessage']
|
179
|
+
status_message: response.attributes['statusMessage']
|
180
180
|
}
|
181
181
|
|
182
182
|
response.elements.each do |e|
|
@@ -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
|
@@ -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)
|
@@ -151,8 +151,9 @@ module ActiveMerchant #:nodoc:
|
|
151
151
|
if address = options[:billing_address] || options[:address]
|
152
152
|
card_address[:streetAddress] = address[:address1]
|
153
153
|
card_address[:city] = address[:city]
|
154
|
-
|
155
|
-
card_address[:
|
154
|
+
region = address[:state] || address[:region]
|
155
|
+
card_address[:region] = region if region.present?
|
156
|
+
card_address[:country] = address[:country] if address[:country].present?
|
156
157
|
card_address[:postalCode] = address[:zip] if address[:zip]
|
157
158
|
end
|
158
159
|
post[:card][:address] = card_address
|
@@ -239,7 +240,7 @@ module ActiveMerchant #:nodoc:
|
|
239
240
|
def headers(method, uri)
|
240
241
|
return oauth_v2_headers if @options[:refresh_token]
|
241
242
|
|
242
|
-
raise ArgumentError, "Invalid HTTP method: #{method}. Valid methods are :post and :get" unless [
|
243
|
+
raise ArgumentError, "Invalid HTTP method: #{method}. Valid methods are :post and :get" unless %i[post get].include?(method)
|
243
244
|
|
244
245
|
request_uri = URI.parse(uri)
|
245
246
|
|
@@ -323,7 +324,7 @@ module ActiveMerchant #:nodoc:
|
|
323
324
|
def success?(response)
|
324
325
|
return FRAUD_WARNING_CODES.concat(['0']).include?(response['errors'].first['code']) if response['errors']
|
325
326
|
|
326
|
-
|
327
|
+
!%w[DECLINED CANCELLED].include?(response['status']) && !%w[AuthenticationFailed AuthorizationFailed].include?(response['code'])
|
327
328
|
end
|
328
329
|
|
329
330
|
def message_from(response)
|
@@ -331,7 +332,7 @@ module ActiveMerchant #:nodoc:
|
|
331
332
|
end
|
332
333
|
|
333
334
|
def errors_from(response)
|
334
|
-
if [
|
335
|
+
if %w[AuthenticationFailed AuthorizationFailed].include?(response['code'])
|
335
336
|
response['code']
|
336
337
|
else
|
337
338
|
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'
|
@@ -280,7 +280,7 @@ module ActiveMerchant #:nodoc:
|
|
280
280
|
'12' => STANDARD_ERROR_CODE[:card_declined],
|
281
281
|
'06' => STANDARD_ERROR_CODE[:processing_error],
|
282
282
|
'01' => STANDARD_ERROR_CODE[:call_issuer],
|
283
|
-
'04' => STANDARD_ERROR_CODE[:pickup_card]
|
283
|
+
'04' => STANDARD_ERROR_CODE[:pickup_card]
|
284
284
|
}
|
285
285
|
|
286
286
|
def error_code_from(succeeded, response)
|
@@ -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'
|
@@ -316,6 +316,7 @@ module ActiveMerchant
|
|
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
|
@@ -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
|
|
@@ -476,11 +476,11 @@ module ActiveMerchant #:nodoc:
|
|
476
476
|
if validate_signature(params)
|
477
477
|
message = response_text(params[:ds_response])
|
478
478
|
options[:authorization] = build_authorization(params)
|
479
|
-
success =
|
479
|
+
success = success_response?(params[:ds_response])
|
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')
|
@@ -490,7 +490,7 @@ module ActiveMerchant #:nodoc:
|
|
490
490
|
end
|
491
491
|
message = response_text_3ds(xml, params)
|
492
492
|
options[:authorization] = build_authorization(params)
|
493
|
-
success = params.size > 0 &&
|
493
|
+
success = params.size > 0 && success_response?(params[:ds_response])
|
494
494
|
else
|
495
495
|
# Some kind of programmer error with the request!
|
496
496
|
message = "#{code} ERROR"
|
@@ -559,7 +559,7 @@ module ActiveMerchant #:nodoc:
|
|
559
559
|
message
|
560
560
|
end
|
561
561
|
|
562
|
-
def
|
562
|
+
def success_response?(code)
|
563
563
|
(code.to_i < 100) || [400, 481, 500, 900].include?(code.to_i)
|
564
564
|
end
|
565
565
|
|
@@ -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'
|
@@ -248,7 +248,7 @@ module ActiveMerchant #:nodoc:
|
|
248
248
|
add_pair(post, :BillingAddress1, truncate(billing_address[:address1], 100))
|
249
249
|
add_pair(post, :BillingAddress2, truncate(billing_address[:address2], 100))
|
250
250
|
add_pair(post, :BillingCity, truncate(billing_address[:city], 40))
|
251
|
-
add_pair(post, :BillingState, truncate(billing_address[:state], 2)) if
|
251
|
+
add_pair(post, :BillingState, truncate(billing_address[:state], 2)) if usa?(billing_address[:country])
|
252
252
|
add_pair(post, :BillingCountry, truncate(billing_address[:country], 2))
|
253
253
|
add_pair(post, :BillingPhone, sanitize_phone(billing_address[:phone]))
|
254
254
|
add_pair(post, :BillingPostCode, truncate(billing_address[:zip], 10))
|
@@ -261,7 +261,7 @@ module ActiveMerchant #:nodoc:
|
|
261
261
|
add_pair(post, :DeliveryAddress1, truncate(shipping_address[:address1], 100))
|
262
262
|
add_pair(post, :DeliveryAddress2, truncate(shipping_address[:address2], 100))
|
263
263
|
add_pair(post, :DeliveryCity, truncate(shipping_address[:city], 40))
|
264
|
-
add_pair(post, :DeliveryState, truncate(shipping_address[:state], 2)) if
|
264
|
+
add_pair(post, :DeliveryState, truncate(shipping_address[:state], 2)) if usa?(shipping_address[:country])
|
265
265
|
add_pair(post, :DeliveryCountry, truncate(shipping_address[:country], 2))
|
266
266
|
add_pair(post, :DeliveryPhone, sanitize_phone(shipping_address[:phone]))
|
267
267
|
add_pair(post, :DeliveryPostCode, truncate(shipping_address[:zip], 10))
|
@@ -317,7 +317,7 @@ module ActiveMerchant #:nodoc:
|
|
317
317
|
truncate(cleansed, 20)
|
318
318
|
end
|
319
319
|
|
320
|
-
def
|
320
|
+
def usa?(country)
|
321
321
|
truncate(country, 2) == 'US'
|
322
322
|
end
|
323
323
|
|
@@ -351,7 +351,7 @@ module ActiveMerchant #:nodoc:
|
|
351
351
|
authorization: authorization_from(response, parameters, action),
|
352
352
|
avs_result: {
|
353
353
|
street_match: AVS_CODE[response['AddressResult']],
|
354
|
-
postal_match: AVS_CODE[response['PostCodeResult']]
|
354
|
+
postal_match: AVS_CODE[response['PostCodeResult']]
|
355
355
|
},
|
356
356
|
cvv_result: CVV_CODE[response['CV2Result']]
|
357
357
|
)
|
@@ -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
|
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
|
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 jcb diners_club]
|
13
13
|
|
14
14
|
self.homepage_url = 'https://securionpay.com/'
|
15
15
|
self.display_name = 'SecurionPay'
|