activemerchant 1.105.0 → 1.107.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +99 -1
- data/README.md +2 -2
- 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 +18 -7
- 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 +17 -6
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +81 -77
- 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 +20 -9
- 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 +154 -91
- data/lib/active_merchant/billing/gateways/d_local.rb +4 -2
- data/lib/active_merchant/billing/gateways/data_cash.rb +33 -33
- data/lib/active_merchant/billing/gateways/decidir.rb +7 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +14 -2
- data/lib/active_merchant/billing/gateways/efsnet.rb +23 -23
- data/lib/active_merchant/billing/gateways/elavon.rb +70 -18
- data/lib/active_merchant/billing/gateways/element.rb +12 -4
- 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 +21 -21
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +20 -20
- data/lib/active_merchant/billing/gateways/flo2cash.rb +4 -4
- data/lib/active_merchant/billing/gateways/forte.rb +8 -7
- data/lib/active_merchant/billing/gateways/garanti.rb +8 -8
- data/lib/active_merchant/billing/gateways/global_collect.rb +30 -24
- data/lib/active_merchant/billing/gateways/hdfc.rb +3 -3
- data/lib/active_merchant/billing/gateways/hps.rb +5 -3
- data/lib/active_merchant/billing/gateways/iats_payments.rb +32 -15
- 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 +12 -10
- data/lib/active_merchant/billing/gateways/itransact.rb +7 -7
- data/lib/active_merchant/billing/gateways/iveri.rb +6 -3
- data/lib/active_merchant/billing/gateways/ixopay.rb +22 -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/kushki.rb +34 -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 +8 -3
- data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +1 -0
- 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 +13 -7
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +13 -9
- data/lib/active_merchant/billing/gateways/orbital.rb +54 -12
- 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 +9 -9
- 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 +17 -10
- 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 +16 -16
- 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 +15 -10
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +50 -9
- 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 +22 -20
- 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/billing/network_tokenization_credit_card.rb +1 -1
- 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 +4 -4
- data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -352
@@ -216,10 +216,10 @@ module ActiveMerchant #:nodoc:
|
|
216
216
|
end
|
217
217
|
|
218
218
|
Response.new(success, message, response,
|
219
|
-
:
|
220
|
-
:
|
221
|
-
:
|
222
|
-
:
|
219
|
+
test: test?,
|
220
|
+
authorization: authorization,
|
221
|
+
avs_result: { code: response[:AVSResponseCode] },
|
222
|
+
cvv_result: response[:CVV2ResponseCode]
|
223
223
|
)
|
224
224
|
end
|
225
225
|
|
@@ -1,151 +1,151 @@
|
|
1
1
|
module QuickpayCommon
|
2
2
|
MD5_CHECK_FIELDS = {
|
3
3
|
3 => {
|
4
|
-
:
|
5
|
-
|
6
|
-
|
4
|
+
authorize: %w(protocol msgtype merchant ordernumber amount
|
5
|
+
currency autocapture cardnumber expirationdate
|
6
|
+
cvd cardtypelock testmode),
|
7
7
|
|
8
|
-
:
|
8
|
+
capture: %w(protocol msgtype merchant amount finalize transaction),
|
9
9
|
|
10
|
-
:
|
10
|
+
cancel: %w(protocol msgtype merchant transaction),
|
11
11
|
|
12
|
-
:
|
12
|
+
refund: %w(protocol msgtype merchant amount transaction),
|
13
13
|
|
14
|
-
:
|
15
|
-
|
14
|
+
subscribe: %w(protocol msgtype merchant ordernumber cardnumber
|
15
|
+
expirationdate cvd cardtypelock description testmode),
|
16
16
|
|
17
|
-
:
|
18
|
-
|
17
|
+
recurring: %w(protocol msgtype merchant ordernumber amount
|
18
|
+
currency autocapture transaction),
|
19
19
|
|
20
|
-
:
|
20
|
+
status: %w(protocol msgtype merchant transaction),
|
21
21
|
|
22
|
-
:
|
22
|
+
chstatus: %w(protocol msgtype merchant)
|
23
23
|
},
|
24
24
|
|
25
25
|
4 => {
|
26
|
-
:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
authorize: %w(protocol msgtype merchant ordernumber amount
|
27
|
+
currency autocapture cardnumber expirationdate cvd
|
28
|
+
cardtypelock testmode fraud_remote_addr
|
29
|
+
fraud_http_accept fraud_http_accept_language
|
30
|
+
fraud_http_accept_encoding fraud_http_accept_charset
|
31
|
+
fraud_http_referer fraud_http_user_agent apikey),
|
32
32
|
|
33
|
-
:
|
33
|
+
capture: %w(protocol msgtype merchant amount finalize transaction apikey),
|
34
34
|
|
35
|
-
:
|
35
|
+
cancel: %w(protocol msgtype merchant transaction apikey),
|
36
36
|
|
37
|
-
:
|
37
|
+
refund: %w(protocol msgtype merchant amount transaction apikey),
|
38
38
|
|
39
|
-
:
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
subscribe: %w(protocol msgtype merchant ordernumber cardnumber
|
40
|
+
expirationdate cvd cardtypelock description testmode
|
41
|
+
fraud_remote_addr fraud_http_accept fraud_http_accept_language
|
42
|
+
fraud_http_accept_encoding fraud_http_accept_charset
|
43
|
+
fraud_http_referer fraud_http_user_agent apikey),
|
44
44
|
|
45
|
-
:
|
46
|
-
|
45
|
+
recurring: %w(protocol msgtype merchant ordernumber amount currency
|
46
|
+
autocapture transaction apikey),
|
47
47
|
|
48
|
-
:
|
48
|
+
status: %w(protocol msgtype merchant transaction apikey),
|
49
49
|
|
50
|
-
:
|
50
|
+
chstatus: %w(protocol msgtype merchant apikey)
|
51
51
|
},
|
52
52
|
|
53
53
|
5 => {
|
54
|
-
:
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
authorize: %w(protocol msgtype merchant ordernumber amount
|
55
|
+
currency autocapture cardnumber expirationdate cvd
|
56
|
+
cardtypelock testmode fraud_remote_addr
|
57
|
+
fraud_http_accept fraud_http_accept_language
|
58
|
+
fraud_http_accept_encoding fraud_http_accept_charset
|
59
|
+
fraud_http_referer fraud_http_user_agent apikey),
|
60
60
|
|
61
|
-
:
|
61
|
+
capture: %w(protocol msgtype merchant amount finalize transaction apikey),
|
62
62
|
|
63
|
-
:
|
63
|
+
cancel: %w(protocol msgtype merchant transaction apikey),
|
64
64
|
|
65
|
-
:
|
65
|
+
refund: %w(protocol msgtype merchant amount transaction apikey),
|
66
66
|
|
67
|
-
:
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
67
|
+
subscribe: %w(protocol msgtype merchant ordernumber cardnumber
|
68
|
+
expirationdate cvd cardtypelock description testmode
|
69
|
+
fraud_remote_addr fraud_http_accept fraud_http_accept_language
|
70
|
+
fraud_http_accept_encoding fraud_http_accept_charset
|
71
|
+
fraud_http_referer fraud_http_user_agent apikey),
|
72
72
|
|
73
|
-
:
|
74
|
-
|
73
|
+
recurring: %w(protocol msgtype merchant ordernumber amount currency
|
74
|
+
autocapture transaction apikey),
|
75
75
|
|
76
|
-
:
|
76
|
+
status: %w(protocol msgtype merchant transaction apikey),
|
77
77
|
|
78
|
-
:
|
78
|
+
chstatus: %w(protocol msgtype merchant apikey)
|
79
79
|
},
|
80
80
|
|
81
81
|
6 => {
|
82
|
-
:
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
82
|
+
authorize: %w(protocol msgtype merchant ordernumber amount
|
83
|
+
currency autocapture cardnumber expirationdate cvd
|
84
|
+
cardtypelock testmode fraud_remote_addr
|
85
|
+
fraud_http_accept fraud_http_accept_language
|
86
|
+
fraud_http_accept_encoding fraud_http_accept_charset
|
87
|
+
fraud_http_referer fraud_http_user_agent apikey),
|
88
88
|
|
89
|
-
:
|
90
|
-
|
89
|
+
capture: %w(protocol msgtype merchant amount finalize transaction
|
90
|
+
apikey),
|
91
91
|
|
92
|
-
:
|
92
|
+
cancel: %w(protocol msgtype merchant transaction apikey),
|
93
93
|
|
94
|
-
:
|
94
|
+
refund: %w(protocol msgtype merchant amount transaction apikey),
|
95
95
|
|
96
|
-
:
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
96
|
+
subscribe: %w(protocol msgtype merchant ordernumber cardnumber
|
97
|
+
expirationdate cvd cardtypelock description testmode
|
98
|
+
fraud_remote_addr fraud_http_accept fraud_http_accept_language
|
99
|
+
fraud_http_accept_encoding fraud_http_accept_charset
|
100
|
+
fraud_http_referer fraud_http_user_agent apikey),
|
101
101
|
|
102
|
-
:
|
103
|
-
|
102
|
+
recurring: %w(protocol msgtype merchant ordernumber amount currency
|
103
|
+
autocapture transaction apikey),
|
104
104
|
|
105
|
-
:
|
105
|
+
status: %w(protocol msgtype merchant transaction apikey),
|
106
106
|
|
107
|
-
:
|
107
|
+
chstatus: %w(protocol msgtype merchant apikey)
|
108
108
|
},
|
109
109
|
|
110
110
|
7 => {
|
111
|
-
:
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
111
|
+
authorize: %w(protocol msgtype merchant ordernumber amount
|
112
|
+
currency autocapture cardnumber expirationdate cvd
|
113
|
+
acquirers cardtypelock testmode fraud_remote_addr
|
114
|
+
fraud_http_accept fraud_http_accept_language
|
115
|
+
fraud_http_accept_encoding fraud_http_accept_charset
|
116
|
+
fraud_http_referer fraud_http_user_agent apikey),
|
117
117
|
|
118
|
-
:
|
119
|
-
|
118
|
+
capture: %w(protocol msgtype merchant amount finalize transaction
|
119
|
+
apikey),
|
120
120
|
|
121
|
-
:
|
121
|
+
cancel: %w(protocol msgtype merchant transaction apikey),
|
122
122
|
|
123
|
-
:
|
123
|
+
refund: %w(protocol msgtype merchant amount transaction apikey),
|
124
124
|
|
125
|
-
:
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
125
|
+
subscribe: %w(protocol msgtype merchant ordernumber amount currency
|
126
|
+
cardnumber expirationdate cvd acquirers cardtypelock
|
127
|
+
description testmode fraud_remote_addr fraud_http_accept
|
128
|
+
fraud_http_accept_language fraud_http_accept_encoding
|
129
|
+
fraud_http_accept_charset fraud_http_referer
|
130
|
+
fraud_http_user_agent apikey),
|
131
131
|
|
132
|
-
:
|
133
|
-
|
132
|
+
recurring: %w(protocol msgtype merchant ordernumber amount currency
|
133
|
+
autocapture transaction apikey),
|
134
134
|
|
135
|
-
:
|
135
|
+
status: %w(protocol msgtype merchant transaction apikey),
|
136
136
|
|
137
|
-
:
|
137
|
+
chstatus: %w(protocol msgtype merchant apikey)
|
138
138
|
},
|
139
139
|
|
140
140
|
10 => {
|
141
|
-
:
|
142
|
-
|
143
|
-
:
|
144
|
-
:
|
145
|
-
:
|
146
|
-
:
|
147
|
-
:
|
148
|
-
:
|
141
|
+
authorize: %w(mobile_number acquirer autofee customer_id extras
|
142
|
+
zero_auth customer_ip),
|
143
|
+
capture: %w(extras),
|
144
|
+
cancel: %w(extras),
|
145
|
+
refund: %w(extras),
|
146
|
+
subscribe: %w(variables branding_id),
|
147
|
+
authorize_subscription: %w(mobile_number acquirer customer_ip),
|
148
|
+
recurring: %w(auto_capture autofee zero_auth)
|
149
149
|
}
|
150
150
|
}
|
151
151
|
|
@@ -154,8 +154,8 @@ module ActiveMerchant
|
|
154
154
|
end
|
155
155
|
|
156
156
|
Response.new(success, message_from(success, response), response,
|
157
|
-
:
|
158
|
-
:
|
157
|
+
test: test?,
|
158
|
+
authorization: authorization_from(response)
|
159
159
|
)
|
160
160
|
end
|
161
161
|
|
@@ -215,7 +215,7 @@ module ActiveMerchant
|
|
215
215
|
end
|
216
216
|
|
217
217
|
if options[:three_d_secure]
|
218
|
-
post[:card][:cavv]= options.dig(:three_d_secure, :cavv)
|
218
|
+
post[:card][:cavv] = options.dig(:three_d_secure, :cavv)
|
219
219
|
post[:card][:eci] = options.dig(:three_d_secure, :eci)
|
220
220
|
post[:card][:xav] = options.dig(:three_d_secure, :xid)
|
221
221
|
end
|
@@ -253,12 +253,12 @@ module ActiveMerchant
|
|
253
253
|
requires!(address, :name, :address1, :city, :zip, :country)
|
254
254
|
country = Country.find(address[:country])
|
255
255
|
mapped = {
|
256
|
-
:
|
257
|
-
:
|
258
|
-
:
|
259
|
-
:
|
260
|
-
:
|
261
|
-
:
|
256
|
+
name: address[:name],
|
257
|
+
street: address[:address1],
|
258
|
+
city: address[:city],
|
259
|
+
region: address[:address2],
|
260
|
+
zip_code: address[:zip],
|
261
|
+
country_code: country.code(:alpha3).value
|
262
262
|
}
|
263
263
|
mapped
|
264
264
|
end
|
@@ -165,8 +165,8 @@ module ActiveMerchant #:nodoc:
|
|
165
165
|
response = parse(ssl_post(self.live_url, post_data(action, params)))
|
166
166
|
|
167
167
|
Response.new(successful?(response), message_from(response), response,
|
168
|
-
:
|
169
|
-
:
|
168
|
+
test: test?,
|
169
|
+
authorization: response[:transaction]
|
170
170
|
)
|
171
171
|
end
|
172
172
|
|
@@ -107,8 +107,8 @@ module ActiveMerchant
|
|
107
107
|
(response[:result] == '00'),
|
108
108
|
message_from(response),
|
109
109
|
response,
|
110
|
-
:
|
111
|
-
:
|
110
|
+
test: (response[:message] =~ %r{\[ test system \]}),
|
111
|
+
authorization: authorization_from(response),
|
112
112
|
avs_result: AVSResult.new(code: response[:avspostcoderesponse]),
|
113
113
|
cvv_result: CVVResult.new(response[:cvnresult])
|
114
114
|
)
|
@@ -138,7 +138,7 @@ module ActiveMerchant
|
|
138
138
|
|
139
139
|
def build_purchase_or_authorization_request(action, money, credit_card, options)
|
140
140
|
timestamp = new_timestamp
|
141
|
-
xml = Builder::XmlMarkup.new :
|
141
|
+
xml = Builder::XmlMarkup.new indent: 2
|
142
142
|
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'auth' do
|
143
143
|
add_merchant_details(xml, options)
|
144
144
|
xml.tag! 'orderid', sanitize_order_id(options[:order_id])
|
@@ -159,7 +159,7 @@ module ActiveMerchant
|
|
159
159
|
|
160
160
|
def build_capture_request(money, authorization, options)
|
161
161
|
timestamp = new_timestamp
|
162
|
-
xml = Builder::XmlMarkup.new :
|
162
|
+
xml = Builder::XmlMarkup.new indent: 2
|
163
163
|
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'settle' do
|
164
164
|
add_merchant_details(xml, options)
|
165
165
|
add_amount(xml, money, options)
|
@@ -172,7 +172,7 @@ module ActiveMerchant
|
|
172
172
|
|
173
173
|
def build_refund_request(money, authorization, options)
|
174
174
|
timestamp = new_timestamp
|
175
|
-
xml = Builder::XmlMarkup.new :
|
175
|
+
xml = Builder::XmlMarkup.new indent: 2
|
176
176
|
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'rebate' do
|
177
177
|
add_merchant_details(xml, options)
|
178
178
|
add_transaction_identifiers(xml, authorization, options)
|
@@ -187,7 +187,7 @@ module ActiveMerchant
|
|
187
187
|
|
188
188
|
def build_credit_request(money, credit_card, options)
|
189
189
|
timestamp = new_timestamp
|
190
|
-
xml = Builder::XmlMarkup.new :
|
190
|
+
xml = Builder::XmlMarkup.new indent: 2
|
191
191
|
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'credit' do
|
192
192
|
add_merchant_details(xml, options)
|
193
193
|
xml.tag! 'orderid', sanitize_order_id(options[:order_id])
|
@@ -203,7 +203,7 @@ module ActiveMerchant
|
|
203
203
|
|
204
204
|
def build_void_request(authorization, options)
|
205
205
|
timestamp = new_timestamp
|
206
|
-
xml = Builder::XmlMarkup.new :
|
206
|
+
xml = Builder::XmlMarkup.new indent: 2
|
207
207
|
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'void' do
|
208
208
|
add_merchant_details(xml, options)
|
209
209
|
add_transaction_identifiers(xml, authorization, options)
|
@@ -216,7 +216,7 @@ module ActiveMerchant
|
|
216
216
|
# Verify initiates an OTB (Open To Buy) request
|
217
217
|
def build_verify_request(credit_card, options)
|
218
218
|
timestamp = new_timestamp
|
219
|
-
xml = Builder::XmlMarkup.new :
|
219
|
+
xml = Builder::XmlMarkup.new indent: 2
|
220
220
|
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'otb' do
|
221
221
|
add_merchant_details(xml, options)
|
222
222
|
xml.tag! 'orderid', sanitize_order_id(options[:order_id])
|
@@ -230,13 +230,14 @@ module ActiveMerchant
|
|
230
230
|
def add_address_and_customer_info(xml, options)
|
231
231
|
billing_address = options[:billing_address] || options[:address]
|
232
232
|
shipping_address = options[:shipping_address]
|
233
|
+
ipv4_address = ipv4?(options[:ip]) ? options[:ip] : nil
|
233
234
|
|
234
|
-
return unless billing_address || shipping_address || options[:customer] || options[:invoice] ||
|
235
|
+
return unless billing_address || shipping_address || options[:customer] || options[:invoice] || ipv4_address
|
235
236
|
|
236
237
|
xml.tag! 'tssinfo' do
|
237
238
|
xml.tag! 'custnum', options[:customer] if options[:customer]
|
238
239
|
xml.tag! 'prodid', options[:invoice] if options[:invoice]
|
239
|
-
xml.tag! 'custipaddress', options[:ip] if
|
240
|
+
xml.tag! 'custipaddress', options[:ip] if ipv4_address
|
240
241
|
|
241
242
|
if billing_address
|
242
243
|
xml.tag! 'address', 'type' => 'billing' do
|
@@ -369,6 +370,12 @@ module ActiveMerchant
|
|
369
370
|
def sanitize_order_id(order_id)
|
370
371
|
order_id.to_s.gsub(/[^a-zA-Z0-9\-_]/, '')
|
371
372
|
end
|
373
|
+
|
374
|
+
def ipv4?(ip_address)
|
375
|
+
return false if ip_address.nil?
|
376
|
+
|
377
|
+
!ip_address.match(/\A\d+\.\d+\.\d+\.\d+\z/).nil?
|
378
|
+
end
|
372
379
|
end
|
373
380
|
end
|
374
381
|
end
|
@@ -91,11 +91,11 @@ module ActiveMerchant #:nodoc:
|
|
91
91
|
# More operations are supported by the gateway itself, but
|
92
92
|
# are not supported in this library.
|
93
93
|
SUPPORTED_TRANSACTIONS = {
|
94
|
-
:
|
95
|
-
:
|
96
|
-
:
|
97
|
-
:
|
98
|
-
:
|
94
|
+
purchase: 'A',
|
95
|
+
authorize: '1',
|
96
|
+
capture: '2',
|
97
|
+
refund: '3',
|
98
|
+
cancel: '9'
|
99
99
|
}
|
100
100
|
|
101
101
|
# These are the text meanings sent back by the acquirer when
|
@@ -236,7 +236,7 @@ module ActiveMerchant #:nodoc:
|
|
236
236
|
data = {}
|
237
237
|
add_action(data, :cancel)
|
238
238
|
order_id, amount, currency = split_authorization(authorization)
|
239
|
-
add_amount(data, amount, :
|
239
|
+
add_amount(data, amount, currency: currency)
|
240
240
|
add_order(data, order_id)
|
241
241
|
data[:description] = options[:description]
|
242
242
|
|
@@ -302,7 +302,7 @@ module ActiveMerchant #:nodoc:
|
|
302
302
|
end
|
303
303
|
|
304
304
|
def threeds_url
|
305
|
-
test? ? 'https://sis-t.redsys.es:25443/sis/services/SerClsWSEntradaV2': 'https://sis.redsys.es/sis/services/SerClsWSEntradaV2'
|
305
|
+
test? ? 'https://sis-t.redsys.es:25443/sis/services/SerClsWSEntradaV2' : 'https://sis.redsys.es/sis/services/SerClsWSEntradaV2'
|
306
306
|
end
|
307
307
|
|
308
308
|
def add_payment(data, card)
|
@@ -313,10 +313,10 @@ module ActiveMerchant #:nodoc:
|
|
313
313
|
year = sprintf('%.4i', card.year)
|
314
314
|
month = sprintf('%.2i', card.month)
|
315
315
|
data[:card] = {
|
316
|
-
:
|
317
|
-
:
|
318
|
-
:
|
319
|
-
:
|
316
|
+
name: name,
|
317
|
+
pan: card.number,
|
318
|
+
date: "#{year[2..3]}#{month}",
|
319
|
+
cvv: card.verification_value
|
320
320
|
}
|
321
321
|
end
|
322
322
|
end
|
@@ -356,7 +356,7 @@ module ActiveMerchant #:nodoc:
|
|
356
356
|
if action
|
357
357
|
{
|
358
358
|
'Content-Type' => 'text/xml',
|
359
|
-
'SOAPAction'
|
359
|
+
'SOAPAction' => action
|
360
360
|
}
|
361
361
|
else
|
362
362
|
{
|
@@ -407,7 +407,7 @@ module ActiveMerchant #:nodoc:
|
|
407
407
|
end
|
408
408
|
|
409
409
|
def build_sha1_xml_request(data, options = {})
|
410
|
-
xml = Builder::XmlMarkup.new :
|
410
|
+
xml = Builder::XmlMarkup.new indent: 2
|
411
411
|
build_merchant_data(xml, data, options)
|
412
412
|
xml.target!
|
413
413
|
end
|
@@ -426,7 +426,11 @@ module ActiveMerchant #:nodoc:
|
|
426
426
|
xml.DS_MERCHANT_AMOUNT data[:amount]
|
427
427
|
xml.DS_MERCHANT_ORDER data[:order_id]
|
428
428
|
xml.DS_MERCHANT_TRANSACTIONTYPE data[:action]
|
429
|
-
|
429
|
+
if data[:description] && data[:threeds]
|
430
|
+
xml.DS_MERCHANT_PRODUCTDESCRIPTION CGI.escape(data[:description])
|
431
|
+
else
|
432
|
+
xml.DS_MERCHANT_PRODUCTDESCRIPTION data[:description]
|
433
|
+
end
|
430
434
|
xml.DS_MERCHANT_TERMINAL options[:terminal] || @options[:terminal]
|
431
435
|
xml.DS_MERCHANT_MERCHANTCODE @options[:login]
|
432
436
|
xml.DS_MERCHANT_MERCHANTSIGNATURE build_signature(data) unless sha256_authentication?
|
@@ -434,7 +438,11 @@ module ActiveMerchant #:nodoc:
|
|
434
438
|
|
435
439
|
# Only when card is present
|
436
440
|
if data[:card]
|
437
|
-
|
441
|
+
if data[:card][:name] && data[:threeds]
|
442
|
+
xml.DS_MERCHANT_TITULAR CGI.escape(data[:card][:name])
|
443
|
+
else
|
444
|
+
xml.DS_MERCHANT_TITULAR data[:card][:name]
|
445
|
+
end
|
438
446
|
xml.DS_MERCHANT_PAN data[:card][:pan]
|
439
447
|
xml.DS_MERCHANT_EXPIRYDATE data[:card][:date]
|
440
448
|
xml.DS_MERCHANT_CVV2 data[:card][:cvv]
|
@@ -456,7 +464,7 @@ module ActiveMerchant #:nodoc:
|
|
456
464
|
params = {}
|
457
465
|
success = false
|
458
466
|
message = ''
|
459
|
-
options = @options.merge(:
|
467
|
+
options = @options.merge(test: test?)
|
460
468
|
xml = Nokogiri::XML(data)
|
461
469
|
code = xml.xpath('//RETORNOXML/CODIGO').text
|
462
470
|
|