activemerchant 1.105.0 → 1.106.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +31 -1
- data/README.md +1 -1
- data/lib/active_merchant/billing/credit_card_methods.rb +12 -3
- data/lib/active_merchant/billing/gateway.rb +22 -22
- data/lib/active_merchant/billing/gateways/adyen.rb +17 -6
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +19 -19
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +11 -11
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +35 -35
- data/lib/active_merchant/billing/gateways/axcessms.rb +3 -3
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +1 -1
- data/lib/active_merchant/billing/gateways/bank_frick.rb +1 -1
- data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +5 -5
- data/lib/active_merchant/billing/gateways/be2bill.rb +4 -4
- data/lib/active_merchant/billing/gateways/beanstream.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +27 -27
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +1 -1
- data/lib/active_merchant/billing/gateways/blue_pay.rb +8 -8
- data/lib/active_merchant/billing/gateways/blue_snap.rb +5 -2
- data/lib/active_merchant/billing/gateways/bogus.rb +20 -20
- data/lib/active_merchant/billing/gateways/borgun.rb +2 -2
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +74 -74
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +3 -3
- data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_stream.rb +19 -19
- data/lib/active_merchant/billing/gateways/cc5.rb +7 -7
- data/lib/active_merchant/billing/gateways/cecabank.rb +3 -3
- data/lib/active_merchant/billing/gateways/cenpos.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +1 -1
- data/lib/active_merchant/billing/gateways/clearhaus.rb +1 -1
- data/lib/active_merchant/billing/gateways/commercegate.rb +2 -2
- data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
- data/lib/active_merchant/billing/gateways/creditcall.rb +4 -4
- data/lib/active_merchant/billing/gateways/ct_payment.rb +1 -1
- data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
- data/lib/active_merchant/billing/gateways/cyber_source.rb +86 -72
- data/lib/active_merchant/billing/gateways/data_cash.rb +33 -33
- data/lib/active_merchant/billing/gateways/decidir.rb +2 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +1 -1
- data/lib/active_merchant/billing/gateways/efsnet.rb +23 -23
- data/lib/active_merchant/billing/gateways/elavon.rb +13 -13
- data/lib/active_merchant/billing/gateways/epay.rb +40 -40
- data/lib/active_merchant/billing/gateways/evo_ca.rb +11 -11
- data/lib/active_merchant/billing/gateways/eway.rb +3 -3
- data/lib/active_merchant/billing/gateways/eway_managed.rb +40 -40
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +7 -7
- data/lib/active_merchant/billing/gateways/exact.rb +11 -11
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +3 -2
- data/lib/active_merchant/billing/gateways/federated_canada.rb +5 -5
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +20 -20
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +19 -19
- data/lib/active_merchant/billing/gateways/flo2cash.rb +4 -4
- data/lib/active_merchant/billing/gateways/forte.rb +1 -1
- data/lib/active_merchant/billing/gateways/garanti.rb +8 -8
- data/lib/active_merchant/billing/gateways/hdfc.rb +3 -3
- data/lib/active_merchant/billing/gateways/hps.rb +1 -1
- data/lib/active_merchant/billing/gateways/iats_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/inspire.rb +7 -7
- data/lib/active_merchant/billing/gateways/instapay.rb +3 -3
- data/lib/active_merchant/billing/gateways/ipp.rb +1 -1
- data/lib/active_merchant/billing/gateways/iridium.rb +8 -8
- data/lib/active_merchant/billing/gateways/itransact.rb +7 -7
- data/lib/active_merchant/billing/gateways/iveri.rb +2 -2
- data/lib/active_merchant/billing/gateways/ixopay.rb +21 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +4 -4
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +5 -5
- data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
- data/lib/active_merchant/billing/gateways/linkpoint.rb +62 -62
- data/lib/active_merchant/billing/gateways/litle.rb +2 -2
- data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +5 -5
- data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +4 -4
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +12 -12
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +11 -11
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +12 -2
- data/lib/active_merchant/billing/gateways/mercury.rb +9 -9
- data/lib/active_merchant/billing/gateways/metrics_global.rb +15 -15
- data/lib/active_merchant/billing/gateways/migs.rb +13 -13
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +7 -7
- data/lib/active_merchant/billing/gateways/monei.rb +19 -19
- data/lib/active_merchant/billing/gateways/moneris.rb +10 -10
- data/lib/active_merchant/billing/gateways/money_movers.rb +5 -5
- data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
- data/lib/active_merchant/billing/gateways/nab_transact.rb +15 -15
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/net_registry.rb +6 -6
- data/lib/active_merchant/billing/gateways/netaxept.rb +4 -4
- data/lib/active_merchant/billing/gateways/netbanx.rb +14 -14
- data/lib/active_merchant/billing/gateways/netbilling.rb +12 -12
- data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/network_merchants.rb +5 -5
- data/lib/active_merchant/billing/gateways/ogone.rb +7 -7
- data/lib/active_merchant/billing/gateways/openpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/opp.rb +1 -1
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +9 -9
- data/lib/active_merchant/billing/gateways/orbital.rb +10 -10
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +7 -7
- data/lib/active_merchant/billing/gateways/pay_conex.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +16 -16
- data/lib/active_merchant/billing/gateways/pay_junction.rb +16 -16
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +18 -2
- data/lib/active_merchant/billing/gateways/pay_secure.rb +6 -6
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +36 -36
- data/lib/active_merchant/billing/gateways/payflow.rb +7 -7
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +12 -12
- data/lib/active_merchant/billing/gateways/payflow_express.rb +4 -4
- data/lib/active_merchant/billing/gateways/payment_express.rb +7 -7
- data/lib/active_merchant/billing/gateways/paymill.rb +3 -3
- data/lib/active_merchant/billing/gateways/paypal.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +5 -5
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +5 -5
- data/lib/active_merchant/billing/gateways/paystation.rb +2 -2
- data/lib/active_merchant/billing/gateways/payu_latam.rb +3 -3
- data/lib/active_merchant/billing/gateways/payway.rb +12 -12
- data/lib/active_merchant/billing/gateways/pin.rb +16 -16
- data/lib/active_merchant/billing/gateways/plugnpay.rb +10 -10
- data/lib/active_merchant/billing/gateways/psigate.rb +26 -26
- data/lib/active_merchant/billing/gateways/psl_card.rb +4 -4
- data/lib/active_merchant/billing/gateways/qbms.rb +23 -23
- data/lib/active_merchant/billing/gateways/quantum.rb +4 -4
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +95 -95
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +9 -9
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +2 -2
- data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
- data/lib/active_merchant/billing/gateways/realex.rb +8 -8
- data/lib/active_merchant/billing/gateways/redsys.rb +24 -16
- data/lib/active_merchant/billing/gateways/safe_charge.rb +1 -1
- data/lib/active_merchant/billing/gateways/sage.rb +10 -10
- data/lib/active_merchant/billing/gateways/sage_pay.rb +35 -35
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +2 -2
- data/lib/active_merchant/billing/gateways/secure_net.rb +9 -9
- data/lib/active_merchant/billing/gateways/secure_pay.rb +13 -13
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +15 -15
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
- data/lib/active_merchant/billing/gateways/skip_jack.rb +8 -8
- data/lib/active_merchant/billing/gateways/smart_ps.rb +16 -16
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +4 -4
- data/lib/active_merchant/billing/gateways/stripe.rb +8 -8
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +10 -3
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +2 -2
- data/lib/active_merchant/billing/gateways/trans_first.rb +4 -4
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +19 -19
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +110 -110
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +29 -29
- data/lib/active_merchant/billing/gateways/verifi.rb +10 -10
- data/lib/active_merchant/billing/gateways/viaklix.rb +6 -6
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +6 -6
- data/lib/active_merchant/billing/gateways/webpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +6 -6
- data/lib/active_merchant/billing/gateways/worldpay.rb +15 -15
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +32 -32
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +2 -2
- data/lib/active_merchant/connection.rb +1 -1
- data/lib/active_merchant/network_connection_retries.rb +3 -3
- data/lib/active_merchant/post_data.rb +1 -1
- data/lib/active_merchant/version.rb +1 -1
- data/lib/certs/cacert.pem +75 -0
- data/lib/support/ssl_verify.rb +2 -2
- data/lib/support/ssl_version.rb +2 -2
- metadata +2 -3
- data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -352
@@ -92,9 +92,9 @@ module ActiveMerchant
|
|
92
92
|
|
93
93
|
def build_void_or_capture_request(type, money, authorization, options)
|
94
94
|
parsed_authorization = parse_authorization_string(authorization)
|
95
|
-
xml = Builder::XmlMarkup.new :
|
95
|
+
xml = Builder::XmlMarkup.new indent: 2
|
96
96
|
xml.instruct!
|
97
|
-
xml.tag! :Request, :
|
97
|
+
xml.tag! :Request, version: '2' do
|
98
98
|
add_authentication(xml)
|
99
99
|
|
100
100
|
xml.tag! :Transaction do
|
@@ -107,7 +107,7 @@ module ActiveMerchant
|
|
107
107
|
if money
|
108
108
|
xml.tag! :TxnDetails do
|
109
109
|
xml.tag! :merchantreference, format_reference_number(options[:order_id])
|
110
|
-
xml.tag! :amount, amount(money), :
|
110
|
+
xml.tag! :amount, amount(money), currency: options[:currency] || currency(money)
|
111
111
|
xml.tag! :capturemethod, 'ecomm'
|
112
112
|
end
|
113
113
|
end
|
@@ -117,20 +117,20 @@ module ActiveMerchant
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def build_purchase_or_authorization_request_with_credit_card_request(type, money, credit_card, options)
|
120
|
-
xml = Builder::XmlMarkup.new :
|
120
|
+
xml = Builder::XmlMarkup.new indent: 2
|
121
121
|
xml.instruct!
|
122
|
-
xml.tag! :Request, :
|
122
|
+
xml.tag! :Request, version: '2' do
|
123
123
|
add_authentication(xml)
|
124
124
|
|
125
125
|
xml.tag! :Transaction do
|
126
|
-
xml.tag! :ContAuthTxn, :
|
126
|
+
xml.tag! :ContAuthTxn, type: 'setup' if options[:set_up_continuous_authority]
|
127
127
|
xml.tag! :CardTxn do
|
128
128
|
xml.tag! :method, type
|
129
129
|
add_credit_card(xml, credit_card, options[:billing_address])
|
130
130
|
end
|
131
131
|
xml.tag! :TxnDetails do
|
132
132
|
xml.tag! :merchantreference, format_reference_number(options[:order_id])
|
133
|
-
xml.tag! :amount, amount(money), :
|
133
|
+
xml.tag! :amount, amount(money), currency: options[:currency] || currency(money)
|
134
134
|
xml.tag! :capturemethod, 'ecomm'
|
135
135
|
end
|
136
136
|
end
|
@@ -142,19 +142,19 @@ module ActiveMerchant
|
|
142
142
|
parsed_authorization = parse_authorization_string(authorization)
|
143
143
|
raise ArgumentError, 'The continuous authority reference is required for continuous authority transactions' if parsed_authorization[:ca_reference].blank?
|
144
144
|
|
145
|
-
xml = Builder::XmlMarkup.new :
|
145
|
+
xml = Builder::XmlMarkup.new indent: 2
|
146
146
|
xml.instruct!
|
147
|
-
xml.tag! :Request, :
|
147
|
+
xml.tag! :Request, version: '2' do
|
148
148
|
add_authentication(xml)
|
149
149
|
xml.tag! :Transaction do
|
150
|
-
xml.tag! :ContAuthTxn, :
|
150
|
+
xml.tag! :ContAuthTxn, type: 'historic'
|
151
151
|
xml.tag! :HistoricTxn do
|
152
152
|
xml.tag! :reference, parsed_authorization[:ca_reference]
|
153
153
|
xml.tag! :method, type
|
154
154
|
end
|
155
155
|
xml.tag! :TxnDetails do
|
156
156
|
xml.tag! :merchantreference, format_reference_number(options[:order_id])
|
157
|
-
xml.tag! :amount, amount(money), :
|
157
|
+
xml.tag! :amount, amount(money), currency: options[:currency] || currency(money)
|
158
158
|
xml.tag! :capturemethod, 'cont_auth'
|
159
159
|
end
|
160
160
|
end
|
@@ -164,9 +164,9 @@ module ActiveMerchant
|
|
164
164
|
|
165
165
|
def build_transaction_refund_request(money, authorization)
|
166
166
|
parsed_authorization = parse_authorization_string(authorization)
|
167
|
-
xml = Builder::XmlMarkup.new :
|
167
|
+
xml = Builder::XmlMarkup.new indent: 2
|
168
168
|
xml.instruct!
|
169
|
-
xml.tag! :Request, :
|
169
|
+
xml.tag! :Request, version: '2' do
|
170
170
|
add_authentication(xml)
|
171
171
|
xml.tag! :Transaction do
|
172
172
|
xml.tag! :HistoricTxn do
|
@@ -185,9 +185,9 @@ module ActiveMerchant
|
|
185
185
|
end
|
186
186
|
|
187
187
|
def build_credit_request(money, credit_card, options)
|
188
|
-
xml = Builder::XmlMarkup.new :
|
188
|
+
xml = Builder::XmlMarkup.new indent: 2
|
189
189
|
xml.instruct!
|
190
|
-
xml.tag! :Request, :
|
190
|
+
xml.tag! :Request, version: '2' do
|
191
191
|
add_authentication(xml)
|
192
192
|
xml.tag! :Transaction do
|
193
193
|
xml.tag! :CardTxn do
|
@@ -235,23 +235,23 @@ module ActiveMerchant
|
|
235
235
|
# a predefined one
|
236
236
|
xml.tag! :ExtendedPolicy do
|
237
237
|
xml.tag! :cv2_policy,
|
238
|
-
:
|
239
|
-
:
|
240
|
-
:
|
241
|
-
:
|
242
|
-
:
|
238
|
+
notprovided: POLICY_REJECT,
|
239
|
+
notchecked: POLICY_REJECT,
|
240
|
+
matched: POLICY_ACCEPT,
|
241
|
+
notmatched: POLICY_REJECT,
|
242
|
+
partialmatch: POLICY_REJECT
|
243
243
|
xml.tag! :postcode_policy,
|
244
|
-
:
|
245
|
-
:
|
246
|
-
:
|
247
|
-
:
|
248
|
-
:
|
244
|
+
notprovided: POLICY_ACCEPT,
|
245
|
+
notchecked: POLICY_ACCEPT,
|
246
|
+
matched: POLICY_ACCEPT,
|
247
|
+
notmatched: POLICY_REJECT,
|
248
|
+
partialmatch: POLICY_ACCEPT
|
249
249
|
xml.tag! :address_policy,
|
250
|
-
:
|
251
|
-
:
|
252
|
-
:
|
253
|
-
:
|
254
|
-
:
|
250
|
+
notprovided: POLICY_ACCEPT,
|
251
|
+
notchecked: POLICY_ACCEPT,
|
252
|
+
matched: POLICY_ACCEPT,
|
253
|
+
notmatched: POLICY_REJECT,
|
254
|
+
partialmatch: POLICY_ACCEPT
|
255
255
|
end
|
256
256
|
end
|
257
257
|
end
|
@@ -261,8 +261,8 @@ module ActiveMerchant
|
|
261
261
|
response = parse(ssl_post(test? ? self.test_url : self.live_url, request))
|
262
262
|
|
263
263
|
Response.new(response[:status] == '1', response[:reason], response,
|
264
|
-
:
|
265
|
-
:
|
264
|
+
test: test?,
|
265
|
+
authorization: "#{response[:datacash_reference]};#{response[:authcode]};#{response[:ca_reference]}"
|
266
266
|
)
|
267
267
|
end
|
268
268
|
|
@@ -296,7 +296,7 @@ module ActiveMerchant
|
|
296
296
|
|
297
297
|
def parse_authorization_string(authorization)
|
298
298
|
reference, auth_code, ca_reference = authorization.to_s.split(';')
|
299
|
-
{:
|
299
|
+
{reference: reference, auth_code: auth_code, ca_reference: ca_reference}
|
300
300
|
end
|
301
301
|
end
|
302
302
|
end
|
@@ -37,6 +37,7 @@ module ActiveMerchant #:nodoc:
|
|
37
37
|
56 => STANDARD_ERROR_CODE[:card_declined],
|
38
38
|
57 => STANDARD_ERROR_CODE[:card_declined],
|
39
39
|
76 => STANDARD_ERROR_CODE[:call_issuer],
|
40
|
+
91 => STANDARD_ERROR_CODE[:call_issuer],
|
40
41
|
96 => STANDARD_ERROR_CODE[:processing_error],
|
41
42
|
97 => STANDARD_ERROR_CODE[:processing_error],
|
42
43
|
}
|
@@ -239,9 +240,8 @@ module ActiveMerchant #:nodoc:
|
|
239
240
|
return response['message'] if response['message']
|
240
241
|
|
241
242
|
message = nil
|
242
|
-
|
243
243
|
if error = response.dig('status_details', 'error')
|
244
|
-
message = error.dig('reason', 'description')
|
244
|
+
message = "#{error.dig('reason', 'description')} | #{error['type']}"
|
245
245
|
elsif response['error_type']
|
246
246
|
message = response['validation_errors'].map { |errors| "#{errors['code']}: #{errors['param']}" }.join(', ') if response['validation_errors']
|
247
247
|
message ||= response['error_type']
|
@@ -171,7 +171,7 @@ module ActiveMerchant #:nodoc:
|
|
171
171
|
def add_invoice(post, money, options)
|
172
172
|
post[:payment][:amount_total] = amount(money)
|
173
173
|
post[:payment][:currency_code] = (options[:currency] || currency(money))
|
174
|
-
post[:payment][:merchant_payment_code] = options[:order_id]
|
174
|
+
post[:payment][:merchant_payment_code] = Digest::MD5.hexdigest(options[:order_id])
|
175
175
|
post[:payment][:instalments] = options[:instalments] || 1
|
176
176
|
end
|
177
177
|
|
@@ -54,7 +54,7 @@ module ActiveMerchant #:nodoc:
|
|
54
54
|
def void(identification, options = {})
|
55
55
|
requires!(options, :order_id)
|
56
56
|
original_transaction_id, _ = identification.split(';')
|
57
|
-
commit(:void_transaction, {:
|
57
|
+
commit(:void_transaction, {reference_number: format_reference_number(options[:order_id]), transaction_id: original_transaction_id})
|
58
58
|
end
|
59
59
|
|
60
60
|
def voice_authorize(money, authorization_code, creditcard, options = {})
|
@@ -81,11 +81,11 @@ module ActiveMerchant #:nodoc:
|
|
81
81
|
requires!(options, :order_id)
|
82
82
|
|
83
83
|
{
|
84
|
-
:
|
85
|
-
:
|
86
|
-
:
|
87
|
-
:
|
88
|
-
:
|
84
|
+
reference_number: format_reference_number(options[:order_id]),
|
85
|
+
transaction_amount: amount(money),
|
86
|
+
original_transaction_amount: original_transaction_amount,
|
87
|
+
original_transaction_id: original_transaction_id,
|
88
|
+
client_ip_address: options[:ip]
|
89
89
|
}
|
90
90
|
end
|
91
91
|
|
@@ -93,10 +93,10 @@ module ActiveMerchant #:nodoc:
|
|
93
93
|
requires!(options, :order_id)
|
94
94
|
|
95
95
|
post = {
|
96
|
-
:
|
97
|
-
:
|
98
|
-
:
|
99
|
-
:
|
96
|
+
reference_number: format_reference_number(options[:order_id]),
|
97
|
+
authorization_number: options[:authorization_number],
|
98
|
+
transaction_amount: amount(money),
|
99
|
+
client_ip_address: options[:ip]
|
100
100
|
|
101
101
|
}
|
102
102
|
add_creditcard(post, creditcard)
|
@@ -146,10 +146,10 @@ module ActiveMerchant #:nodoc:
|
|
146
146
|
response = parse(ssl_post(test? ? self.test_url : self.live_url, post_data(action, parameters), 'Content-Type' => 'text/xml'))
|
147
147
|
|
148
148
|
Response.new(success?(response), message_from(response[:result_message]), response,
|
149
|
-
:
|
150
|
-
:
|
151
|
-
:
|
152
|
-
:
|
149
|
+
test: test?,
|
150
|
+
authorization: authorization_from(response, parameters),
|
151
|
+
avs_result: { code: response[:avs_response_code] },
|
152
|
+
cvv_result: response[:cvv_response_code]
|
153
153
|
)
|
154
154
|
end
|
155
155
|
|
@@ -201,15 +201,15 @@ module ActiveMerchant #:nodoc:
|
|
201
201
|
CREDIT_CARD_FIELDS = %w(AuthorizationNumber ClientIpAddress BillingAddress BillingCity BillingState BillingPostalCode BillingCountry BillingName CardVerificationValue ExpirationMonth ExpirationYear ReferenceNumber TransactionAmount AccountNumber)
|
202
202
|
|
203
203
|
ACTIONS = {
|
204
|
-
:
|
205
|
-
:
|
206
|
-
:
|
207
|
-
:
|
208
|
-
:
|
209
|
-
:
|
210
|
-
:
|
211
|
-
:
|
212
|
-
:
|
204
|
+
credit_card_authorize: CREDIT_CARD_FIELDS,
|
205
|
+
credit_card_charge: CREDIT_CARD_FIELDS,
|
206
|
+
credit_card_voice_authorize: CREDIT_CARD_FIELDS,
|
207
|
+
credit_card_capture: CREDIT_CARD_FIELDS,
|
208
|
+
credit_card_credit: CREDIT_CARD_FIELDS + ['OriginalTransactionAmount'],
|
209
|
+
credit_card_refund: %w(ReferenceNumber TransactionAmount OriginalTransactionAmount OriginalTransactionID ClientIpAddress),
|
210
|
+
void_transaction: %w(ReferenceNumber TransactionID),
|
211
|
+
credit_card_settle: %w(ReferenceNumber TransactionAmount OriginalTransactionAmount OriginalTransactionID ClientIpAddress),
|
212
|
+
system_check: %w(SystemCheck),
|
213
213
|
}
|
214
214
|
end
|
215
215
|
end
|
@@ -17,15 +17,15 @@ module ActiveMerchant #:nodoc:
|
|
17
17
|
|
18
18
|
self.delimiter = "\n"
|
19
19
|
self.actions = {
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
20
|
+
purchase: 'CCSALE',
|
21
|
+
credit: 'CCCREDIT',
|
22
|
+
refund: 'CCRETURN',
|
23
|
+
authorize: 'CCAUTHONLY',
|
24
|
+
capture: 'CCFORCE',
|
25
|
+
capture_complete: 'CCCOMPLETE',
|
26
|
+
void: 'CCDELETE',
|
27
|
+
store: 'CCGETTOKEN',
|
28
|
+
update: 'CCUPDATETOKEN',
|
29
29
|
}
|
30
30
|
|
31
31
|
def initialize(options = {})
|
@@ -264,10 +264,10 @@ module ActiveMerchant #:nodoc:
|
|
264
264
|
response = parse(ssl_post(test? ? self.test_url : self.live_url, post_data(parameters, options)))
|
265
265
|
|
266
266
|
Response.new(response['result'] == '0', message_from(response), response,
|
267
|
-
:
|
268
|
-
:
|
269
|
-
:
|
270
|
-
:
|
267
|
+
test: @options[:test] || test?,
|
268
|
+
authorization: authorization_from(response),
|
269
|
+
avs_result: { code: response['avs_response'] },
|
270
|
+
cvv_result: response['cvv2_response']
|
271
271
|
)
|
272
272
|
end
|
273
273
|
|
@@ -12,41 +12,41 @@ module ActiveMerchant #:nodoc:
|
|
12
12
|
self.display_name = 'ePay'
|
13
13
|
|
14
14
|
CURRENCY_CODES = {
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
29
|
-
:
|
30
|
-
:
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
15
|
+
ADP: '020', AED: '784', AFA: '004', ALL: '008', AMD: '051',
|
16
|
+
ANG: '532', AOA: '973', ARS: '032', AUD: '036', AWG: '533',
|
17
|
+
AZM: '031', BAM: '977', BBD: '052', BDT: '050', BGL: '100',
|
18
|
+
BGN: '975', BHD: '048', BIF: '108', BMD: '060', BND: '096',
|
19
|
+
BOB: '068', BOV: '984', BRL: '986', BSD: '044', BTN: '064',
|
20
|
+
BWP: '072', BYR: '974', BZD: '084', CAD: '124', CDF: '976',
|
21
|
+
CHF: '756', CLF: '990', CLP: '152', CNY: '156', COP: '170',
|
22
|
+
CRC: '188', CUP: '192', CVE: '132', CYP: '196', CZK: '203',
|
23
|
+
DJF: '262', DKK: '208', DOP: '214', DZD: '012', ECS: '218',
|
24
|
+
ECV: '983', EEK: '233', EGP: '818', ERN: '232', ETB: '230',
|
25
|
+
EUR: '978', FJD: '242', FKP: '238', GBP: '826', GEL: '981',
|
26
|
+
GHC: '288', GIP: '292', GMD: '270', GNF: '324', GTQ: '320',
|
27
|
+
GWP: '624', GYD: '328', HKD: '344', HNL: '340', HRK: '191',
|
28
|
+
HTG: '332', HUF: '348', IDR: '360', ILS: '376', INR: '356',
|
29
|
+
IQD: '368', IRR: '364', ISK: '352', JMD: '388', JOD: '400',
|
30
|
+
JPY: '392', KES: '404', KGS: '417', KHR: '116', KMF: '174',
|
31
|
+
KPW: '408', KRW: '410', KWD: '414', KYD: '136', KZT: '398',
|
32
|
+
LAK: '418', LBP: '422', LKR: '144', LRD: '430', LSL: '426',
|
33
|
+
LTL: '440', LVL: '428', LYD: '434', MAD: '504', MDL: '498',
|
34
|
+
MGF: '450', MKD: '807', MMK: '104', MNT: '496', MOP: '446',
|
35
|
+
MRO: '478', MTL: '470', MUR: '480', MVR: '462', MWK: '454',
|
36
|
+
MXN: '484', MXV: '979', MYR: '458', MZM: '508', NAD: '516',
|
37
|
+
NGN: '566', NIO: '558', NOK: '578', NPR: '524', NZD: '554',
|
38
|
+
OMR: '512', PAB: '590', PEN: '604', PGK: '598', PHP: '608',
|
39
|
+
PKR: '586', PLN: '985', PYG: '600', QAR: '634', ROL: '642',
|
40
|
+
RUB: '643', RUR: '810', RWF: '646', SAR: '682', SBD: '090',
|
41
|
+
SCR: '690', SDD: '736', SEK: '752', SGD: '702', SHP: '654',
|
42
|
+
SIT: '705', SKK: '703', SLL: '694', SOS: '706', SRG: '740',
|
43
|
+
STD: '678', SVC: '222', SYP: '760', SZL: '748', THB: '764',
|
44
|
+
TJS: '972', TMM: '795', TND: '788', TOP: '776', TPE: '626',
|
45
|
+
TRL: '792', TRY: '949', TTD: '780', TWD: '901', TZS: '834',
|
46
|
+
UAH: '980', UGX: '800', USD: '840', UYU: '858', UZS: '860',
|
47
|
+
VEB: '862', VND: '704', VUV: '548', XAF: '950', XCD: '951',
|
48
|
+
XOF: '952', XPF: '953', YER: '886', YUM: '891', ZAR: '710',
|
49
|
+
ZMK: '894', ZWD: '716'
|
50
50
|
}
|
51
51
|
|
52
52
|
# login: merchant number
|
@@ -177,14 +177,14 @@ module ActiveMerchant #:nodoc:
|
|
177
177
|
Response.new response['accept'].to_i == 1,
|
178
178
|
response['errortext'],
|
179
179
|
response,
|
180
|
-
:
|
181
|
-
:
|
180
|
+
test: test?,
|
181
|
+
authorization: response['tid']
|
182
182
|
else
|
183
183
|
Response.new response['result'] == 'true',
|
184
184
|
messages(response['epay'], response['pbs']),
|
185
185
|
response,
|
186
|
-
:
|
187
|
-
:
|
186
|
+
test: test?,
|
187
|
+
authorization: params[:transaction]
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
@@ -261,7 +261,7 @@ module ActiveMerchant #:nodoc:
|
|
261
261
|
end
|
262
262
|
|
263
263
|
def xml_builder(params, soap_call)
|
264
|
-
xml = Builder::XmlMarkup.new(:
|
264
|
+
xml = Builder::XmlMarkup.new(indent: 2)
|
265
265
|
xml.instruct!
|
266
266
|
xml.tag! 'soap:Envelope', { 'xmlns:xsi' => 'http://schemas.xmlsoap.org/soap/envelope/',
|
267
267
|
'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
|
@@ -139,8 +139,8 @@ module ActiveMerchant #:nodoc:
|
|
139
139
|
# <tt>options</tt>.
|
140
140
|
def capture(money, authorization, options = {})
|
141
141
|
post = {
|
142
|
-
:
|
143
|
-
:
|
142
|
+
amount: amount(money),
|
143
|
+
transactionid: authorization
|
144
144
|
}
|
145
145
|
add_order(post, options)
|
146
146
|
commit('capture', money, post)
|
@@ -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 = {:
|
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 = {:
|
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 = {:
|
195
|
+
post = {transactionid: identification}
|
196
196
|
add_order(post, options)
|
197
197
|
commit('update', nil, post)
|
198
198
|
end
|
@@ -245,7 +245,7 @@ module ActiveMerchant #:nodoc:
|
|
245
245
|
end
|
246
246
|
|
247
247
|
def add_paymentmethod(post, payment)
|
248
|
-
if card_brand(payment)=='check'
|
248
|
+
if card_brand(payment) == 'check'
|
249
249
|
post[:payment] = 'check'
|
250
250
|
post[:checkname] = payment.name
|
251
251
|
post[:checkaba] = payment.routing_number
|
@@ -280,10 +280,10 @@ module ActiveMerchant #:nodoc:
|
|
280
280
|
message = message_from(response)
|
281
281
|
|
282
282
|
Response.new(success?(response), message, response,
|
283
|
-
:
|
284
|
-
:
|
285
|
-
:
|
286
|
-
:
|
283
|
+
test: test?,
|
284
|
+
authorization: response['transactionid'],
|
285
|
+
avs_result: { code: response['avsresponse'] },
|
286
|
+
cvv_result: response['cvvresponse']
|
287
287
|
)
|
288
288
|
end
|
289
289
|
|
@@ -292,7 +292,7 @@ module ActiveMerchant #:nodoc:
|
|
292
292
|
end
|
293
293
|
|
294
294
|
def post_data(action, parameters = {})
|
295
|
-
post = {:
|
295
|
+
post = {type: action}
|
296
296
|
|
297
297
|
if test?
|
298
298
|
post[:username] = 'demo'
|