activemerchant 1.113.0 → 1.119.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +114 -0
- data/README.md +1 -1
- data/lib/active_merchant.rb +1 -1
- data/lib/active_merchant/billing/avs_result.rb +1 -1
- data/lib/active_merchant/billing/compatibility.rb +3 -3
- data/lib/active_merchant/billing/credit_card.rb +3 -0
- data/lib/active_merchant/billing/credit_card_methods.rb +72 -13
- data/lib/active_merchant/billing/gateways/adyen.rb +24 -14
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +7 -7
- data/lib/active_merchant/billing/gateways/authorize_net.rb +44 -12
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -4
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +2 -1
- data/lib/active_merchant/billing/gateways/axcessms.rb +8 -9
- data/lib/active_merchant/billing/gateways/balanced.rb +4 -3
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +7 -7
- data/lib/active_merchant/billing/gateways/bank_frick.rb +7 -7
- data/lib/active_merchant/billing/gateways/banwire.rb +1 -1
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +6 -4
- data/lib/active_merchant/billing/gateways/beanstream.rb +3 -3
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -5
- data/lib/active_merchant/billing/gateways/blue_pay.rb +2 -3
- data/lib/active_merchant/billing/gateways/blue_snap.rb +37 -12
- data/lib/active_merchant/billing/gateways/bogus.rb +19 -19
- data/lib/active_merchant/billing/gateways/borgun.rb +11 -11
- data/lib/active_merchant/billing/gateways/bpoint.rb +8 -8
- data/lib/active_merchant/billing/gateways/braintree.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +13 -10
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/cams.rb +8 -8
- 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 +2 -2
- data/lib/active_merchant/billing/gateways/cardknox.rb +7 -7
- data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
- data/lib/active_merchant/billing/gateways/cecabank.rb +5 -5
- data/lib/active_merchant/billing/gateways/cenpos.rb +10 -10
- data/lib/active_merchant/billing/gateways/checkout.rb +2 -2
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +17 -20
- data/lib/active_merchant/billing/gateways/clearhaus.rb +7 -7
- data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
- data/lib/active_merchant/billing/gateways/conekta.rb +2 -2
- data/lib/active_merchant/billing/gateways/creditcall.rb +10 -10
- data/lib/active_merchant/billing/gateways/credorax.rb +26 -15
- data/lib/active_merchant/billing/gateways/ct_payment.rb +10 -10
- data/lib/active_merchant/billing/gateways/culqi.rb +9 -9
- data/lib/active_merchant/billing/gateways/cyber_source.rb +58 -36
- data/lib/active_merchant/billing/gateways/d_local.rb +11 -11
- data/lib/active_merchant/billing/gateways/data_cash.rb +2 -3
- data/lib/active_merchant/billing/gateways/decidir.rb +31 -10
- data/lib/active_merchant/billing/gateways/dibs.rb +8 -8
- data/lib/active_merchant/billing/gateways/digitzs.rb +5 -5
- data/lib/active_merchant/billing/gateways/ebanx.rb +9 -9
- data/lib/active_merchant/billing/gateways/efsnet.rb +2 -3
- data/lib/active_merchant/billing/gateways/elavon.rb +286 -225
- data/lib/active_merchant/billing/gateways/element.rb +8 -8
- data/lib/active_merchant/billing/gateways/evo_ca.rb +5 -6
- data/lib/active_merchant/billing/gateways/eway.rb +3 -4
- data/lib/active_merchant/billing/gateways/eway_managed.rb +6 -7
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +19 -6
- data/lib/active_merchant/billing/gateways/exact.rb +8 -9
- data/lib/active_merchant/billing/gateways/ezic.rb +7 -7
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +4 -4
- data/lib/active_merchant/billing/gateways/federated_canada.rb +2 -3
- data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
- data/lib/active_merchant/billing/gateways/first_pay.rb +6 -6
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +7 -7
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +21 -10
- data/lib/active_merchant/billing/gateways/flo2cash.rb +8 -8
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +1 -1
- data/lib/active_merchant/billing/gateways/forte.rb +14 -8
- data/lib/active_merchant/billing/gateways/global_collect.rb +35 -16
- data/lib/active_merchant/billing/gateways/global_transport.rb +7 -7
- data/lib/active_merchant/billing/gateways/hdfc.rb +9 -9
- data/lib/active_merchant/billing/gateways/hps.rb +17 -8
- data/lib/active_merchant/billing/gateways/iats_payments.rb +9 -4
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/inspire.rb +3 -4
- data/lib/active_merchant/billing/gateways/instapay.rb +1 -2
- data/lib/active_merchant/billing/gateways/ipp.rb +5 -5
- data/lib/active_merchant/billing/gateways/iridium.rb +14 -15
- data/lib/active_merchant/billing/gateways/iveri.rb +7 -7
- data/lib/active_merchant/billing/gateways/ixopay.rb +7 -7
- data/lib/active_merchant/billing/gateways/jetpay.rb +1 -2
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +4 -5
- data/lib/active_merchant/billing/gateways/kushki.rb +6 -6
- data/lib/active_merchant/billing/gateways/latitude19.rb +14 -14
- data/lib/active_merchant/billing/gateways/linkpoint.rb +4 -5
- data/lib/active_merchant/billing/gateways/litle.rb +31 -15
- data/lib/active_merchant/billing/gateways/mastercard.rb +10 -10
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +7 -7
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -2
- data/lib/active_merchant/billing/gateways/merchant_one.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +10 -10
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +5 -7
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +4 -6
- data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
- data/lib/active_merchant/billing/gateways/metrics_global.rb +4 -5
- data/lib/active_merchant/billing/gateways/micropayment.rb +8 -8
- data/lib/active_merchant/billing/gateways/migs.rb +3 -4
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +2 -4
- data/lib/active_merchant/billing/gateways/monei.rb +7 -7
- data/lib/active_merchant/billing/gateways/moneris.rb +4 -3
- data/lib/active_merchant/billing/gateways/money_movers.rb +2 -3
- data/lib/active_merchant/billing/gateways/mundipagg.rb +37 -10
- data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -4
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/net_registry.rb +1 -2
- data/lib/active_merchant/billing/gateways/netaxept.rb +6 -6
- data/lib/active_merchant/billing/gateways/netbanx.rb +19 -8
- data/lib/active_merchant/billing/gateways/netbilling.rb +4 -5
- data/lib/active_merchant/billing/gateways/network_merchants.rb +2 -3
- data/lib/active_merchant/billing/gateways/nmi.rb +21 -7
- data/lib/active_merchant/billing/gateways/ogone.rb +3 -3
- data/lib/active_merchant/billing/gateways/omise.rb +13 -13
- data/lib/active_merchant/billing/gateways/openpay.rb +3 -4
- data/lib/active_merchant/billing/gateways/opp.rb +9 -9
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +2 -3
- data/lib/active_merchant/billing/gateways/orbital.rb +196 -85
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +3 -4
- data/lib/active_merchant/billing/gateways/pagarme.rb +8 -8
- data/lib/active_merchant/billing/gateways/pago_facil.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_conex.rb +8 -8
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +6 -7
- data/lib/active_merchant/billing/gateways/pay_hub.rb +7 -8
- data/lib/active_merchant/billing/gateways/pay_junction.rb +2 -3
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +9 -9
- data/lib/active_merchant/billing/gateways/pay_secure.rb +2 -3
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +23 -1
- data/lib/active_merchant/billing/gateways/payeezy.rb +32 -14
- data/lib/active_merchant/billing/gateways/payex.rb +6 -7
- data/lib/active_merchant/billing/gateways/payflow.rb +1 -1
- data/lib/active_merchant/billing/gateways/payment_express.rb +8 -4
- data/lib/active_merchant/billing/gateways/paymentez.rb +26 -6
- data/lib/active_merchant/billing/gateways/paymill.rb +7 -7
- data/lib/active_merchant/billing/gateways/paypal.rb +10 -2
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +1 -0
- data/lib/active_merchant/billing/gateways/paypal_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +1 -2
- data/lib/active_merchant/billing/gateways/paystation.rb +3 -4
- data/lib/active_merchant/billing/gateways/payu_in.rb +3 -3
- data/lib/active_merchant/billing/gateways/payu_latam.rb +17 -10
- data/lib/active_merchant/billing/gateways/payway.rb +8 -9
- data/lib/active_merchant/billing/gateways/pin.rb +11 -0
- data/lib/active_merchant/billing/gateways/plugnpay.rb +1 -2
- data/lib/active_merchant/billing/gateways/pro_pay.rb +8 -8
- data/lib/active_merchant/billing/gateways/psigate.rb +2 -3
- data/lib/active_merchant/billing/gateways/psl_card.rb +1 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +1 -2
- data/lib/active_merchant/billing/gateways/quantum.rb +1 -2
- data/lib/active_merchant/billing/gateways/quickbooks.rb +1 -1
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +3 -4
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +1 -2
- data/lib/active_merchant/billing/gateways/qvalent.rb +8 -8
- data/lib/active_merchant/billing/gateways/realex.rb +1 -1
- data/lib/active_merchant/billing/gateways/redsys.rb +86 -5
- data/lib/active_merchant/billing/gateways/s5.rb +7 -7
- data/lib/active_merchant/billing/gateways/safe_charge.rb +40 -14
- data/lib/active_merchant/billing/gateways/sage.rb +3 -5
- data/lib/active_merchant/billing/gateways/sage_pay.rb +2 -3
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -2
- data/lib/active_merchant/billing/gateways/secure_net.rb +1 -2
- data/lib/active_merchant/billing/gateways/secure_pay.rb +3 -4
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -4
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +1 -2
- data/lib/active_merchant/billing/gateways/securion_pay.rb +5 -6
- data/lib/active_merchant/billing/gateways/skip_jack.rb +2 -3
- data/lib/active_merchant/billing/gateways/smart_ps.rb +5 -6
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +6 -6
- data/lib/active_merchant/billing/gateways/stripe.rb +10 -10
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +30 -0
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +3 -4
- data/lib/active_merchant/billing/gateways/telr.rb +8 -8
- data/lib/active_merchant/billing/gateways/trans_first.rb +2 -2
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +12 -12
- data/lib/active_merchant/billing/gateways/transact_pro.rb +9 -9
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +1 -2
- data/lib/active_merchant/billing/gateways/usa_epay.rb +1 -1
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +32 -32
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +3 -4
- data/lib/active_merchant/billing/gateways/vanco.rb +3 -3
- data/lib/active_merchant/billing/gateways/verifi.rb +1 -2
- data/lib/active_merchant/billing/gateways/viaklix.rb +1 -2
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +10 -10
- data/lib/active_merchant/billing/gateways/webpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/wepay.rb +3 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +1 -2
- data/lib/active_merchant/billing/gateways/worldpay.rb +19 -11
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +14 -16
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +7 -7
- data/lib/active_merchant/billing/response.rb +3 -2
- data/lib/active_merchant/country.rb +1 -1
- data/lib/active_merchant/network_connection_retries.rb +2 -2
- data/lib/active_merchant/post_data.rb +1 -1
- data/lib/active_merchant/posts_data.rb +1 -1
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/ssl_verify.rb +2 -2
- data/lib/support/ssl_version.rb +2 -2
- metadata +2 -2
@@ -17,12 +17,12 @@ module ActiveMerchant #:nodoc:
|
|
17
17
|
SERVICE_TEST_URL = 'https://certservices.elementexpress.com/express.asmx'
|
18
18
|
SERVICE_LIVE_URL = 'https://services.elementexpress.com/express.asmx'
|
19
19
|
|
20
|
-
def initialize(options={})
|
20
|
+
def initialize(options = {})
|
21
21
|
requires!(options, :account_id, :account_token, :application_id, :acceptor_id, :application_name, :application_version)
|
22
22
|
super
|
23
23
|
end
|
24
24
|
|
25
|
-
def purchase(money, payment, options={})
|
25
|
+
def purchase(money, payment, options = {})
|
26
26
|
action = payment.is_a?(Check) ? 'CheckSale' : 'CreditCardSale'
|
27
27
|
|
28
28
|
request = build_soap_request do |xml|
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
commit(action, request, money)
|
39
39
|
end
|
40
40
|
|
41
|
-
def authorize(money, payment, options={})
|
41
|
+
def authorize(money, payment, options = {})
|
42
42
|
request = build_soap_request do |xml|
|
43
43
|
xml.CreditCardAuthorization(xmlns: 'https://transaction.elementexpress.com') do
|
44
44
|
add_credentials(xml)
|
@@ -52,7 +52,7 @@ module ActiveMerchant #:nodoc:
|
|
52
52
|
commit('CreditCardAuthorization', request, money)
|
53
53
|
end
|
54
54
|
|
55
|
-
def capture(money, authorization, options={})
|
55
|
+
def capture(money, authorization, options = {})
|
56
56
|
trans_id, = split_authorization(authorization)
|
57
57
|
options[:trans_id] = trans_id
|
58
58
|
|
@@ -67,7 +67,7 @@ module ActiveMerchant #:nodoc:
|
|
67
67
|
commit('CreditCardAuthorizationCompletion', request, money)
|
68
68
|
end
|
69
69
|
|
70
|
-
def refund(money, authorization, options={})
|
70
|
+
def refund(money, authorization, options = {})
|
71
71
|
trans_id, = split_authorization(authorization)
|
72
72
|
options[:trans_id] = trans_id
|
73
73
|
|
@@ -82,9 +82,9 @@ module ActiveMerchant #:nodoc:
|
|
82
82
|
commit('CreditCardReturn', request, money)
|
83
83
|
end
|
84
84
|
|
85
|
-
def void(authorization, options={})
|
85
|
+
def void(authorization, options = {})
|
86
86
|
trans_id, trans_amount = split_authorization(authorization)
|
87
|
-
options.merge!({trans_id: trans_id, trans_amount: trans_amount, reversal_type: 'Full'})
|
87
|
+
options.merge!({ trans_id: trans_id, trans_amount: trans_amount, reversal_type: 'Full' })
|
88
88
|
|
89
89
|
request = build_soap_request do |xml|
|
90
90
|
xml.CreditCardReversal(xmlns: 'https://transaction.elementexpress.com') do
|
@@ -110,7 +110,7 @@ module ActiveMerchant #:nodoc:
|
|
110
110
|
commit('PaymentAccountCreate', request, nil)
|
111
111
|
end
|
112
112
|
|
113
|
-
def verify(credit_card, options={})
|
113
|
+
def verify(credit_card, options = {})
|
114
114
|
request = build_soap_request do |xml|
|
115
115
|
xml.CreditCardAVSOnly(xmlns: 'https://transaction.elementexpress.com') do
|
116
116
|
add_credentials(xml)
|
@@ -153,7 +153,7 @@ module ActiveMerchant #:nodoc:
|
|
153
153
|
# The <tt>identification</tt> parameter is the transaction ID, retrieved
|
154
154
|
# from {Response#authorization}.
|
155
155
|
def refund(money, identification)
|
156
|
-
post = {transactionid: identification}
|
156
|
+
post = { transactionid: identification }
|
157
157
|
commit('refund', money, post)
|
158
158
|
end
|
159
159
|
|
@@ -181,7 +181,7 @@ module ActiveMerchant #:nodoc:
|
|
181
181
|
# The <tt>identification</tt> parameter is the transaction ID, retrieved
|
182
182
|
# from {Response#authorization}.
|
183
183
|
def void(identification)
|
184
|
-
post = {transactionid: identification}
|
184
|
+
post = { transactionid: identification }
|
185
185
|
commit('void', nil, post)
|
186
186
|
end
|
187
187
|
|
@@ -192,7 +192,7 @@ module ActiveMerchant #:nodoc:
|
|
192
192
|
# The <tt>identification</tt> parameter is the transaction ID, retrieved
|
193
193
|
# from {Response#authorization}.
|
194
194
|
def update(identification, options)
|
195
|
-
post = {transactionid: identification}
|
195
|
+
post = { transactionid: identification }
|
196
196
|
add_order(post, options)
|
197
197
|
commit('update', nil, post)
|
198
198
|
end
|
@@ -283,8 +283,7 @@ module ActiveMerchant #:nodoc:
|
|
283
283
|
test: test?,
|
284
284
|
authorization: response['transactionid'],
|
285
285
|
avs_result: { code: response['avsresponse'] },
|
286
|
-
cvv_result: response['cvvresponse']
|
287
|
-
)
|
286
|
+
cvv_result: response['cvvresponse'])
|
288
287
|
end
|
289
288
|
|
290
289
|
def message_from(response)
|
@@ -292,7 +291,7 @@ module ActiveMerchant #:nodoc:
|
|
292
291
|
end
|
293
292
|
|
294
293
|
def post_data(action, parameters = {})
|
295
|
-
post = {type: action}
|
294
|
+
post = { type: action }
|
296
295
|
|
297
296
|
if test?
|
298
297
|
post[:username] = 'demo'
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
commit(purchase_url(post[:CVN]), money, post)
|
39
39
|
end
|
40
40
|
|
41
|
-
def refund(money, authorization, options={})
|
41
|
+
def refund(money, authorization, options = {})
|
42
42
|
post = {}
|
43
43
|
|
44
44
|
add_customer_id(post)
|
@@ -66,7 +66,7 @@ module ActiveMerchant #:nodoc:
|
|
66
66
|
private
|
67
67
|
|
68
68
|
def requires_address!(options)
|
69
|
-
raise ArgumentError.new('Missing eWay required parameters: address or billing_address') unless options.has_key?(:address)
|
69
|
+
raise ArgumentError.new('Missing eWay required parameters: address or billing_address') unless options.has_key?(:address) || options.has_key?(:billing_address)
|
70
70
|
end
|
71
71
|
|
72
72
|
def add_creditcard(post, creditcard)
|
@@ -115,8 +115,7 @@ module ActiveMerchant #:nodoc:
|
|
115
115
|
message_from(response[:ewaytrxnerror]),
|
116
116
|
response,
|
117
117
|
authorization: response[:ewaytrxnnumber],
|
118
|
-
test: test?
|
119
|
-
)
|
118
|
+
test: test?)
|
120
119
|
end
|
121
120
|
|
122
121
|
def success?(response)
|
@@ -49,7 +49,7 @@ module ActiveMerchant #:nodoc:
|
|
49
49
|
commit('CreateCustomer', post)
|
50
50
|
end
|
51
51
|
|
52
|
-
def update(billing_id, creditcard, options={})
|
52
|
+
def update(billing_id, creditcard, options = {})
|
53
53
|
post = {}
|
54
54
|
|
55
55
|
# Handle our required fields
|
@@ -80,7 +80,7 @@ module ActiveMerchant #:nodoc:
|
|
80
80
|
# * <tt>:order_id</tt> -- The order number, passed to eWay as the "Invoice Reference"
|
81
81
|
# * <tt>:invoice</tt> -- The invoice number, passed to eWay as the "Invoice Reference" unless :order_id is also given
|
82
82
|
# * <tt>:description</tt> -- A description of the payment, passed to eWay as the "Invoice Description"
|
83
|
-
def purchase(money, billing_id, options={})
|
83
|
+
def purchase(money, billing_id, options = {})
|
84
84
|
post = {}
|
85
85
|
post[:managedCustomerID] = billing_id.to_s
|
86
86
|
post[:amount] = money
|
@@ -224,8 +224,7 @@ module ActiveMerchant #:nodoc:
|
|
224
224
|
|
225
225
|
EwayResponse.new(response[:success], response[:message], response,
|
226
226
|
test: test?,
|
227
|
-
authorization: response[:auth_code]
|
228
|
-
)
|
227
|
+
authorization: response[:auth_code])
|
229
228
|
end
|
230
229
|
|
231
230
|
# Where we build the full SOAP 1.2 request using builder
|
@@ -244,16 +243,16 @@ module ActiveMerchant #:nodoc:
|
|
244
243
|
|
245
244
|
xml = Builder::XmlMarkup.new indent: 2
|
246
245
|
xml.instruct!
|
247
|
-
xml.tag! 'soap12:Envelope', {'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema', 'xmlns:soap12' => 'http://www.w3.org/2003/05/soap-envelope'} do
|
246
|
+
xml.tag! 'soap12:Envelope', { 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema', 'xmlns:soap12' => 'http://www.w3.org/2003/05/soap-envelope' } do
|
248
247
|
xml.tag! 'soap12:Header' do
|
249
|
-
xml.tag! 'eWAYHeader', {'xmlns' => 'https://www.eway.com.au/gateway/managedpayment'} do
|
248
|
+
xml.tag! 'eWAYHeader', { 'xmlns' => 'https://www.eway.com.au/gateway/managedpayment' } do
|
250
249
|
xml.tag! 'eWAYCustomerID', @options[:login]
|
251
250
|
xml.tag! 'Username', @options[:username]
|
252
251
|
xml.tag! 'Password', @options[:password]
|
253
252
|
end
|
254
253
|
end
|
255
254
|
xml.tag! 'soap12:Body' do |x|
|
256
|
-
x.tag! action, {'xmlns' => 'https://www.eway.com.au/gateway/managedpayment'} do |y|
|
255
|
+
x.tag! action, { 'xmlns' => 'https://www.eway.com.au/gateway/managedpayment' } do |y|
|
257
256
|
post.each do |key, value|
|
258
257
|
y.tag! key, value
|
259
258
|
end
|
@@ -47,17 +47,18 @@ module ActiveMerchant #:nodoc:
|
|
47
47
|
# (default: "https://github.com/activemerchant/active_merchant")
|
48
48
|
#
|
49
49
|
# Returns an ActiveMerchant::Billing::Response object where authorization is the Transaction ID on success
|
50
|
-
def purchase(amount, payment_method, options={})
|
50
|
+
def purchase(amount, payment_method, options = {})
|
51
51
|
params = {}
|
52
52
|
add_metadata(params, options)
|
53
53
|
add_invoice(params, amount, options)
|
54
54
|
add_customer_data(params, options, payment_method)
|
55
55
|
add_credit_card(params, payment_method, options)
|
56
|
+
add_3ds_authenticated_data(params, options) if options[:three_d_secure]
|
56
57
|
params['Method'] = payment_method.respond_to?(:number) ? 'ProcessPayment' : 'TokenPayment'
|
57
58
|
commit(url_for('Transaction'), params)
|
58
59
|
end
|
59
60
|
|
60
|
-
def authorize(amount, payment_method, options={})
|
61
|
+
def authorize(amount, payment_method, options = {})
|
61
62
|
params = {}
|
62
63
|
add_metadata(params, options)
|
63
64
|
add_invoice(params, amount, options)
|
@@ -197,6 +198,18 @@ module ActiveMerchant #:nodoc:
|
|
197
198
|
params
|
198
199
|
end
|
199
200
|
|
201
|
+
def add_3ds_authenticated_data(params, options)
|
202
|
+
three_d_secure_options = options[:three_d_secure]
|
203
|
+
params['PaymentInstrument'] ||= {} if params['PaymentInstrument'].nil?
|
204
|
+
threed_secure_auth = params['PaymentInstrument']['ThreeDSecureAuth'] = {}
|
205
|
+
threed_secure_auth['Cryptogram'] = three_d_secure_options[:cavv]
|
206
|
+
threed_secure_auth['ECI'] = three_d_secure_options[:eci]
|
207
|
+
threed_secure_auth['XID'] = three_d_secure_options[:xid]
|
208
|
+
threed_secure_auth['AuthStatus'] = three_d_secure_options[:authentication_response_status]
|
209
|
+
threed_secure_auth['dsTransactionId'] = three_d_secure_options[:ds_transaction_id]
|
210
|
+
threed_secure_auth['Version'] = three_d_secure_options[:version]
|
211
|
+
end
|
212
|
+
|
200
213
|
def add_invoice(params, money, options, key = 'Payment')
|
201
214
|
currency_code = options[:currency] || currency(money)
|
202
215
|
params[key] = {
|
@@ -232,7 +245,7 @@ module ActiveMerchant #:nodoc:
|
|
232
245
|
params[key] = {}
|
233
246
|
|
234
247
|
add_name_and_email(params[key], options[:shipping_address], options[:email])
|
235
|
-
add_address(params[key], options[:shipping_address], {skip_company: true})
|
248
|
+
add_address(params[key], options[:shipping_address], { skip_company: true })
|
236
249
|
end
|
237
250
|
|
238
251
|
def add_name_and_email(params, address, email, payment_method = nil)
|
@@ -251,7 +264,7 @@ module ActiveMerchant #:nodoc:
|
|
251
264
|
payment_method.first_name.present? && payment_method.last_name.present?
|
252
265
|
end
|
253
266
|
|
254
|
-
def add_address(params, address, options={})
|
267
|
+
def add_address(params, address, options = {})
|
255
268
|
return unless address
|
256
269
|
|
257
270
|
params['Title'] = address[:title]
|
@@ -310,7 +323,7 @@ module ActiveMerchant #:nodoc:
|
|
310
323
|
cvv_result: cvv_result_from(raw)
|
311
324
|
)
|
312
325
|
rescue ActiveMerchant::ResponseError => e
|
313
|
-
return ActiveMerchant::Billing::Response.new(false, e.response.message, {status_code: e.response.code}, test: test?)
|
326
|
+
return ActiveMerchant::Billing::Response.new(false, e.response.message, { status_code: e.response.code }, test: test?)
|
314
327
|
end
|
315
328
|
|
316
329
|
def parse(data)
|
@@ -365,7 +378,7 @@ module ActiveMerchant #:nodoc:
|
|
365
378
|
else
|
366
379
|
'I'
|
367
380
|
end
|
368
|
-
{code: code}
|
381
|
+
{ code: code }
|
369
382
|
end
|
370
383
|
|
371
384
|
def cvv_result_from(response)
|
@@ -5,8 +5,8 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
|
6
6
|
API_VERSION = '8.5'
|
7
7
|
|
8
|
-
TEST_LOGINS = [{login: 'A00049-01', password: 'test1'},
|
9
|
-
{login: 'A00427-01', password: 'testus'}]
|
8
|
+
TEST_LOGINS = [{ login: 'A00049-01', password: 'test1' },
|
9
|
+
{ login: 'A00427-01', password: 'testus' }]
|
10
10
|
|
11
11
|
TRANSACTIONS = { sale: '00',
|
12
12
|
authorization: '01',
|
@@ -15,16 +15,16 @@ module ActiveMerchant #:nodoc:
|
|
15
15
|
|
16
16
|
ENVELOPE_NAMESPACES = { 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
|
17
17
|
'xmlns:env' => 'http://schemas.xmlsoap.org/soap/envelope/',
|
18
|
-
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance'}
|
18
|
+
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance' }
|
19
19
|
|
20
20
|
SEND_AND_COMMIT_ATTRIBUTES = { 'xmlns:n1' => 'http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/Request',
|
21
|
-
'env:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/'}
|
21
|
+
'env:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/' }
|
22
22
|
|
23
23
|
SEND_AND_COMMIT_SOURCE_ATTRIBUTES = { 'xmlns:n2' => 'http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/encodedTypes',
|
24
|
-
'xsi:type' => 'n2:Transaction'}
|
24
|
+
'xsi:type' => 'n2:Transaction' }
|
25
25
|
|
26
26
|
POST_HEADERS = { 'soapAction' => 'http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/SendAndCommit',
|
27
|
-
'Content-Type' => 'text/xml'}
|
27
|
+
'Content-Type' => 'text/xml' }
|
28
28
|
|
29
29
|
SUCCESS = 'true'
|
30
30
|
|
@@ -162,8 +162,7 @@ module ActiveMerchant #:nodoc:
|
|
162
162
|
test: test?,
|
163
163
|
authorization: authorization_from(response),
|
164
164
|
avs_result: { code: response[:avs] },
|
165
|
-
cvv_result: response[:cvv2]
|
166
|
-
)
|
165
|
+
cvv_result: response[:cvv2])
|
167
166
|
rescue ResponseError => e
|
168
167
|
case e.response.code
|
169
168
|
when '401'
|
@@ -207,7 +206,7 @@ module ActiveMerchant #:nodoc:
|
|
207
206
|
parse_elements(response, root)
|
208
207
|
end
|
209
208
|
|
210
|
-
response.delete_if { |k,
|
209
|
+
response.delete_if { |k, _v| SENSITIVE_FIELDS.include?(k) }
|
211
210
|
end
|
212
211
|
|
213
212
|
def parse_elements(response, root)
|
@@ -10,12 +10,12 @@ module ActiveMerchant
|
|
10
10
|
self.homepage_url = 'http://www.ezic.com/'
|
11
11
|
self.display_name = 'Ezic'
|
12
12
|
|
13
|
-
def initialize(options={})
|
13
|
+
def initialize(options = {})
|
14
14
|
requires!(options, :account_id)
|
15
15
|
super
|
16
16
|
end
|
17
17
|
|
18
|
-
def purchase(money, payment, options={})
|
18
|
+
def purchase(money, payment, options = {})
|
19
19
|
post = {}
|
20
20
|
|
21
21
|
add_account_id(post)
|
@@ -26,7 +26,7 @@ module ActiveMerchant
|
|
26
26
|
commit('S', post)
|
27
27
|
end
|
28
28
|
|
29
|
-
def authorize(money, payment, options={})
|
29
|
+
def authorize(money, payment, options = {})
|
30
30
|
post = {}
|
31
31
|
|
32
32
|
add_account_id(post)
|
@@ -37,7 +37,7 @@ module ActiveMerchant
|
|
37
37
|
commit('A', post)
|
38
38
|
end
|
39
39
|
|
40
|
-
def capture(money, authorization, options={})
|
40
|
+
def capture(money, authorization, options = {})
|
41
41
|
post = {}
|
42
42
|
|
43
43
|
add_account_id(post)
|
@@ -48,7 +48,7 @@ module ActiveMerchant
|
|
48
48
|
commit('D', post)
|
49
49
|
end
|
50
50
|
|
51
|
-
def refund(money, authorization, options={})
|
51
|
+
def refund(money, authorization, options = {})
|
52
52
|
post = {}
|
53
53
|
|
54
54
|
add_account_id(post)
|
@@ -59,7 +59,7 @@ module ActiveMerchant
|
|
59
59
|
commit('R', post)
|
60
60
|
end
|
61
61
|
|
62
|
-
def void(authorization, options={})
|
62
|
+
def void(authorization, options = {})
|
63
63
|
post = {}
|
64
64
|
|
65
65
|
add_account_id(post)
|
@@ -69,7 +69,7 @@ module ActiveMerchant
|
|
69
69
|
commit('U', post)
|
70
70
|
end
|
71
71
|
|
72
|
-
def verify(credit_card, options={})
|
72
|
+
def verify(credit_card, options = {})
|
73
73
|
MultiResponse.run(:use_first_response) do |r|
|
74
74
|
r.process { authorize(100, credit_card, options) }
|
75
75
|
r.process(:ignore_result) { void(r.authorization, options) }
|
@@ -57,7 +57,7 @@ module ActiveMerchant #:nodoc:
|
|
57
57
|
commit(:post, "purchases/#{CGI.escape(txn_id)}/capture", post)
|
58
58
|
end
|
59
59
|
|
60
|
-
def refund(money, authorization, options={})
|
60
|
+
def refund(money, authorization, options = {})
|
61
61
|
txn_id, = authorization.to_s.split('|')
|
62
62
|
post = {}
|
63
63
|
|
@@ -69,13 +69,13 @@ module ActiveMerchant #:nodoc:
|
|
69
69
|
commit(:post, 'refunds', post)
|
70
70
|
end
|
71
71
|
|
72
|
-
def void(authorization, options={})
|
72
|
+
def void(authorization, options = {})
|
73
73
|
txn_id, endpoint = authorization.to_s.split('|')
|
74
74
|
|
75
75
|
commit(:post, "#{endpoint}/void?id=#{txn_id}", {})
|
76
76
|
end
|
77
77
|
|
78
|
-
def store(creditcard, options={})
|
78
|
+
def store(creditcard, options = {})
|
79
79
|
post = {}
|
80
80
|
|
81
81
|
add_creditcard(post, creditcard)
|
@@ -147,7 +147,7 @@ module ActiveMerchant #:nodoc:
|
|
147
147
|
post[:metadata] = options.fetch(:metadata, {})
|
148
148
|
end
|
149
149
|
|
150
|
-
def commit(method, uri, parameters=nil)
|
150
|
+
def commit(method, uri, parameters = nil)
|
151
151
|
response =
|
152
152
|
begin
|
153
153
|
parse(ssl_request(method, get_url(uri), parameters.to_json, headers))
|
@@ -124,9 +124,8 @@ module ActiveMerchant #:nodoc:
|
|
124
124
|
Response.new(success?(response), message, response,
|
125
125
|
test: test?,
|
126
126
|
authorization: response['transactionid'],
|
127
|
-
avs_result: {code: response['avsresponse']},
|
128
|
-
cvv_result: response['cvvresponse']
|
129
|
-
)
|
127
|
+
avs_result: { code: response['avsresponse'] },
|
128
|
+
cvv_result: response['cvvresponse'])
|
130
129
|
end
|
131
130
|
|
132
131
|
def success?(response)
|
@@ -13,12 +13,12 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
self.homepage_url = 'http://1stpaygateway.net/'
|
14
14
|
self.display_name = '1stPayGateway.Net'
|
15
15
|
|
16
|
-
def initialize(options={})
|
16
|
+
def initialize(options = {})
|
17
17
|
requires!(options, :transaction_center_id, :gateway_id)
|
18
18
|
super
|
19
19
|
end
|
20
20
|
|
21
|
-
def purchase(money, payment, options={})
|
21
|
+
def purchase(money, payment, options = {})
|
22
22
|
post = {}
|
23
23
|
add_invoice(post, money, options)
|
24
24
|
add_payment(post, payment, options)
|
@@ -28,7 +28,7 @@ module ActiveMerchant #:nodoc:
|
|
28
28
|
commit('sale', post)
|
29
29
|
end
|
30
30
|
|
31
|
-
def authorize(money, payment, options={})
|
31
|
+
def authorize(money, payment, options = {})
|
32
32
|
post = {}
|
33
33
|
add_invoice(post, money, options)
|
34
34
|
add_payment(post, payment, options)
|
@@ -38,19 +38,19 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
commit('auth', post)
|
39
39
|
end
|
40
40
|
|
41
|
-
def capture(money, authorization, options={})
|
41
|
+
def capture(money, authorization, options = {})
|
42
42
|
post = {}
|
43
43
|
add_reference(post, 'settle', money, authorization)
|
44
44
|
commit('settle', post)
|
45
45
|
end
|
46
46
|
|
47
|
-
def refund(money, authorization, options={})
|
47
|
+
def refund(money, authorization, options = {})
|
48
48
|
post = {}
|
49
49
|
add_reference(post, 'credit', money, authorization)
|
50
50
|
commit('credit', post)
|
51
51
|
end
|
52
52
|
|
53
|
-
def void(authorization, options={})
|
53
|
+
def void(authorization, options = {})
|
54
54
|
post = {}
|
55
55
|
add_reference(post, 'void', nil, authorization)
|
56
56
|
commit('void', post)
|